From: Protesilaos Stavrou <info@protesilaos.com>
To: 47810@debbugs.gnu.org
Subject: bug#47810: 28.0.50; pulse no longer accepts a face argument
Date: Thu, 15 Apr 2021 22:35:35 +0300 [thread overview]
Message-ID: <87pmyvxrw8.fsf@protesilaos.com> (raw)
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
next reply other threads:[~2021-04-15 19:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 19:35 Protesilaos Stavrou [this message]
2021-04-16 8:32 ` bug#47810: 28.0.50; pulse no longer accepts a face argument 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmyvxrw8.fsf@protesilaos.com \
--to=info@protesilaos.com \
--cc=47810@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).