aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2004-12-13 19:29:33 +0000
committerRichard M. Stallman <[email protected]>2004-12-13 19:29:33 +0000
commitcf459bb7389d8b2e841a616237723197acd17a9e (patch)
treeabb9feb9c7509c61d68a32201e62a3b132ff39c8
parentc2b53d7bd469c048527051fc04c1924bb0cb7c89 (diff)
(header-line, mode-line-inactive, tool-bar):
Use `default' instead of t for setting the defaults. (face-spec-choose): Separate `t' from `default'.
-rw-r--r--lisp/faces.el36
1 files changed, 22 insertions, 14 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 9370440145..55ed31fa6b 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1334,21 +1334,29 @@ If SPEC is nil, return nil."
(unless frame
(setq frame (selected-frame)))
(let ((tail spec)
- result all)
+ result defaults)
(while tail
(let* ((entry (pop tail))
(display (car entry))
- (attrs (cdr entry)))
- (when (face-spec-set-match-display display frame)
- (setq result (if (null (cdr attrs)) ;; was (listp (car attrs))
- ;; Old-style entry, the attribute list is the
- ;; first element.
- (car attrs)
- attrs))
- (if (eq display t)
- (setq all result result nil)
+ (attrs (cdr entry))
+ thisval)
+ ;; Get the attributes as actually specified by this alternative.
+ (setq thisval
+ (if (null (cdr attrs)) ;; was (listp (car attrs))
+ ;; Old-style entry, the attribute list is the
+ ;; first element.
+ (car attrs)
+ attrs))
+
+ ;; If the condition is `default', that sets the default
+ ;; for following conditions.
+ (if (eq display 'default)
+ (setq defaults thisval)
+ ;; Otherwise, if it matches, use it.
+ (when (face-spec-set-match-display display frame)
+ (setq result thisval)
(setq tail nil)))))
- (if all (append result all) result)))
+ (if defaults (append result defaults) result)))
(defun face-spec-reset-face (face &optional frame)
@@ -1786,7 +1794,7 @@ created."
:group 'basic-faces)
(defface mode-line-inactive
- '((t
+ '((default
:inherit mode-line)
(((type x w32 mac) (background light) (class color))
:weight light
@@ -1806,7 +1814,7 @@ created."
(put 'modeline-inactive 'face-alias 'mode-line-inactive)
(defface header-line
- '((t
+ '((default
:inherit mode-line)
(((type tty))
;; This used to be `:inverse-video t', but that doesn't look very
@@ -1842,7 +1850,7 @@ created."
(defface tool-bar
- '((t
+ '((default
:box (:line-width 1 :style released-button)
:foreground "black")
(((type x w32 mac) (class color))