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: Miles Bader
Subject: Re: help-default-arg-highlight
Date: Mon, 31 May 2004 17:14:14 +0900

Juanma Barranquero <address@hidden> writes:
>> (defcustom help-default-arg-highlight-attributes '(:slant italic))
>
> That would not help in this case, because
> `display-supports-face-attributes-p' is returning t, but the user has a
> default face that can not be italized.

Yes.

It seems the right thing to is to make `display-supports-face-attributes-p'
work correctly for fonts; I didn't do so when I originally added that
function because I find emacs' font-handling code very messy and confusing
(and at the time I had different goals for that function).  Perhaps
somebody with more knowledge of the font code might want to look at it.

If that were done, perhaps it would also be a good idea to change
`face-differs-from-default-p' to something like:

   (defun face-differs-from-default-p (face &optional frame)
     (let ((attrs '(:family :width :height :weight :slant :foreground
                    :foreground :background :underline :overline
                    :strike-through :box :inverse-video :stipple))
           (differs nil))
       (while (and attrs (not differs))
         (let ((attr (pop attrs)))
           (when (display-supports-face-attributes-p
                  (list attr (face-attribute face attr frame t))
                  frame)
             (setq differs attr))))
       differs))

[Besides the font issue, I notice that this won't currently work because of
various oddnesses in the way that display-supports-face-attributes-p works
-- but I think those are just bugs, and should just be fixed.]

-Miles
-- 
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."




reply via email to

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