aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wohler2006-04-14 00:46:39 +0000
committerBill Wohler2006-04-14 00:46:39 +0000
commit994019dfacc0213db7ccec073227d313a689e472 (patch)
treecf4d0c07123da4a64832ace52f15b8276268d3ec
parent32f9593c7c9103b02ac41cd671f02ba541fba48a (diff)
downloademacs-994019dfacc0213db7ccec073227d313a689e472.tar.gz
emacs-994019dfacc0213db7ccec073227d313a689e472.zip
* cus-edit.el (customize-package-emacs-version-alist): Update
docstring. (customize-package-emacs-version): Use cdr instead of cadr now that alists use dotted pairs. * custom.el (defcustom): Fix docstring for :package-version.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/cus-edit.el38
-rw-r--r--lisp/custom.el5
3 files changed, 40 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b2948a5cecc..045d14192ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12006-04-13 Bill Wohler <wohler@newt.com>
2
3 * cus-edit.el (customize-package-emacs-version-alist): Update
4 docstring.
5 (customize-package-emacs-version): Use cdr instead of cadr now
6 that alists use dotted pairs.
7
8 * custom.el (defcustom): Fix docstring for :package-version.
9
12006-04-13 Michael Albinus <michael.albinus@gmx.de> 102006-04-13 Michael Albinus <michael.albinus@gmx.de>
2 11
3 * net/tramp.el (tramp-display-shell-command-buffer): New defvar. 12 * net/tramp.el (tramp-display-shell-command-buffer): New defvar.
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 4de2a431392..e68d2eab293 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1082,14 +1082,29 @@ Show the buffer in another window, but don't select it."
1082;; Packages will update this variable, so make it available. 1082;; Packages will update this variable, so make it available.
1083;;;###autoload 1083;;;###autoload
1084(defvar customize-package-emacs-version-alist nil 1084(defvar customize-package-emacs-version-alist nil
1085 "Alist that maps packages to alists of package to Emacs versions. 1085 "Alist mapping versions of Emacs to versions of a package.
1086The value alists map all package versions used with 1086These package versions are listed in the :package-version
1087the :package-version keyword to Emacs versions. Packages are 1087keyword used in `defcustom', `defgroup', and `defface'. Its
1088symbols and versions are strings. 1088elements look like this:
1089 1089
1090For example: 1090 (PACKAGE (PVERSION . EVERSION)...)
1091 '((MH-E (\"7.4\" \"22.1\") (\"8.0\" \"22.1\")) 1091
1092 (Gnus (\"5.11\" \"22.1\")))") 1092For each PACKAGE, which is a symbol, there are one or more
1093elements that contain a package version PVERSION with an
1094associated Emacs version EVERSION. These versions are strings.
1095For example, the MH-E package updates this alist with the
1096following:
1097
1098 (add-to-list 'customize-package-emacs-version-alist
1099 '(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\")
1100 (\"7.0\" . \"22.1\") (\"7.1\" . \"22.1\")
1101 (\"7.2\" . \"22.1\") (\"7.3\" . \"22.1\")
1102 (\"7.4\" . \"22.1\") (\"8.0\" . \"22.1\")))
1103
1104The value of PACKAGE needs to be unique and it needs to match the
1105PACKAGE value appearing in the :package-version keyword. Since
1106the user might see the value in a error message, a good choice is
1107the official name of the package, such as MH-E or Gnus.")
1093 1108
1094;;;###autoload 1109;;;###autoload
1095(defalias 'customize-changed 'customize-changed-options) 1110(defalias 'customize-changed 'customize-changed-options)
@@ -1154,7 +1169,7 @@ that were added or redefined since that version."
1154 1169
1155(defun customize-package-emacs-version (symbol package-version) 1170(defun customize-package-emacs-version (symbol package-version)
1156 "Return Emacs version of SYMBOL. 1171 "Return Emacs version of SYMBOL.
1157PACKAGE-VERSION has the form (PACKAGE VERSION). The VERSION of 1172PACKAGE-VERSION has the form (PACKAGE . VERSION). The VERSION of
1158PACKAGE is looked up in the associated list 1173PACKAGE is looked up in the associated list
1159`customize-package-emacs-version-alist' to find the version of 1174`customize-package-emacs-version-alist' to find the version of
1160Emacs that is associated with it." 1175Emacs that is associated with it."
@@ -1167,9 +1182,10 @@ Emacs that is associated with it."
1167 ((setq package-versions (assq (car package-version) 1182 ((setq package-versions (assq (car package-version)
1168 customize-package-emacs-version-alist)) 1183 customize-package-emacs-version-alist))
1169 (setq emacs-version 1184 (setq emacs-version
1170 (cadr (assoc (cadr package-version) package-versions))) 1185 (cdr (assoc (cdr package-version) package-versions)))
1171 (unless emacs-version 1186 (unless emacs-version
1172 (message "Package version of %s not found in %s" symbol 1187 (message "%s version %s not found in %s" symbol
1188 (cdr package-version)
1173 "customize-package-emacs-version-alist"))) 1189 "customize-package-emacs-version-alist")))
1174 (t 1190 (t
1175 (message "Package %s neglected to update %s" 1191 (message "Package %s neglected to update %s"
diff --git a/lisp/custom.el b/lisp/custom.el
index cd97b425038..2ac1e23ac49 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -272,11 +272,14 @@ The following common keywords are also meaningful.
272 first introduced, or its default value was changed, in Emacs 272 first introduced, or its default value was changed, in Emacs
273 version VERSION. 273 version VERSION.
274:package-version 274:package-version
275 VALUE should be a list with the form (PACKAGE VERSION) 275 VALUE should be a list with the form (PACKAGE . VERSION)
276 specifying that the variable was first introduced, or its 276 specifying that the variable was first introduced, or its
277 default value was changed, in PACKAGE version VERSION. This 277 default value was changed, in PACKAGE version VERSION. This
278 keyword takes priority over :version. The PACKAGE and VERSION 278 keyword takes priority over :version. The PACKAGE and VERSION
279 must appear in the alist `customize-package-emacs-version-alist'. 279 must appear in the alist `customize-package-emacs-version-alist'.
280 Since PACKAGE must be unique and the user might see it in an
281 error message, a good choice is the official name of the
282 package, such as MH-E or Gnus.
280:tag LABEL 283:tag LABEL
281 Use LABEL, a string, instead of the item's name, to label the item 284 Use LABEL, a string, instead of the item's name, to label the item
282 in customization menus and buffers. 285 in customization menus and buffers.