all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#39821: 27.0.60; lisp/cedet/pulse.el destroys pulsed overlay priorities
@ 2020-02-28 13:38 João Távora
  2020-08-21 11:39 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: João Távora @ 2020-02-28 13:38 UTC (permalink / raw)
  To: 39821

[-- 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 --]

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

end of thread, other threads:[~2020-08-21 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-28 13:38 bug#39821: 27.0.60; lisp/cedet/pulse.el destroys pulsed overlay priorities João Távora
2020-08-21 11:39 ` Lars Ingebrigtsen

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.