unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47810: 28.0.50; pulse no longer accepts a face argument
@ 2021-04-15 19:35 Protesilaos Stavrou
  2021-04-16  8:32 ` Gregory Heytings
  0 siblings, 1 reply; 6+ messages in thread
From: Protesilaos Stavrou @ 2021-04-15 19:35 UTC (permalink / raw)
  To: 47810

Dear maintainers,

I would expect the following two expressions to produce pulse effects
that differ in colour (tried with emacs -Q):

    (pulse-momentary-highlight-region (point-at-bol) (point-at-eol) 'highlight)
    (pulse-momentary-highlight-region (point-at-bol) (point-at-eol) 'region)

Instead they use the background of pulse-highlight-start-face.  This
test confirms as much:

    (set-face-background 'pulse-highlight-start-face "red")
    (pulse-momentary-highlight-region (point-at-bol) (point-at-eol) 'highlight)
    
    (set-face-background 'pulse-highlight-start-face "blue")
    (pulse-momentary-highlight-region (point-at-bol) (point-at-eol) 'region)

The following diff addresses the problem with the FACE argument, but
introduces a noticeable delay to the pulse effect:

     lisp/cedet/pulse.el | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
    index 1e4506713a..e4733ca007 100644
    --- a/lisp/cedet/pulse.el
    +++ b/lisp/cedet/pulse.el
    @@ -147,7 +147,7 @@ (defun pulse-momentary-highlight-overlay (o &optional face)
          (add-hook 'pre-command-hook
                #'pulse-momentary-unhighlight))
           ;; Pulse it.
    -      (overlay-put o 'face 'pulse-highlight-face)
    +      (overlay-put o 'face (or face 'pulse-highlight-start-face))
           ;; The pulse function puts FACE onto 'pulse-highlight-face.
           ;; Thus above we put our face on the overlay, but pulse
           ;; with a reference face needed for the color.

I am not sure what may be causing that delay.

Thank you for your attention!

-- 
Protesilaos Stavrou
protesilaos.com





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-25  4:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 19:35 bug#47810: 28.0.50; pulse no longer accepts a face argument Protesilaos Stavrou
2021-04-16  8:32 ` Gregory Heytings
2021-04-16 11:09   ` Protesilaos Stavrou
2021-04-21  0:02     ` Stefan Kangas
2021-05-04  4:33       ` Protesilaos Stavrou
2021-05-25  4:22   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).