Changeset 4131 for trunk/lisp/custom.el
- Timestamp:
- 07/29/06 07:48:34 (2 years ago)
- Files:
-
- trunk/lisp/custom.el (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/custom.el
r4085 r4131 559 559 (put symbol 'custom-loads (cons (purecopy load) loads))))) 560 560 561 (defun custom-autoload (symbol load) 562 "Mark SYMBOL as autoloaded custom variable and add dependency LOAD." 563 (put symbol 'custom-autoload t) 561 (defun custom-autoload (symbol load &optional noset) 562 "Mark SYMBOL as autoloaded custom variable and add dependency LOAD. 563 If NOSET is non-nil, don't bother autoloading LOAD when setting the variable." 564 (put symbol 'custom-autoload (if noset 'noset t)) 564 565 (custom-add-load symbol load)) 565 566 … … 700 701 (old (or (get symbol 'saved-value) (get symbol 'standard-value)))) 701 702 ;; Mark default value as set iff different from old value. 702 (if ( or (null old)703 (not(equal value (condition-case nil704 (eval (car old))705 (error nil)))))703 (if (not (and old 704 (equal value (condition-case nil 705 (eval (car old)) 706 (error nil))))) 706 707 (progn (put symbol 'customized-value (list (custom-quote value))) 707 708 (custom-push-theme 'theme-value symbol 'user 'set … … 828 829 (boundp symbol)) 829 830 (let ((sv (get symbol 'standard-value))) 830 (when (and (null sv) (custom-variable-p symbol)) 831 (custom-load-symbol symbol) 832 (setq sv (get symbol 'standard-value))) 833 (if (or (null sv) 834 (not (equal (eval (car (get symbol 'standard-value))) 835 (symbol-value symbol)))) 836 (setq old (list (list 'changed (symbol-value symbol)))))) 831 (unless (and sv 832 (equal (eval (car sv)) (symbol-value symbol))) 833 (setq old (list (list 'changed (symbol-value symbol)))))) 837 834 (if (and (facep symbol) 838 835 (not (face-spec-match-p symbol (get symbol 'face-defface-spec)))) … … 908 905 (put symbol 'custom-requests requests) 909 906 (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)) 910 911 (setq set (or (get symbol 'custom-set) 'custom-set-default)) 911 912 (put symbol 'saved-value (list value)) … … 927 928 (and (or now (default-boundp symbol)) 928 929 (put symbol 'variable-comment comment))) 930 ;; I believe this is dead-code, because the `sort' code above would 931 ;; have burped before we could get here. --Stef 929 932 ;; Old format, a plist of SYMBOL VALUE pairs. 930 933 (message "Warning: old format `custom-set-variables'")
