unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: 47810@debbugs.gnu.org
Subject: bug#47810: 28.0.50; pulse no longer accepts a face argument
Date: Fri, 16 Apr 2021 08:32:52 +0000	[thread overview]
Message-ID: <7dee3f42357b0b950c58@heytings.org> (raw)
In-Reply-To: <87pmyvxrw8.fsf@protesilaos.com>

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]


>
> 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.
>

Indeed; patch attached.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=Use-correct-face-when-pulsing-Bug-47810.patch, Size: 1194 bytes --]

From b85bb170b2d4d052696e29c4fa429437b2b95c0c Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Fri, 16 Apr 2021 08:23:04 +0000
Subject: [PATCH] Use correct face when pulsing (Bug#47810)

* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Use
pulse-highlight-face, not pulse-highlight-start-face.
---
 lisp/cedet/pulse.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 1e4506713a..62b2072e18 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -153,8 +153,7 @@ pulse-momentary-highlight-overlay
       ;; with a reference face needed for the color.
       (pulse-reset-face face)
       (let* ((start (color-name-to-rgb
-                     (face-background 'pulse-highlight-start-face
-                                      nil 'default)))
+                     (face-background 'pulse-highlight-face nil 'default)))
              (stop (color-name-to-rgb (face-background 'default)))
              (colors (mapcar (apply-partially 'apply 'color-rgb-to-hex)
                              (color-gradient start stop pulse-iterations))))
-- 
2.30.2


  reply	other threads:[~2021-04-16  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=7dee3f42357b0b950c58@heytings.org \
    --to=gregory@heytings.org \
    --cc=47810@debbugs.gnu.org \
    --cc=info@protesilaos.com \
    /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).