comparison 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
comparison
equal deleted inserted replaced
5786:6355de501637 5787:10395934b99e
176 (put symbol 'custom-set value)) 176 (put symbol 'custom-set value))
177 ((eq keyword :get) 177 ((eq keyword :get)
178 (put symbol 'custom-get value)) 178 (put symbol 'custom-get value))
179 ((eq keyword :require) 179 ((eq keyword :require)
180 (push value requests)) 180 (push value requests))
181 ((eq keyword :risky)
182 (put symbol 'risky-local-variable value))
183 ((eq keyword :safe)
184 (put symbol 'safe-local-variable value))
181 ((eq keyword :type) 185 ((eq keyword :type)
182 (put symbol 'custom-type value)) 186 (put symbol 'custom-type value))
183 ((eq keyword :options) 187 ((eq keyword :options)
184 (if (get symbol 'custom-options) 188 (if (get symbol 'custom-options)
185 ;; Slow safe code to avoid duplicates. 189 ;; Slow safe code to avoid duplicates.
262 is that right? 266 is that right?
263 :require 267 :require
264 VALUE should be a feature symbol. If you save a value 268 VALUE should be a feature symbol. If you save a value
265 for this option, then when your custom init file loads the value, 269 for this option, then when your custom init file loads the value,
266 it does (require VALUE) first. 270 it does (require VALUE) first.
271 :risky Set SYMBOL's `risky-local-variable' property to VALUE.
272 :safe Set SYMBOL's `safe-local-variable' property to VALUE.
267 :version 273 :version
268 VALUE should be a string specifying that the variable was 274 VALUE should be a string specifying that the variable was
269 first introduced, or its default value was changed, in Emacs 275 first introduced, or its default value was changed, in Emacs
270 version VERSION. 276 version VERSION.
271 :tag LABEL 277 :tag LABEL