# HG changeset patch # User Mike Sperber # Date 1390840906 -3600 # Node ID 10395934b99efc079f15a3a1bcc280b598dbc118 # Parent 6355de501637068fe0e77e23640d3763708b285f Add :risky and :safe options to defcustom. 2014-01-27 Michael Sperber * custom.el (custom-declare-variable, defcustom): Add :risky and :safe options diff -r 6355de501637 -r 10395934b99e lisp/ChangeLog --- a/lisp/ChangeLog Thu Jan 23 15:03:16 2014 +0000 +++ b/lisp/ChangeLog Mon Jan 27 17:41:46 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-27 Michael Sperber + + * custom.el (custom-declare-variable, defcustom): Add :risky and + :safe options + 2013-12-30 Byrel Mitchell * menubar.el (add-menu-item-1, delete-menu-item): Do not assume diff -r 6355de501637 -r 10395934b99e lisp/custom.el --- 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