diff options
| -rw-r--r-- | lisp/subr.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 73dd0fe71df..282b85eb1e4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2181,12 +2181,16 @@ floating point support." | |||
| 2181 | (let ((read (read-event nil t seconds))) | 2181 | (let ((read (read-event nil t seconds))) |
| 2182 | (or (null read) | 2182 | (or (null read) |
| 2183 | (progn | 2183 | (progn |
| 2184 | ;; If last command was a prefix arg, e.g. C-u, push this event onto | 2184 | ;; https://lists.gnu.org/archive/html/emacs-devel/2006-10/msg00394.html |
| 2185 | ;; unread-command-events as (t . EVENT) so it will be added to | 2185 | ;; We want `read' appear in the next command's this-command-event |
| 2186 | ;; this-command-keys by read-key-sequence. | 2186 | ;; but not in the current one. |
| 2187 | (if (eq overriding-terminal-local-map universal-argument-map) | 2187 | ;; By pushing (cons t read), we indicate that `read' has not |
| 2188 | (setq read (cons t read))) | 2188 | ;; yet been recorded in this-command-keys, so it will be recorded |
| 2189 | (push read unread-command-events) | 2189 | ;; next time it's read. |
| 2190 | ;; And indeed the `seconds' argument to read-event correctly | ||
| 2191 | ;; prevented recording this event in the current command's | ||
| 2192 | ;; this-command-keys. | ||
| 2193 | (push (cons t read) unread-command-events) | ||
| 2190 | nil)))))) | 2194 | nil)))))) |
| 2191 | 2195 | ||
| 2192 | ;; Behind display-popup-menus-p test. | 2196 | ;; Behind display-popup-menus-p test. |