]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
Install a change I forgot to install at the last committing.
[gnu-emacs] / lisp / faces.el
index 1a868b4537c1434950a42b832a6d2f1493dc301a..27905af734cc86c546b4db6d089f33a6ce65f84f 100644 (file)
@@ -225,7 +225,8 @@ Value is FACE."
 
 (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))
 
@@ -1013,7 +1014,7 @@ name of the attribute for prompting.  Value is the new attribute value."
          ((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)
@@ -1183,6 +1184,7 @@ arg, prompt for a regular expression."
          (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)))
@@ -1256,17 +1258,32 @@ If FRAME is omitted or nil, use the selected frame."
          (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))) ?\ )
@@ -1826,9 +1843,22 @@ created."
   :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
@@ -1880,6 +1910,9 @@ created."
 
 
 (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."
@@ -2011,7 +2044,7 @@ Note: Other faces cannot inherit from the cursor face."
 
 (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))
@@ -2037,16 +2070,18 @@ Note: Other faces cannot inherit from the cursor face."
 
 (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."