all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Leo Liu <sdl.web@gmail.com>
Cc: 24149@debbugs.gnu.org
Subject: bug#24149: 25.1; set-transient-map bug
Date: Thu, 04 Aug 2016 09:20:35 -0400	[thread overview]
Message-ID: <jwvvazgd67b.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m17fbwu3sv.fsf@gmail.com> (Leo Liu's message of "Thu, 04 Aug 2016 20:17:04 +0800")

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





  parent reply	other threads:[~2016-08-04 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 12:17 bug#24149: 25.1; set-transient-map bug Leo Liu
2016-08-04 12:26 ` Stefan Monnier
2016-08-04 13:20 ` Stefan Monnier [this message]
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

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

  git send-email \
    --in-reply-to=jwvvazgd67b.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=24149@debbugs.gnu.org \
    --cc=sdl.web@gmail.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 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.