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

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

bug#38771: Allow face-attribute to be 'reset, (in addition the usual 'un


From: Eli Zaretskii
Subject: bug#38771: Allow face-attribute to be 'reset, (in addition the usual 'unspecified and valid-values)
Date: Sun, 03 Jul 2022 12:33:40 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: deego3@gmail.com,  38771@debbugs.gnu.org
> Date: Mon, 23 May 2022 13:58:58 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > "reset" just means "use the value of the default face at face
> > realization time".  Nothing else will work, because you cannot "undo"
> > inherited attributes.  Thus, even if nil is valid, it won't do.
> 
> Yes.

I've now implemented this on master.  The recipe below now works as
expected:

  (defface foo '((t (:height 200 :bold t))) "")
  (defface child '((t :inherit foo :height reset)) "")

  (progn
    (pop-to-buffer "*foo*")
    (erase-buffer)
    (insert "none" (propertize "foo" 'face 'foo)
            (propertize "child" 'face 'child)))

I hope other uses of this pseudo-value will also work, but I couldn't
test all the possible ways of merging faces: there are too many of
them.





reply via email to

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