]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-argument-name): Reintroduce face.
authorJuanma Barranquero <lekktu@gmail.com>
Fri, 4 Jun 2004 23:26:14 +0000 (23:26 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Fri, 4 Jun 2004 23:26:14 +0000 (23:26 +0000)
(help-default-arg-highlight): Use it, now that
`face-differs-from-default-p' can be trusted.

lisp/ChangeLog
lisp/help-fns.el

index 6c734a5794898583add3bc2081a7fde999188648..3922ef9bf4179b12d29ec350f1bcf8c359049d83 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-05  Juanma Barranquero  <lektu@terra.es>
+
+       * help-fns.el (help-argument-name): Reintroduce face.
+       (help-default-arg-highlight): Use it, now that
+       `face-differs-from-default-p' can be trusted.
+
 2004-06-05  Matt Hodges  <matt@stchem.bham.ac.uk>  (tiny change)
 
        * textmodes/table.el: Sentence commands added to Point Motion
index e7e09a431bdf4de2c9ce30d60858296bcfd7de35..03ea5bef653e234bca30cb954f2f3aa55af2a562 100644 (file)
@@ -237,14 +237,19 @@ KIND should be `var' for a variable or `subr' for a subroutine."
            (concat "src/" file)
          file)))))
 
+;;;###autoload
+(defface help-argument-name '((((supports :slant italic)) :inherit italic))
+  "Face to highlight argument names in *Help* buffers.")
+
 (defun help-default-arg-highlight (arg)
   "Default function to highlight arguments in *Help* buffers.
-It returns ARG in lowercase italics, if the display supports it;
-else ARG is returned in uppercase normal."
-  (let ((attrs '(:slant italic)))
-    (if (display-supports-face-attributes-p attrs)
-        (propertize (downcase arg) 'face attrs)
-      arg)))
+It returns ARG in face `help-argument-name'; ARG is also
+downcased if it displays differently than the default
+face (according to `face-differs-from-default-p')."
+  (propertize (if (face-differs-from-default-p 'help-argument-name)
+                  (downcase arg)
+                arg)
+              'face 'help-argument-name))
 
 (defun help-do-arg-highlight (doc args)
   (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table)