diff options
| author | Markus Rost | 2003-01-07 18:33:18 +0000 |
|---|---|---|
| committer | Markus Rost | 2003-01-07 18:33:18 +0000 |
| commit | 1669290db324b87d1aaebc7d10f9ac2bcd4fefeb (patch) | |
| tree | e4b38a5957eff6b7692a5f9393d6af9268e19991 /lisp | |
| parent | 6a3a24fa11d656b6d6db9f2063fdb826b8c596b5 (diff) | |
| download | emacs-1669290db324b87d1aaebc7d10f9ac2bcd4fefeb.tar.gz emacs-1669290db324b87d1aaebc7d10f9ac2bcd4fefeb.zip | |
(custom-autoload, custom-variable-p): New functions.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/custom.el | 11 |
1 files changed, 11 insertions, 0 deletions
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." | |||
| 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 | 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))) | ||
| 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 | ||