all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: 39821@debbugs.gnu.org
Subject: bug#39821: 27.0.60; lisp/cedet/pulse.el destroys pulsed overlay priorities
Date: Fri, 28 Feb 2020 13:38:17 +0000	[thread overview]
Message-ID: <CALDnm52JC8c_SzntGQyX7dzU6OtE+P5WEHr_gOix9fKKsvFbTg@mail.gmail.com> (raw)

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

Hi,

The bug is easy to reproduce, just make an overlay somewhere, "pulse" it
with pulse-momentary-highlight-overlay, and watch its previous 'priorty
value get destroyed.  The patch attached inline fixes the issue, it
restores the priority just like it does the face.  I'll push it as soon
as there is approval, or in a few days if there are no objections.

João

Subject: [PATCH] Have pulse.el save and restore overlay priorities

* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Save
overlay priority.
(pulse-momentary-unhighlight): Restore.
---
 lisp/cedet/pulse.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 5713a7b0d1..16243e16b4 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -181,6 +181,7 @@ pulse-momentary-highlight-overlay
   (overlay-put o 'original-face (overlay-get o 'face))
   ;; Make this overlay take priority over the `transient-mark-mode'
   ;; overlay.
+  (overlay-put o 'original-priority (overlay-get o 'priority))
   (overlay-put o 'priority 1)
   (setq pulse-momentary-overlay o)
   (if (eq pulse-flag 'never)
@@ -214,6 +215,7 @@ pulse-momentary-unhighlight
     (let ((ol pulse-momentary-overlay))
       (overlay-put ol 'face (overlay-get ol 'original-face))
       (overlay-put ol 'original-face nil)
+      (overlay-put ol 'priority (overlay-get ol 'original-priority))
       ;; Clear the overlay if it needs deleting.
       (when (overlay-get ol 'pulse-delete) (delete-overlay ol)))

-- 
2.20.1

[-- Attachment #2: Type: text/html, Size: 1764 bytes --]

             reply	other threads:[~2020-02-28 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 13:38 João Távora [this message]
2020-08-21 11:39 ` bug#39821: 27.0.60; lisp/cedet/pulse.el destroys pulsed overlay priorities 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDnm52JC8c_SzntGQyX7dzU6OtE+P5WEHr_gOix9fKKsvFbTg@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=39821@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.