diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2012-04-09 12:51:06 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-04-09 12:51:06 -0700 |
| commit | 9f46df23a3d01f82a24f2a3dd8730f0263fa9fde (patch) | |
| tree | e10467a42658a374d5cdb7bb25fc94016abdad7a /lisp/custom.el | |
| parent | b8df54ffbefc5ddf40ddcda68a2a682769c5833d (diff) | |
| parent | a130c2afed5e7d5ec10efa1a57f4de2461a9c778 (diff) | |
| download | emacs-9f46df23a3d01f82a24f2a3dd8730f0263fa9fde.tar.gz | |
Merge from trunk; add Bug#.
Diffstat (limited to 'lisp/custom.el')
| -rw-r--r-- | lisp/custom.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index bffd30bff21..d8909f8be92 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -599,15 +599,17 @@ If NOSET is non-nil, don't bother autoloading LOAD when setting the variable." (put symbol 'custom-autoload (if noset 'noset t)) (custom-add-load symbol load)) -;; This test is also in the C code of `user-variable-p'. (defun custom-variable-p (variable) "Return non-nil if VARIABLE is a customizable variable. A customizable variable is either (i) a variable whose property list contains a non-nil `standard-value' or `custom-autoload' property, or (ii) an alias for another customizable variable." - (setq variable (indirect-variable variable)) - (or (get variable 'standard-value) - (get variable 'custom-autoload))) + (when (symbolp variable) + (setq variable (indirect-variable variable)) + (or (get variable 'standard-value) + (get variable 'custom-autoload)))) + +(define-obsolete-function-alias 'user-variable-p 'custom-variable-p "24.2") (defun custom-note-var-changed (variable) "Inform Custom that VARIABLE has been set (changed). |
