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

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

Re: delphi-other-face mismatch


From: Juri Linkov
Subject: Re: delphi-other-face mismatch
Date: Tue, 30 Aug 2005 19:15:08 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>     Setting the value to the face `default' (which produces the desirable
>     visual effect) is not exactly the same as a nil value.
>
> When you say it is "not exactly the same", could you explain what that
> means?  The two values are not eq, of course--is that what you mean?
> Or are you referring to a difference in the user-level effects?
> If so, what is the difference?

Some packages have conditions for a non-nil value of face variables.

For example, time.el checks for `display-time-mail-face':

  (if (and display-time-mail-face
           (memq (plist-get (cdr display-time-mail-icon) :type) '(pbm xbm)))
       ...

So there is a difference if this face variable has `nil' or `default'
value.

But even in cases where the face variable is used directly like in:

  (add-text-properties (match-beginning 1) (match-end 1)
                       (list 'face locate-header-face))

it makes a difference for fontification code which assumes that
if a region have the `default' face explicitly put on it, it is
already fontified, and doesn't override it.

However, this might not cause problems in some packages.  Every case
should be analyzed separately, and in some of them the default value
`default' may be equivalent to `nil'.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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