comparison lisp/custom.el @ 90599:c358d0861b16

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 414-422) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 128-130) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-108
author Miles Bader <miles@gnu.org>
date Tue, 05 Sep 2006 02:54:22 +0000
parents 8a8e69664178 2da08bd76792
children bb0e318b7c53
comparison
equal deleted inserted replaced
90598:4a8681a3d827 90599:c358d0861b16
872 COMMENT is a comment string about SYMBOL. 872 COMMENT is a comment string about SYMBOL.
873 873
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)
880 (let* ((sym1 (car a1)) 892 (let* ((sym1 (car a1))
881 (sym2 (car a2)) 893 (sym2 (car a2))
902 (comment (nth 4 entry)) 914 (comment (nth 4 entry))
903 set) 915 set)
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)
914 (custom-push-theme 'theme-value symbol theme 'set value) 922 (custom-push-theme 'theme-value symbol theme 'set value)
915 ;; Allow for errors in the case where the setter has 923 ;; Allow for errors in the case where the setter has