diff options
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 | ||