]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-theme-set-variables): Autoload packages before sorting the variables.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 31 Aug 2006 17:10:34 +0000 (17:10 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 31 Aug 2006 17:10:34 +0000 (17:10 +0000)
lisp/ChangeLog
lisp/custom.el

index 4d8887a0d598a468dcae3f2bb947f0dae424dab9..f0246673db1f88eae2d492779f69e134a4fbb3b0 100644 (file)
@@ -1,9 +1,14 @@
+2006-08-31  Michael Mauger  <mmaug@yahoo.com>
+
+       * custom.el (custom-theme-set-variables): Autoload packages before
+       sorting the variables.
+
 2006-08-30  Michael Kifer  <kifer@cs.stonybrook.edu>
-       
-       * viper-cmd.el (viper-special-read-and-insert-char): convert events to
+
+       * viper-cmd.el (viper-special-read-and-insert-char): Convert events to
        chars if XEmacs.
-       (viper-after-change-undo-hook): check if undo-in-progress is bound.
-       
+       (viper-after-change-undo-hook): Check if undo-in-progress is bound.
+
 2006-08-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/python.el (python-eldoc-function): Re-enable quit while
index 2e5c0a59d9b48c5ae9ea7184be34e04a71bce5c2..104e63126f09d0a856505d394ce0ff6f09efec7f 100644 (file)
@@ -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)