[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48936: 27.2; pulse-reset-face and extend attribute of pulse-highligh
From: |
Gustavo Barros |
Subject: |
bug#48936: 27.2; pulse-reset-face and extend attribute of pulse-highligh-face |
Date: |
Sun, 13 Jun 2021 10:20:02 -0300 |
User-agent: |
mu4e 1.4.15; emacs 27.2 |
Hi Lars,
On Sun, 13 Jun 2021 at 09:49, Lars Ingebrigtsen <larsi@gnus.org> wrote:
Gustavo Barros <gusbrs.2016@gmail.com> writes:
Considering the role `pulse-highlight-face' plays in the way `pulse'
works, it would be expected that this resetting should also be done
for
the `:extend' attribute when the function is called without an
argument,
I think that sounds correct, so I've now made this change in Emacs 28.
Thank you for looking into this.
But my suggestion was more the one to use the `:extend' attribute of
`pulse-highlight-start-face' to reset `pulse-highlight-face'. Like:
#+begin_src emacs-lisp
(set-face-extend 'pulse-highlight-face
(if face
(face-extend-p face nil t)
(face-extend-p 'pulse-highlight-start-face)))
#+end_src
Because `pulse-highlight-start-face' is the default face `pulse' uses
when the `pulse-momentary-highlight-...' functions are called without
argument. This makes `pulse-highlight-start-face' the only possible
handle for setting the `:extend' attribute for calls of `pulse'
functions without argument. If you just set it to nil when a call with
no argument is made, we can still only get a pulse to work with
`:extend' by explicitly passing the argument.
Btw, this is the same treatment `:background' receives. Why should we
treat both face attributes differently?
Best regards,
Gustavo.