From: Leo Liu <sdl.web@gmail.com>
To: 24149@debbugs.gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#24149: 25.1; set-transient-map bug
Date: Thu, 04 Aug 2016 20:17:04 +0800 [thread overview]
Message-ID: <m17fbwu3sv.fsf@gmail.com> (raw)
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
#:clear-transient-map will be there forever.
The issue is caused by two identical calls of set-transient-map that
share the same keymap. so deactivation of the second call has an
side-effect on the first call.
Stefan, is the following the right fix?
Thanks,
Leo
diff --git a/lisp/subr.el b/lisp/subr.el
index 2c0be204..b6a38778 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4542,7 +4542,8 @@ to deactivate this transient map, regardless of KEEP-PRED."
(with-demoted-errors "set-transient-map PCH: %S"
(unless (cond
((null keep-pred) nil)
- ((not (eq map (cadr overriding-terminal-local-map)))
+ ((and (keymapp (cadr overriding-terminal-local-map))
+ (not (eq map (cadr overriding-terminal-local-map))))
;; There's presumably some other transient-map in
;; effect. Wait for that one to terminate before we
;; remove ourselves.
next reply other threads:[~2016-08-04 12:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 12:17 Leo Liu [this message]
2016-08-04 12:26 ` bug#24149: 25.1; set-transient-map bug Stefan Monnier
2016-08-04 13:20 ` Stefan Monnier
2016-08-04 15:47 ` Leo Liu
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=m17fbwu3sv.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=24149@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).