]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
(goto-address-mail-regexp): Allow = in username.
[gnu-emacs] / lisp / faces.el
index 93fd4204351eb02a44be845a2260e9c0756f5d7b..d2ae90805f2c70680765775efd226b6566f9dda1 100644 (file)
@@ -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)
@@ -1775,7 +1783,7 @@ created."
 
 
 (defface mode-line
-  '((((type x w32 mac) (class color))
+  '((((class color) (min-colors 88))
      :box (:line-width -1 :style released-button)
      :background "grey75" :foreground "black")
     (t
@@ -1786,13 +1794,13 @@ created."
   :group 'basic-faces)
 
 (defface mode-line-inactive
-  '((t
+  '((default
      :inherit mode-line)
-    (((type x w32 mac) (background light) (class color))
+    (((class color) (min-colors 88) (background light))
      :weight light
      :box (:line-width -1 :color "grey75" :style nil)
      :foreground "grey20" :background "grey90")
-    (((type x w32 mac) (background dark) (class color))
+    (((class color) (min-colors 88) (background dark) )
      :weight light
      :box (:line-width -1 :color "grey40" :style nil)
      :foreground "grey80" :background "grey30"))
@@ -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))
@@ -2021,15 +2029,11 @@ Note: Other faces cannot inherit from the cursor face."
   :group 'font-lock                    ; like `show-trailing-whitespace'
   :group 'basic-faces)
 
-
-(defface glyph
-  '((t
-     :inherit secondary-selection))
-  "Basic face for displaying \\ and ^ in multichar glyphs.
-It is also used for ... in ellipses."
+(defface escape-glyph '((((background dark)) :foreground "cyan")
+                       (((type pc)) :foreground "magenta")
+                       (t :foreground "blue"))
+  "Face for characters displayed as ^-sequences or \-sequences."
   :group 'basic-faces)
-
-
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Manipulating font names.