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: Tue, 01 Jun 2004 11:24:35 +0900

Actually, even better, there already seems to be a function that does
the right thing -- `face-font'.

On ttys, that will not do quite the right thing, but for the current
help-buffer issue, it might work already to just do:

(defun face-differs-from-default-p (face)
  (if window-system
      (not (equal (face-font face) (face-font 'default)))
      (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)))

[untested]

-Miles
-- 
Suburbia: where they tear out the trees and then name streets after them.




reply via email to

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