(defun face-id (face &optional frame)
"Return the internal ID of face with name FACE.
-If optional argument FRAME is nil or omitted, use the selected frame."
+The optional argument FRAME is ignored, since the internal face ID
+of a face name is the same for all frames."
(check-face face)
(get face 'face))
((member new-value '("unspecified-fg" "unspecified-bg"))
new-value)
(t
- (string-to-int new-value)))))
+ (string-to-number new-value)))))
(defun read-face-attribute (face attribute &optional frame)
(save-excursion
(save-match-data
(search-backward face-name)
+ (setq help-xref-stack-item `(list-faces-display ,regexp))
(help-xref-button 0 'help-customize-face face)))
(let ((beg (point))
(line-beg (line-beginning-position)))
(insert "Face: " (symbol-name f))
(if (not (facep f))
(insert " undefined face.\n")
- (let ((customize-label "customize this face"))
+ (let ((customize-label "customize this face")
+ file-name)
(princ (concat " (" customize-label ")\n"))
(insert "Documentation: "
(or (face-documentation f)
"Not documented as a face.")
- "\n\n")
+ "\n")
(with-current-buffer standard-output
(save-excursion
(re-search-backward
(concat "\\(" customize-label "\\)") nil t)
(help-xref-button 1 'help-customize-face f)))
+ ;; The next 4 sexps are copied from describe-function-1
+ ;; and simplified.
+ (setq file-name (symbol-file f 'defface))
+ (when file-name
+ (princ "Defined in `")
+ (princ file-name)
+ (princ "'")
+ ;; Make a hyperlink to the library.
+ (save-excursion
+ (re-search-backward "`\\([^`']+\\)'" nil t)
+ (help-xref-button 1 'help-face-def f file-name))
+ (princ ".")
+ (terpri)
+ (terpri))
(dolist (a attrs)
(let ((attr (face-attribute f (car a) frame)))
(insert (make-string (- max-width (length (cdr a))) ?\ )
:box (:line-width -1 :color "grey40" :style nil)
:foreground "grey80" :background "grey30"))
"Basic mode line face for non-selected windows."
- :version "21.4"
+ :version "22.1"
+ :group 'modeline
+ :group 'basic-faces)
+
+(defface mode-line-highlight
+ '((((class color) (min-colors 88) (background light))
+ :background "RoyalBlue4" :foreground "white")
+ (((class color) (min-colors 88) (background dark))
+ :background "light sky blue" :foreground "black")
+ (t
+ :inverse-video t))
+ "Basic mode line face for highlighting."
+ :version "22.1"
:group 'modeline
:group 'basic-faces)
;; Make `modeline' an alias for `mode-line', for compatibility.
(put 'modeline 'face-alias 'mode-line)
(put 'modeline-inactive 'face-alias 'mode-line-inactive)
+(put 'modeline-higilight 'face-alias 'mode-line-highlight)
(defface header-line
'((default
(defface minibuffer-prompt '((((background dark)) :foreground "cyan")
+ ;; Don't use blue because many users of
+ ;; the MS-DOS port customize their
+ ;; foreground color to be blue.
(((type pc)) :foreground "magenta")
(t :foreground "dark blue"))
"Face for minibuffer prompts."
- :version "21.4"
+ :version "22.1"
:group 'basic-faces)
(setq minibuffer-prompt-properties
(defface secondary-selection
'((((class color) (min-colors 88) (background light))
- :background "yellow")
+ :background "yellow1")
(((class color) (min-colors 88) (background dark))
:background "SkyBlue4")
(((class color) (min-colors 16) (background light))
(defface trailing-whitespace
'((((class color) (background light))
- :background "red")
+ :background "red1")
(((class color) (background dark))
- :background "red")
+ :background "red1")
(t :inverse-video t))
"Basic face for highlighting trailing whitespace."
:version "21.1"
- :group 'font-lock ; like `show-trailing-whitespace'
+ :group 'whitespace ; like `show-trailing-whitespace'
:group 'basic-faces)
(defface escape-glyph '((((background dark)) :foreground "cyan")
+ ;; See the comment in minibuffer-prompt for
+ ;; the reason not to use blue on MS-DOS.
(((type pc)) :foreground "magenta")
(t :foreground "blue"))
"Face for characters displayed as ^-sequences or \-sequences."