From: Markus Rost Date: Tue, 7 Jan 2003 18:33:18 +0000 (+0000) Subject: (custom-autoload, custom-variable-p): New functions. X-Git-Tag: ttn-vms-21-2-B4~11786 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1669290db324b87d1aaebc7d10f9ac2bcd4fefeb;p=emacs.git (custom-autoload, custom-variable-p): New functions. --- diff --git a/lisp/custom.el b/lisp/custom.el index abf4c5356a5..a4a496c0bef 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -481,6 +481,17 @@ LOAD should be either a library file name, or a feature name." (unless (member load loads) (put symbol 'custom-loads (cons (purecopy load) loads))))) +(defun custom-autoload (symbol load) + "Mark SYMBOL as autoloaded custom variable and add dependency LOAD." + (put symbol 'custom-autoload 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 custom variable." + (or (get variable 'standard-value) + (get variable 'custom-autoload))) + ;;; Loading files needed to customize a symbol. ;;; This is in custom.el because menu-bar.el needs it for toggle cmds.