[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/custom.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/custom.el |
Date: |
Mon, 05 Sep 2005 15:50:04 -0400 |
Index: emacs/lisp/custom.el
diff -c emacs/lisp/custom.el:1.100 emacs/lisp/custom.el:1.101
*** emacs/lisp/custom.el:1.100 Sun Sep 4 18:00:43 2005
--- emacs/lisp/custom.el Mon Sep 5 19:50:02 2005
***************
*** 583,589 ****
(defvar custom-known-themes '(user standard)
"Themes that have been defined with `deftheme'.
The default value is the list (user standard). The theme `standard'
! contains the Emacs standard settings from the original Lisp files. The
theme `user' contains all the settings the user customized and saved.
Additional themes declared with the `deftheme' macro will be added to
the front of this list.")
--- 583,589 ----
(defvar custom-known-themes '(user standard)
"Themes that have been defined with `deftheme'.
The default value is the list (user standard). The theme `standard'
! contains the settings before custom themes are applied. The
theme `user' contains all the settings the user customized and saved.
Additional themes declared with the `deftheme' macro will be added to
the front of this list.")
***************
*** 649,654 ****
--- 649,664 ----
(progn
(setcar (cdr setting) mode)
(setcar (cddr setting) value))
+ (if (null old)
+ (setq old
+ (list
+ (list 'standard 'set
+ (if (eq prop 'theme-value)
+ (symbol-value symbol)
+ (list
+ (append
+ '(t)
+ (custom-face-attributes-get symbol nil))))))))
(put symbol prop (cons (list theme mode value) old)))
;; Record, for each theme, all its settings.
(put theme 'theme-settings
***************
*** 1117,1123 ****
(let* ((prop (car s))
(symbol (cadr s))
(spec-list (get symbol prop)))
! (put symbol 'theme-value (assq-delete-all theme spec-list))
(if (eq prop 'theme-value)
(custom-theme-recalc-variable symbol)
(custom-theme-recalc-face symbol)))))
--- 1127,1133 ----
(let* ((prop (car s))
(symbol (cadr s))
(spec-list (get symbol prop)))
! (put symbol prop (assq-delete-all theme spec-list))
(if (eq prop 'theme-value)
(custom-theme-recalc-variable symbol)
(custom-theme-recalc-face symbol)))))
***************
*** 1156,1168 ****
(if theme-value
(custom-theme-value (car (car theme-value)) theme-value))))
- (defun custom-face-theme-value (face)
- "Return the face spec of FACE according to currently enabled custom themes.
- This function returns nil if no custom theme specifies anything for FACE."
- (let* ((theme-value (get face 'theme-face)))
- (if theme-value
- (custom-theme-value (car (car theme-value)) theme-value))))
-
(defun custom-theme-recalc-variable (variable)
"Set VARIABLE according to currently enabled custom themes."
(let ((valspec (custom-variable-theme-value variable)))
--- 1166,1171 ----
***************
*** 1177,1192 ****
(defun custom-theme-recalc-face (face)
"Set FACE according to currently enabled custom themes."
! (let ((spec (custom-face-theme-value face)))
! (when spec
! (put face 'save-face spec))
! (unless spec
! (setq spec (get face 'face-defface-spec)))
! (when spec
! (when (or (get face 'force-face) (facep face))
! (unless (facep face)
! (make-empty-face face))
! (face-spec-set face spec)))))
(defun custom-theme-reset-variables (theme &rest args)
"Reset the specs in THEME of some variables to their values in other themes.
--- 1180,1188 ----
(defun custom-theme-recalc-face (face)
"Set FACE according to currently enabled custom themes."
! (let ((theme-faces (reverse (get face 'theme-face))))
! (dolist (spec theme-faces)
! (face-spec-set face (car (cddr spec))))))
(defun custom-theme-reset-variables (theme &rest args)
"Reset the specs in THEME of some variables to their values in other themes.