diff options
| author | Chris Feng | 2017-11-08 00:39:43 +0800 |
|---|---|---|
| committer | Dmitry Gutov | 2018-12-19 18:06:37 +0200 |
| commit | 305aca0a0abbac1011980e6ac9b166bd0dfd6ff0 (patch) | |
| tree | 99ae6ca92fcf5a6773d64041a571dd68efe7960c /src | |
| parent | 4c6c327d0c66a21416ed1b5e9738b7dd13e739f2 (diff) | |
| download | emacs-305aca0a0abbac1011980e6ac9b166bd0dfd6ff0.tar.gz emacs-305aca0a0abbac1011980e6ac9b166bd0dfd6ff0.zip | |
Backport: Handle unread-command-events consistently (bug#23980)
* src/keyboard.c (read_char): Events put into `unread-command-events'
with the form (t . EVENT) should always have the t stripped when read
out.
* test/src/keyboard-tests.el: New tests for `unread-command-events'.
(cherry picked from commit 1f3f4b1296613b8cdc0632a68fde86e86ddad866)
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index dccc6b7f128..d20557b45d7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2809,6 +2809,9 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2809 | 2809 | ||
| 2810 | if (EQ (c, make_number (-2))) | 2810 | if (EQ (c, make_number (-2))) |
| 2811 | return c; | 2811 | return c; |
| 2812 | |||
| 2813 | if (CONSP (c) && EQ (XCAR (c), Qt)) | ||
| 2814 | c = XCDR (c); | ||
| 2812 | } | 2815 | } |
| 2813 | 2816 | ||
| 2814 | non_reread: | 2817 | non_reread: |