# HG changeset patch # User Markus Rost # Date 1041964398 0 # Node ID 04672e32e3b0da4e333c1d3a03f8e540f4b6999e # Parent df17d939ba8b9eb2f076f87fc6769af7069b35cb (custom-autoload, custom-variable-p): New functions. diff -r df17d939ba8b -r 04672e32e3b0 lisp/custom.el --- a/lisp/custom.el Tue Jan 07 17:53:56 2003 +0000 +++ b/lisp/custom.el Tue Jan 07 18:33:18 2003 +0000 @@ -481,6 +481,17 @@ (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.