aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-07-28 03:31:44 +0000
committerRichard M. Stallman2006-07-28 03:31:44 +0000
commit7eb944cfa00010d12e8dce5f941d3e1e2f45bfdd (patch)
tree72651e722409fb621ad2659ecdde56a66e51f3f8
parentd4a844e0767a9202c3f2a972c860bf8fb0845321 (diff)
downloademacs-7eb944cfa00010d12e8dce5f941d3e1e2f45bfdd.tar.gz
emacs-7eb944cfa00010d12e8dce5f941d3e1e2f45bfdd.zip
(customize-package-emacs-version-alist): Doc fix.
(customize-package-emacs-version): Change msg when pkg has no entry. (custom-no-edit): On a button, do like widget-button-press.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/cus-edit.el46
2 files changed, 33 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1d6cfc14e45..9f1eeedc2fc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12006-07-27 Richard Stallman <rms@gnu.org>
2
3 * cus-edit.el (customize-package-emacs-version-alist): Doc fix.
4 (customize-package-emacs-version): Change msg when pkg has no entry.
5 (custom-no-edit): On a button, do like widget-button-press.
6
12006-07-27 Dan Nicolaescu <dann@ics.uci.edu> 72006-07-27 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * term/xterm.el (terminal-init-xterm): Fix bindings for C-tab, 9 * term/xterm.el (terminal-init-xterm): Fix bindings for C-tab,
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 0b578358f80..15f43080aff 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1087,18 +1087,24 @@ Show the buffer in another window, but don't select it."
1087;; Packages will update this variable, so make it available. 1087;; Packages will update this variable, so make it available.
1088;;;###autoload 1088;;;###autoload
1089(defvar customize-package-emacs-version-alist nil 1089(defvar customize-package-emacs-version-alist nil
1090 "Alist mapping versions of Emacs to versions of a package. 1090 "Alist mapping versions of a package to Emacs versions.
1091These package versions are listed in the :package-version 1091We use this for packages that have their own names, but are released
1092keyword used in `defcustom', `defgroup', and `defface'. Its 1092as part of Emacs itself.
1093elements look like this: 1093
1094Each elements looks like this:
1094 1095
1095 (PACKAGE (PVERSION . EVERSION)...) 1096 (PACKAGE (PVERSION . EVERSION)...)
1096 1097
1097For each PACKAGE, which is a symbol, there are one or more 1098Here PACKAGE is the name of a package, as a symbol. After
1098elements that contain a package version PVERSION with an 1099PACKAGE come one or more elements, each associating a
1099associated Emacs version EVERSION. These versions are strings. 1100package version PVERSION with the first Emacs version
1100For example, the MH-E package updates this alist with the 1101EVERSION in which it (or a subsequent version of PACKAGE)
1101following: 1102was first released. Both PVERSION and EVERSION are strings.
1103PVERSION should be a string that this package used in
1104the :package-version keyword for `defcustom', `defgroup',
1105and `defface'.
1106
1107For example, the MH-E package updates this alist as follows:
1102 1108
1103 (add-to-list 'customize-package-emacs-version-alist 1109 (add-to-list 'customize-package-emacs-version-alist
1104 '(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\") 1110 '(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\")
@@ -1173,11 +1179,10 @@ that were added or redefined since that version."
1173 since-version)))) 1179 since-version))))
1174 1180
1175(defun customize-package-emacs-version (symbol package-version) 1181(defun customize-package-emacs-version (symbol package-version)
1176 "Return Emacs version of SYMBOL. 1182 "Return the Emacs version in which SYMBOL's meaning last changed.
1177PACKAGE-VERSION has the form (PACKAGE . VERSION). The VERSION of 1183PACKAGE-VERSION has the form (PACKAGE . VERSION). We use
1178PACKAGE is looked up in the associated list
1179`customize-package-emacs-version-alist' to find the version of 1184`customize-package-emacs-version-alist' to find the version of
1180Emacs that is associated with it." 1185Emacs that is associated with version VERSION of PACKAGE."
1181 (let (package-versions emacs-version) 1186 (let (package-versions emacs-version)
1182 ;; Use message instead of error since we want user to be able to 1187 ;; Use message instead of error since we want user to be able to
1183 ;; see the rest of the symbols even if a package author has 1188 ;; see the rest of the symbols even if a package author has
@@ -1193,9 +1198,9 @@ Emacs that is associated with it."
1193 (cdr package-version) 1198 (cdr package-version)
1194 "customize-package-emacs-version-alist"))) 1199 "customize-package-emacs-version-alist")))
1195 (t 1200 (t
1196 (message "Package %s neglected to update %s" 1201 (message "Package %s version %s lists no corresponding Emacs version"
1197 (car package-version) 1202 (car package-version)
1198 "customize-package-emacs-version-alist"))) 1203 (cdr package-version))))
1199 emacs-version)) 1204 emacs-version))
1200 1205
1201(defun customize-version-lessp (version1 version2) 1206(defun customize-version-lessp (version1 version2)
@@ -4444,10 +4449,13 @@ The format is suitable for use with `easy-menu-define'."
4444 map) 4449 map)
4445 "Keymap for `custom-mode'.") 4450 "Keymap for `custom-mode'.")
4446 4451
4447(defun custom-no-edit () 4452(defun custom-no-edit (pos &optional event)
4448 "Refuse to allow editing of Custom buffer." 4453 "Invoke button at POS, or refuse to allow editing of Custom buffer."
4449 (interactive) 4454 (interactive "@d")
4450 (error "You can't edit this part of the Custom buffer")) 4455 (let ((button (get-char-property pos 'button)))
4456 (if button
4457 (widget-apply-action button event)
4458 (error "You can't edit this part of the Custom buffer"))))
4451 4459
4452(easy-menu-define Custom-mode-menu 4460(easy-menu-define Custom-mode-menu
4453 custom-mode-map 4461 custom-mode-map