emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help-default-arg-highlight


From: Juanma Barranquero
Subject: Re: help-default-arg-highlight
Date: Wed, 02 Jun 2004 10:09:32 +0200

On Tue, 1 Jun 2004 17:26:00 -0400
Miles Bader <address@hidden> wrote:

> but if `face-differs-from-default-p' actually works reliably -- which it
> should with the changes I proposed --

Yes.  As soon as you install your face-differs-from-default-p ("New!! And 
Improved!!"
:) I'll commit the attached patch and update etc/NEWS.

                                                                Juanma


--- help-fns.el.orig    2004-06-02 09:42:28.000000000 +0200
+++ help-fns.el 2004-06-02 10:04:36.000000000 +0200
@@ -238,12 +238,15 @@
          file)))))
 
+(defface help-argument-name '((((supports :slant italic)) :inherit italic)
+                              (t :inherit default))
+  "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)))
+else ARG is returned unmodified."
+  (if (face-differs-from-default-p 'help-argument-name)
+      (propertize (downcase arg) 'face 'help-argument-name)
+    arg))
 
 (defun help-do-arg-highlight (doc args)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]