Add :risky and :safe options to defcustom

Michael Sperber <[email protected]>
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
This is a synch from GNU Emacs, used by some 3rd-party Elisp code.  Will
push Wednesday if nobody objects.

-- 
Regards,
Mike

diff --git a/lisp/custom.el b/lisp/custom.el
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -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

_______________________________________________
XEmacs-Patches mailing list
[email protected]
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.