aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/faces.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el52
1 files changed, 40 insertions, 12 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index c54e76a4d44..1791a5a2dca 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1,6 +1,6 @@
1;;; faces.el --- Lisp faces 1;;; faces.el --- Lisp faces
2 2
3;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004 3;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004,2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -231,8 +231,8 @@ of a face name is the same for all frames."
231(defun face-equal (face1 face2 &optional frame) 231(defun face-equal (face1 face2 &optional frame)
232 "Non-nil if faces FACE1 and FACE2 are equal. 232 "Non-nil if faces FACE1 and FACE2 are equal.
233Faces are considered equal if all their attributes are equal. 233Faces are considered equal if all their attributes are equal.
234If the optional argument FRAME is given, report on face FACE in that frame. 234If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame.
235If FRAME is t, report on the defaults for face FACE (for new frames). 235If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames).
236If FRAME is omitted or nil, use the selected frame." 236If FRAME is omitted or nil, use the selected frame."
237 (internal-lisp-face-equal-p face1 face2 frame)) 237 (internal-lisp-face-equal-p face1 face2 frame))
238 238
@@ -854,6 +854,8 @@ If MULTIPLE is non-nil, return a list of faces (possibly only one).
854Otherwise, return a single face." 854Otherwise, return a single face."
855 (let ((faceprop (or (get-char-property (point) 'read-face-name) 855 (let ((faceprop (or (get-char-property (point) 'read-face-name)
856 (get-char-property (point) 'face))) 856 (get-char-property (point) 'face)))
857 (aliasfaces nil)
858 (nonaliasfaces nil)
857 faces) 859 faces)
858 ;; Make a list of the named faces that the `face' property uses. 860 ;; Make a list of the named faces that the `face' property uses.
859 (if (and (listp faceprop) 861 (if (and (listp faceprop)
@@ -870,6 +872,13 @@ Otherwise, return a single face."
870 (memq (intern-soft (thing-at-point 'symbol)) (face-list))) 872 (memq (intern-soft (thing-at-point 'symbol)) (face-list)))
871 (setq faces (list (intern-soft (thing-at-point 'symbol))))) 873 (setq faces (list (intern-soft (thing-at-point 'symbol)))))
872 874
875 ;; Build up the completion tables.
876 (mapatoms (lambda (s)
877 (if (custom-facep s)
878 (if (get s 'face-alias)
879 (push (symbol-name s) aliasfaces)
880 (push (symbol-name s) nonaliasfaces)))))
881
873 ;; If we only want one, and the default is more than one, 882 ;; If we only want one, and the default is more than one,
874 ;; discard the unwanted ones now. 883 ;; discard the unwanted ones now.
875 (unless multiple 884 (unless multiple
@@ -883,7 +892,7 @@ Otherwise, return a single face."
883 (if faces (mapconcat 'symbol-name faces ", ") 892 (if faces (mapconcat 'symbol-name faces ", ")
884 string-describing-default)) 893 string-describing-default))
885 (format "%s: " prompt)) 894 (format "%s: " prompt))
886 obarray 'custom-facep t)) 895 (complete-in-turn nonaliasfaces aliasfaces) nil t))
887 ;; Canonicalize the output. 896 ;; Canonicalize the output.
888 (output 897 (output
889 (if (equal input "") 898 (if (equal input "")
@@ -1894,7 +1903,7 @@ created."
1894;; Make `modeline' an alias for `mode-line', for compatibility. 1903;; Make `modeline' an alias for `mode-line', for compatibility.
1895(put 'modeline 'face-alias 'mode-line) 1904(put 'modeline 'face-alias 'mode-line)
1896(put 'modeline-inactive 'face-alias 'mode-line-inactive) 1905(put 'modeline-inactive 'face-alias 'mode-line-inactive)
1897(put 'modeline-higilight 'face-alias 'mode-line-highlight) 1906(put 'modeline-highlight 'face-alias 'mode-line-highlight)
1898 1907
1899(defface header-line 1908(defface header-line
1900 '((default 1909 '((default
@@ -2115,13 +2124,32 @@ Note: Other faces cannot inherit from the cursor face."
2115 :group 'whitespace ; like `show-trailing-whitespace' 2124 :group 'whitespace ; like `show-trailing-whitespace'
2116 :group 'basic-faces) 2125 :group 'basic-faces)
2117 2126
2118(defface escape-glyph '((((background dark)) :foreground "cyan") 2127(defface escape-glyph
2119 ;; See the comment in minibuffer-prompt for 2128 '((((background dark)) :foreground "pink2")
2120 ;; the reason not to use blue on MS-DOS. 2129 ;; See the comment in minibuffer-prompt for
2121 (((type pc)) :foreground "magenta") 2130 ;; the reason not to use blue on MS-DOS.
2122 (t :foreground "blue")) 2131 (((type pc)) :foreground "magenta")
2132 ;; red4 is too light -- rms.
2133 (t :foreground "blue"))
2123 "Face for characters displayed as ^-sequences or \-sequences." 2134 "Face for characters displayed as ^-sequences or \-sequences."
2124 :group 'basic-faces) 2135 :group 'basic-faces
2136 :version "22.1")
2137
2138(defface no-break-space
2139 '((((class color) (min-colors 88)) :inherit escape-glyph :underline t)
2140 (((class color) (min-colors 8)) :background "magenta" :foreground )
2141 (t :inverse-video t))
2142 "Face for non-breaking space."
2143 :group 'basic-faces
2144 :version "22.1")
2145
2146(defface shadow
2147 '((((background dark)) :foreground "grey70")
2148 (((background light)) :foreground "grey50"))
2149 "Basic face for shadowed text."
2150 :group 'basic-faces
2151 :version "22.1")
2152
2125 2153
2126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2127;;; Manipulating font names. 2155;;; Manipulating font names.
@@ -2301,5 +2329,5 @@ If that can't be done, return nil."
2301 2329
2302(provide 'faces) 2330(provide 'faces)
2303 2331
2304;;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6 2332;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6
2305;;; faces.el ends here 2333;;; faces.el ends here