summaryrefslogtreecommitdiff
path: root/lisp/custom.el
diff options
context:
space:
mode:
authorBill Wohler <wohler@newt.com>2006-04-10 23:43:34 +0000
committerBill Wohler <wohler@newt.com>2006-04-10 23:43:34 +0000
commit4e9c705e50b4e6ee733e0134703b00253cc4cf7c (patch)
tree5d3b92a29d6c6dd057ce3f0605488a22f9ed9119 /lisp/custom.el
parent1d22fabd46ebbb3e2af5cdea011b42c7a0331463 (diff)
downloademacs-4e9c705e50b4e6ee733e0134703b00253cc4cf7c.tar.gz
emacs-4e9c705e50b4e6ee733e0134703b00253cc4cf7c.tar.bz2
emacs-4e9c705e50b4e6ee733e0134703b00253cc4cf7c.zip
* custom.el (defcustom, custom-handle-keyword): Add :package-version
keyword. (custom-add-package-version): New function. Sets value of new property 'custom-package-version from :package-version keyword. * cus-edit.el (customize-package-emacs-version-alist): New variable. (customize-changed-options): Add check for custom-package-version. (customize-package-emacs-version): New function to look up Emacs version corresponding to the given package version.
Diffstat (limited to 'lisp/custom.el')
-rw-r--r--lisp/custom.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/custom.el b/lisp/custom.el
index c67f3b06272..42872ca761c 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -268,6 +268,12 @@ The following keywords are meaningful:
VALUE should be a string specifying that the variable was
first introduced, or its default value was changed, in Emacs
version VERSION.
+:package-version
+ VALUE should be a list with the form (PACKAGE VERSION)
+ specifying that the variable was first introduced, or its
+ default value was changed, in PACKAGE version VERSION. This
+ keyword takes priority over :version. The PACKAGE and VERSION
+ must appear in the alist `customize-package-emacs-version-alist'.
:tag LABEL
Use LABEL, a string, instead of the item's name, to label the item
in customization menus and buffers.
@@ -489,6 +495,8 @@ Fourth argument TYPE is the custom option type."
(custom-add-to-group value symbol type))
((eq keyword :version)
(custom-add-version symbol value))
+ ((eq keyword :package-version)
+ (custom-add-package-version symbol value))
((eq keyword :link)
(custom-add-link symbol value))
((eq keyword :load)
@@ -540,6 +548,10 @@ For other custom types, this has no effect."
"To the custom option SYMBOL add the version VERSION."
(put symbol 'custom-version (purecopy version)))
+(defun custom-add-package-version (symbol version)
+ "To the custom option SYMBOL add the package version VERSION."
+ (put symbol 'custom-package-version (purecopy version)))
+
(defun custom-add-load (symbol load)
"To the custom option SYMBOL add the dependency LOAD.
LOAD should be either a library file name, or a feature name."