aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-12-13 19:29:33 +0000
committerRichard M. Stallman2004-12-13 19:29:33 +0000
commitcf459bb7389d8b2e841a616237723197acd17a9e (patch)
treeabb9feb9c7509c61d68a32201e62a3b132ff39c8
parentc2b53d7bd469c048527051fc04c1924bb0cb7c89 (diff)
downloademacs-cf459bb7389d8b2e841a616237723197acd17a9e.tar.gz
emacs-cf459bb7389d8b2e841a616237723197acd17a9e.zip
(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 9370440145a..55ed31fa6b0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1334,21 +1334,29 @@ If SPEC is nil, return nil."
1334 (unless frame 1334 (unless frame
1335 (setq frame (selected-frame))) 1335 (setq frame (selected-frame)))
1336 (let ((tail spec) 1336 (let ((tail spec)
1337 result all) 1337 result defaults)
1338 (while tail 1338 (while tail
1339 (let* ((entry (pop tail)) 1339 (let* ((entry (pop tail))
1340 (display (car entry)) 1340 (display (car entry))
1341 (attrs (cdr entry))) 1341 (attrs (cdr entry))
1342 (when (face-spec-set-match-display display frame) 1342 thisval)
1343 (setq result (if (null (cdr attrs)) ;; was (listp (car attrs)) 1343 ;; Get the attributes as actually specified by this alternative.
1344 ;; Old-style entry, the attribute list is the 1344 (setq thisval
1345 ;; first element. 1345 (if (null (cdr attrs)) ;; was (listp (car attrs))
1346 (car attrs) 1346 ;; Old-style entry, the attribute list is the
1347 attrs)) 1347 ;; first element.
1348 (if (eq display t) 1348 (car attrs)
1349 (setq all result result nil) 1349 attrs))
1350
1351 ;; If the condition is `default', that sets the default
1352 ;; for following conditions.
1353 (if (eq display 'default)
1354 (setq defaults thisval)
1355 ;; Otherwise, if it matches, use it.
1356 (when (face-spec-set-match-display display frame)
1357 (setq result thisval)
1350 (setq tail nil))))) 1358 (setq tail nil)))))
1351 (if all (append result all) result))) 1359 (if defaults (append result defaults) result)))
1352 1360
1353 1361
1354(defun face-spec-reset-face (face &optional frame) 1362(defun face-spec-reset-face (face &optional frame)
@@ -1786,7 +1794,7 @@ created."
1786 :group 'basic-faces) 1794 :group 'basic-faces)
1787 1795
1788(defface mode-line-inactive 1796(defface mode-line-inactive
1789 '((t 1797 '((default
1790 :inherit mode-line) 1798 :inherit mode-line)
1791 (((type x w32 mac) (background light) (class color)) 1799 (((type x w32 mac) (background light) (class color))
1792 :weight light 1800 :weight light
@@ -1806,7 +1814,7 @@ created."
1806(put 'modeline-inactive 'face-alias 'mode-line-inactive) 1814(put 'modeline-inactive 'face-alias 'mode-line-inactive)
1807 1815
1808(defface header-line 1816(defface header-line
1809 '((t 1817 '((default
1810 :inherit mode-line) 1818 :inherit mode-line)
1811 (((type tty)) 1819 (((type tty))
1812 ;; This used to be `:inverse-video t', but that doesn't look very 1820 ;; This used to be `:inverse-video t', but that doesn't look very
@@ -1842,7 +1850,7 @@ created."
1842 1850
1843 1851
1844(defface tool-bar 1852(defface tool-bar
1845 '((t 1853 '((default
1846 :box (:line-width 1 :style released-button) 1854 :box (:line-width 1 :style released-button)
1847 :foreground "black") 1855 :foreground "black")
1848 (((type x w32 mac) (class color)) 1856 (((type x w32 mac) (class color))