Mercurial > hg > xemacs-beta
diff lisp/custom.el @ 5787:10395934b99e
Add :risky and :safe options to defcustom.
2014-01-27 Michael Sperber <mike@xemacs.org>
* custom.el (custom-declare-variable, defcustom): Add :risky and
:safe options
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Mon, 27 Jan 2014 17:41:46 +0100 |
parents | 4dee0387b9de |
children | 7b42a97af782 |
line wrap: on
line diff
--- a/lisp/custom.el Thu Jan 23 15:03:16 2014 +0000 +++ b/lisp/custom.el Mon Jan 27 17:41:46 2014 +0100 @@ -178,6 +178,10 @@ (put symbol 'custom-get value)) ((eq keyword :require) (push value requests)) + ((eq keyword :risky) + (put symbol 'risky-local-variable value)) + ((eq keyword :safe) + (put symbol 'safe-local-variable value)) ((eq keyword :type) (put symbol 'custom-type value)) ((eq keyword :options) @@ -264,6 +268,8 @@ VALUE should be a feature symbol. If you save a value for this option, then when your custom init file loads the value, it does (require VALUE) first. +:risky Set SYMBOL's `risky-local-variable' property to VALUE. +:safe Set SYMBOL's `safe-local-variable' property to VALUE. :version VALUE should be a string specifying that the variable was first introduced, or its default value was changed, in Emacs