>     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/



_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to