comparison lisp/custom.el @ 49099:04672e32e3b0

(custom-autoload, custom-variable-p): New functions.
author Markus Rost <rost@math.uni-bielefeld.de>
date Tue, 07 Jan 2003 18:33:18 +0000
parents d77bc55dd27b
children 4dd5da1ea3dc
comparison
equal deleted inserted replaced
49098:df17d939ba8b 49099:04672e32e3b0
478 "To the custom option SYMBOL add the dependency LOAD. 478 "To the custom option SYMBOL add the dependency LOAD.
479 LOAD should be either a library file name, or a feature name." 479 LOAD should be either a library file name, or a feature name."
480 (let ((loads (get symbol 'custom-loads))) 480 (let ((loads (get symbol 'custom-loads)))
481 (unless (member load loads) 481 (unless (member load loads)
482 (put symbol 'custom-loads (cons (purecopy load) loads))))) 482 (put symbol 'custom-loads (cons (purecopy load) loads)))))
483
484 (defun custom-autoload (symbol load)
485 "Mark SYMBOL as autoloaded custom variable and add dependency LOAD."
486 (put symbol 'custom-autoload t)
487 (custom-add-load symbol load))
488
489 ;; This test is also in the C code of `user-variable-p'.
490 (defun custom-variable-p (variable)
491 "Return non-nil if VARIABLE is a custom variable."
492 (or (get variable 'standard-value)
493 (get variable 'custom-autoload)))
483 494
484 ;;; Loading files needed to customize a symbol. 495 ;;; Loading files needed to customize a symbol.
485 ;;; This is in custom.el because menu-bar.el needs it for toggle cmds. 496 ;;; This is in custom.el because menu-bar.el needs it for toggle cmds.
486 497
487 (defvar custom-load-recursion nil 498 (defvar custom-load-recursion nil