all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: radon.neon@gmail.com, 31692@debbugs.gnu.org
Subject: bug#31692: Emacs sometimes drops key events
Date: Mon, 11 Jun 2018 23:08:06 +0200	[thread overview]
Message-ID: <874li9116x.fsf@web.de> (raw)
In-Reply-To: <87zi042a9g.fsf@web.de> (Michael Heerdegen's message of "Sat, 09 Jun 2018 00:17:47 +0200")

Hello,

is this ok to install (Eli)?

> I tried to adapt Eli's patch accordingly.  To avoid confusion, I simply
> use the concrete value - the CATCH-SYM - and just return t instead of
> throwing:
>
> diff --git a/lisp/subr.el b/lisp/subr.el
> index 914112ccef..7734006d87 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -3520,9 +3520,25 @@ while-no-input
>    (let ((catch-sym (make-symbol "input")))
>      `(with-local-quit
>         (catch ',catch-sym
> -	 (let ((throw-on-input ',catch-sym))
> -	   (or (input-pending-p)
> -	       (progn ,@body)))))))
> +	 (let ((throw-on-input ',catch-sym)
> +               val)
> +           (setq val
> +	         (or (input-pending-p)
> +	             (progn ,@body)))
> +           (cond
> +            ;; If quit-flag is bound to the CATCH-SYM, it means BODY
> +            ;; didn't test quit-flag, and therefore ran to completion
> +            ;; even though input arrived before it finished.  In that
> +            ;; case, we must reset quit-flag (and return t), because
> +            ;; otherwise quit-flag will remain set, and we get Quit to
> +            ;; top-level, which has undesirable consequences, such as
> +            ;; discarding input etc.
> +            ((eq quit-flag ',catch-sym)
> +             (setq quit-flag nil)
> +             t)
> +            ;; This is in case the user actually quits while BODY runs.
> +            (quit-flag nil)
> +            (t val)))))))
>  
>  (defmacro condition-case-unless-debug (var bodyform &rest handlers)
>    "Like `condition-case' except that it does not prevent debugging.





  reply	other threads:[~2018-06-11 21:08 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03  2:21 bug#31692: Emacs sometimes drops key events Radon Rosborough
2018-06-03  2:36 ` Eli Zaretskii
2018-06-03  4:54   ` Radon Rosborough
2018-06-03 15:05     ` Eli Zaretskii
2018-06-03 19:23       ` Alan Third
2018-06-04 10:41         ` João Távora
2018-06-05  0:59   ` Michael Heerdegen
2018-06-05  2:37     ` Eli Zaretskii
2018-06-05  2:41       ` Radon Rosborough
2018-06-05  4:11         ` Eli Zaretskii
2018-06-05 21:40           ` Michael Heerdegen
2018-06-06  2:37             ` Eli Zaretskii
2018-06-06  2:58               ` Michael Heerdegen
2018-06-06 14:52                 ` Eli Zaretskii
2018-06-06 23:12                   ` Michael Heerdegen
2018-06-07 15:20                     ` Eli Zaretskii
2018-06-06 14:45             ` Eli Zaretskii
2018-06-06 22:50               ` Michael Heerdegen
2018-06-07 15:20                 ` Eli Zaretskii
2018-06-07 15:30                   ` Stefan Monnier
2018-06-07 15:52                     ` Eli Zaretskii
2018-06-07 18:44                       ` Stefan Monnier
2018-06-08 22:17                         ` Michael Heerdegen
2018-06-11 21:08                           ` Michael Heerdegen [this message]
2018-06-12  2:27                             ` Eli Zaretskii
2018-06-16  8:26                               ` Eli Zaretskii
2018-06-16  8:28                           ` Eli Zaretskii
2018-06-17  4:39                             ` Michael Heerdegen
2018-07-05 19:07                             ` Michael Heerdegen
2018-07-05 19:27                               ` Eli Zaretskii
2018-07-06 17:43                                 ` Michael Heerdegen
2018-06-05  2:48       ` Michael Heerdegen
2018-06-05  4:13         ` Eli Zaretskii
2018-06-05 11:57           ` Noam Postavsky
2018-06-05 14:31             ` Eli Zaretskii
2018-06-05 21:39               ` Artur Malabarba
2018-06-06 14:39                 ` Eli Zaretskii
2018-06-03 12:13 ` Noam Postavsky

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=874li9116x.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=31692@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=radon.neon@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.