[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47810: 28.0.50; pulse no longer accepts a face argument
From: |
Protesilaos Stavrou |
Subject: |
bug#47810: 28.0.50; pulse no longer accepts a face argument |
Date: |
Thu, 15 Apr 2021 22:35:35 +0300 |
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
- bug#47810: 28.0.50; pulse no longer accepts a face argument,
Protesilaos Stavrou <=