bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24149: 25.1; set-transient-map bug


From: Stefan Monnier
Subject: bug#24149: 25.1; set-transient-map bug
Date: Thu, 04 Aug 2016 09:20:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> 1. Enable temp-buffer-browse-mode
> 2. (cl-loop repeat 2 do (with-output-to-temp-buffer "*test*" (princ "ok")))
> 3. Check pre-command-hook
[...]
> Stefan, is the following the right fix?

While the fix is safe, I think it doesn't catch all cases.
A better fix might be something like the untested one below, which makes
sure we only wait when there's still a map of ours.
If it works and looks good to you, please install it.


        Stefan


diff --git a/lisp/subr.el b/lisp/subr.el
index 77bcaa7..4b7cc93 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4889,7 +4889,8 @@ set-transient-map
             (with-demoted-errors "set-transient-map PCH: %S"
               (unless (cond
                        ((null keep-pred) nil)
-                       ((not (eq map (cadr overriding-terminal-local-map)))
+                       ((and (not (eq map (cadr 
overriding-terminal-local-map)))
+                             (memq map (cddr overriding-terminal-local-map)))
                         ;; There's presumably some other transient-map in
                         ;; effect.  Wait for that one to terminate before we
                         ;; remove ourselves.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]