diff options
| author | Stefan Monnier | 2006-08-31 17:10:34 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-08-31 17:10:34 +0000 |
| commit | 9277ee6cd2d7dc83bcb6ca7d18f34e4a267de27f (patch) | |
| tree | 77e225b2c89ae5dd21e6dfc4f05321f9f03f53ec /lisp/custom.el | |
| parent | 05c4a38a2505b7b0534373017faddfb8d472e9e3 (diff) | |
| download | emacs-9277ee6cd2d7dc83bcb6ca7d18f34e4a267de27f.tar.gz emacs-9277ee6cd2d7dc83bcb6ca7d18f34e4a267de27f.zip | |
(custom-theme-set-variables): Autoload packages before sorting the variables.
Diffstat (limited to 'lisp/custom.el')
| -rw-r--r-- | lisp/custom.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 2e5c0a59d9b..104e63126f0 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -874,6 +874,18 @@ COMMENT is a comment string about SYMBOL. | |||
| 874 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and | 874 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and |
| 875 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | 875 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." |
| 876 | (custom-check-theme theme) | 876 | (custom-check-theme theme) |
| 877 | |||
| 878 | ;; Process all the needed autoloads before anything else, so that the | ||
| 879 | ;; subsequent code has all the info it needs (e.g. which var corresponds | ||
| 880 | ;; to a minor mode), regardless of the ordering of the variables. | ||
| 881 | (dolist (entry args) | ||
| 882 | (let* ((symbol (indirect-variable (nth 0 entry)))) | ||
| 883 | (unless (or (get symbol 'standard-value) | ||
| 884 | (memq (get symbol 'custom-autoload) '(nil noset))) | ||
| 885 | ;; This symbol needs to be autoloaded, even just for a `set'. | ||
| 886 | (custom-load-symbol symbol)))) | ||
| 887 | |||
| 888 | ;; Move minor modes and variables with explicit requires to the end. | ||
| 877 | (setq args | 889 | (setq args |
| 878 | (sort args | 890 | (sort args |
| 879 | (lambda (a1 a2) | 891 | (lambda (a1 a2) |
| @@ -904,10 +916,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | |||
| 904 | (when requests | 916 | (when requests |
| 905 | (put symbol 'custom-requests requests) | 917 | (put symbol 'custom-requests requests) |
| 906 | (mapc 'require requests)) | 918 | (mapc 'require requests)) |
| 907 | (unless (or (get symbol 'standard-value) | ||
| 908 | (memq (get symbol 'custom-autoload) '(nil noset))) | ||
| 909 | ;; This symbol needs to be autoloaded, even just for a `set'. | ||
| 910 | (custom-load-symbol symbol)) | ||
| 911 | (setq set (or (get symbol 'custom-set) 'custom-set-default)) | 919 | (setq set (or (get symbol 'custom-set) 'custom-set-default)) |
| 912 | (put symbol 'saved-value (list value)) | 920 | (put symbol 'saved-value (list value)) |
| 913 | (put symbol 'saved-variable-comment comment) | 921 | (put symbol 'saved-variable-comment comment) |