comparison lisp/custom.el @ 64149:8633ed45b13c

(custom-variable-p): Make it recursively follow aliases. Mention that in the docstring.
author Luc Teirlinck <teirllm@auburn.edu>
date Thu, 07 Jul 2005 23:12:43 +0000
parents 6fb026ad601f
children 25277c60733f
comparison
equal deleted inserted replaced
64148:a77d510ff94d 64149:8633ed45b13c
516 (put symbol 'custom-autoload t) 516 (put symbol 'custom-autoload t)
517 (custom-add-load symbol load)) 517 (custom-add-load symbol load))
518 518
519 ;; This test is also in the C code of `user-variable-p'. 519 ;; This test is also in the C code of `user-variable-p'.
520 (defun custom-variable-p (variable) 520 (defun custom-variable-p (variable)
521 "Return non-nil if VARIABLE is a custom variable." 521 "Return non-nil if VARIABLE is a custom variable.
522 This recursively follows aliases."
523 (setq variable (indirect-variable variable))
522 (or (get variable 'standard-value) 524 (or (get variable 'standard-value)
523 (get variable 'custom-autoload))) 525 (get variable 'custom-autoload)))
524 526
525 ;;; Loading files needed to customize a symbol. 527 ;;; Loading files needed to customize a symbol.
526 ;;; This is in custom.el because menu-bar.el needs it for toggle cmds. 528 ;;; This is in custom.el because menu-bar.el needs it for toggle cmds.