diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-08-31 17:10:34 +0000 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-08-31 17:10:34 +0000 |
| commit | 9277ee6cd2d7dc83bcb6ca7d18f34e4a267de27f (patch) | |
| tree | 77e225b2c89ae5dd21e6dfc4f05321f9f03f53ec /lisp/custom.el | |
| parent | 05c4a38a2505b7b0534373017faddfb8d472e9e3 (diff) | |
| download | emacs-9277ee6cd2d7dc83bcb6ca7d18f34e4a267de27f.tar.gz | |
(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. EXP itself is saved unevaluated as SYMBOL property `saved-value' and in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (custom-check-theme theme) + + ;; Process all the needed autoloads before anything else, so that the + ;; subsequent code has all the info it needs (e.g. which var corresponds + ;; to a minor mode), regardless of the ordering of the variables. + (dolist (entry args) + (let* ((symbol (indirect-variable (nth 0 entry)))) + (unless (or (get symbol 'standard-value) + (memq (get symbol 'custom-autoload) '(nil noset))) + ;; This symbol needs to be autoloaded, even just for a `set'. + (custom-load-symbol symbol)))) + + ;; Move minor modes and variables with explicit requires to the end. (setq args (sort args (lambda (a1 a2) @@ -904,10 +916,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (when requests (put symbol 'custom-requests requests) (mapc 'require requests)) - (unless (or (get symbol 'standard-value) - (memq (get symbol 'custom-autoload) '(nil noset))) - ;; This symbol needs to be autoloaded, even just for a `set'. - (custom-load-symbol symbol)) (setq set (or (get symbol 'custom-set) 'custom-set-default)) (put symbol 'saved-value (list value)) (put symbol 'saved-variable-comment comment) |
