aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kastrup2015-07-25 18:54:42 +0200
committerDavid Kastrup2015-08-04 14:34:15 +0200
commit5022e27dac4c13651941e425dbec5b3a2cecdae4 (patch)
tree696d748c8abc3aea1bfd5305a8e71dc985053496
parent227e996946d4629fa8f6d665564a37668290c87f (diff)
downloademacs-5022e27dac4c13651941e425dbec5b3a2cecdae4.tar.gz
emacs-5022e27dac4c13651941e425dbec5b3a2cecdae4.zip
; Do not overwrite preexisting contents of unread-command-events
-rw-r--r--lisp/comint.el5
-rw-r--r--lisp/double.el8
-rw-r--r--lisp/ebuff-menu.el6
-rw-r--r--lisp/ehelp.el8
-rw-r--r--lisp/eshell/em-hist.el2
-rw-r--r--lisp/gnus/gnus-art.el24
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/international/quail.el6
-rw-r--r--lisp/international/robin.el2
-rw-r--r--lisp/kmacro.el2
-rw-r--r--lisp/language/hanja-util.el4
-rw-r--r--lisp/leim/quail/hangul.el12
-rw-r--r--lisp/leim/quail/japanese.el7
-rw-r--r--lisp/leim/quail/lao.el5
-rw-r--r--lisp/leim/quail/lrt.el5
-rw-r--r--lisp/leim/quail/tibetan.el10
-rw-r--r--lisp/obsolete/terminal.el4
-rw-r--r--lisp/obsolete/vip.el7
-rw-r--r--lisp/pcomplete.el2
-rw-r--r--lisp/progmodes/cperl-mode.el4
-rw-r--r--lisp/progmodes/ebrowse.el3
-rw-r--r--lisp/progmodes/fortran.el2
-rw-r--r--lisp/progmodes/octave.el2
-rw-r--r--lisp/progmodes/vhdl-mode.el17
-rw-r--r--lisp/simple.el6
-rw-r--r--lisp/subr.el3
-rw-r--r--lisp/term.el6
-rw-r--r--lisp/vc/emerge.el2
28 files changed, 100 insertions, 66 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index de220619751..7db297a1427 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1051,7 +1051,7 @@ See also `comint-read-input-ring'."
1051 (let ((ch (read-event))) 1051 (let ((ch (read-event)))
1052 (if (eq ch ?\s) 1052 (if (eq ch ?\s)
1053 (set-window-configuration conf) 1053 (set-window-configuration conf)
1054 (setq unread-command-events (list ch))))))) 1054 (push ch unread-command-events))))))
1055 1055
1056 1056
1057(defun comint-regexp-arg (prompt) 1057(defun comint-regexp-arg (prompt)
@@ -3365,7 +3365,8 @@ the completions."
3365 (set-window-configuration comint-dynamic-list-completions-config)) 3365 (set-window-configuration comint-dynamic-list-completions-config))
3366 (if (eq first ?\s) 3366 (if (eq first ?\s)
3367 (set-window-configuration comint-dynamic-list-completions-config) 3367 (set-window-configuration comint-dynamic-list-completions-config)
3368 (setq unread-command-events (listify-key-sequence key))))))) 3368 (setq unread-command-events
3369 (nconc (listify-key-sequence key) unread-command-events)))))))
3369 3370
3370(defun comint-get-next-from-history () 3371(defun comint-get-next-from-history ()
3371 "After fetching a line from input history, this fetches the following line. 3372 "After fetching a line from input history, this fetches the following line.
diff --git a/lisp/double.el b/lisp/double.el
index b06f59cf6a6..ee511e55963 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -122,9 +122,10 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
122 (append (make-list (1- (length (nth 1 entry))) 122 (append (make-list (1- (length (nth 1 entry)))
123 127) 123 127)
124 (nth 2 entry) 124 (nth 2 entry)
125 '(magic-end))) 125 '(magic-end)
126 unread-command-events))
126 (vector 127)) 127 (vector 127))
127 (setq unread-command-events (list new)) 128 (push new unread-command-events)
128 [ignore]))) 129 [ignore])))
129 ((eq key 'magic-end) 130 ((eq key 'magic-end)
130 ;; End of double event. Ignore. 131 ;; End of double event. Ignore.
@@ -134,7 +135,8 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
134 (let ((exp (nth 1 (assoc key double-map)))) 135 (let ((exp (nth 1 (assoc key double-map))))
135 (setq double-last-event key) 136 (setq double-last-event key)
136 (setq unread-command-events 137 (setq unread-command-events
137 (append (substring exp 1) '(magic-start))) 138 (append (substring exp 1) '(magic-start)
139 unread-command-events))
138 (vector (aref exp 0))))))) 140 (vector (aref exp 0)))))))
139 141
140;;; Mode 142;;; Mode
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index 337ea10f26d..93418063d10 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -133,7 +133,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
133 (setq select 133 (setq select
134 (catch 'electric-buffer-menu-select 134 (catch 'electric-buffer-menu-select
135 (message "<<< Type SPC or RET to bury the buffer list >>>") 135 (message "<<< Type SPC or RET to bury the buffer list >>>")
136 (setq unread-command-events (list (read-event))) 136 (push (read-event) unread-command-events)
137 (let ((start-point (point)) 137 (let ((start-point (point))
138 (first (progn (goto-char (point-min)) 138 (first (progn (goto-char (point-min))
139 (unless Buffer-menu-use-header-line 139 (unless Buffer-menu-use-header-line
@@ -210,7 +210,9 @@ See the documentation of `electric-buffer-list' for details."
210 210
211(defun Electric-buffer-menu-exit () 211(defun Electric-buffer-menu-exit ()
212 (interactive) 212 (interactive)
213 (setq unread-command-events (listify-key-sequence (this-command-keys))) 213 (setq unread-command-events
214 (nconc (listify-key-sequence (this-command-keys))
215 unread-command-events))
214 ;; for robustness 216 ;; for robustness
215 (condition-case () 217 (condition-case ()
216 (throw 'electric-buffer-menu-select nil) 218 (throw 'electric-buffer-menu-select nil)
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index 66e4f5c633b..2e15af34a81 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -204,10 +204,10 @@ BUFFER is put back into its original major mode."
204 (catch 'exit 204 (catch 'exit
205 (if (pos-visible-in-window-p (point-max)) 205 (if (pos-visible-in-window-p (point-max))
206 (progn (message "%s" (substitute-command-keys "<<< Press Space to bury the help buffer, Press \\[electric-help-retain] to retain it >>>")) 206 (progn (message "%s" (substitute-command-keys "<<< Press Space to bury the help buffer, Press \\[electric-help-retain] to retain it >>>"))
207 (if (equal (setq unread-command-events (list (read-event))) 207 (let ((ev (read-event)))
208 '(?\s)) 208 (if (equal ev ?\s)
209 (progn (setq unread-command-events nil) 209 (throw 'exit t)
210 (throw 'exit t))))) 210 (push ev unread-command-events)))))
211 (let (up down both neither 211 (let (up down both neither
212 (standard (and (eq (key-binding " " nil t) 212 (standard (and (eq (key-binding " " nil t)
213 'scroll-up) 213 'scroll-up)
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 1cdf6d69714..9f070c33db3 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -520,7 +520,7 @@ See also `eshell-read-history'."
520 (let ((ch (read-event))) 520 (let ((ch (read-event)))
521 (if (eq ch ?\ ) 521 (if (eq ch ?\ )
522 (set-window-configuration conf) 522 (set-window-configuration conf)
523 (setq unread-command-events (list ch)))))))) 523 (push ch unread-command-events)))))))
524 524
525(defun eshell-hist-word-reference (ref) 525(defun eshell-hist-word-reference (ref)
526 "Return the word designator index referred to by REF." 526 "Return the word designator index referred to by REF."
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index d83eaddf165..ffe9a211417 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -6871,11 +6871,13 @@ KEY is a string or a vector."
6871 (with-current-buffer gnus-article-current-summary 6871 (with-current-buffer gnus-article-current-summary
6872 (setq unread-command-events 6872 (setq unread-command-events
6873 (if (featurep 'xemacs) 6873 (if (featurep 'xemacs)
6874 (append key nil) 6874 (append key unread-command-events)
6875 (mapcar (lambda (x) (if (and (integerp x) (>= x 128)) 6875 (nconc
6876 (list 'meta (- x 128)) 6876 (mapcar (lambda (x) (if (and (integerp x) (>= x 128))
6877 x)) 6877 (list 'meta (- x 128))
6878 key))) 6878 x))
6879 key)
6880 unread-command-events)))
6879 (let ((cursor-in-echo-area t) 6881 (let ((cursor-in-echo-area t)
6880 gnus-pick-mode) 6882 gnus-pick-mode)
6881 (describe-key (read-key-sequence nil t)))) 6883 (describe-key (read-key-sequence nil t))))
@@ -6893,11 +6895,13 @@ KEY is a string or a vector."
6893 (with-current-buffer gnus-article-current-summary 6895 (with-current-buffer gnus-article-current-summary
6894 (setq unread-command-events 6896 (setq unread-command-events
6895 (if (featurep 'xemacs) 6897 (if (featurep 'xemacs)
6896 (append key nil) 6898 (append key unread-command-events)
6897 (mapcar (lambda (x) (if (and (integerp x) (>= x 128)) 6899 (nconc
6898 (list 'meta (- x 128)) 6900 (mapcar (lambda (x) (if (and (integerp x) (>= x 128))
6899 x)) 6901 (list 'meta (- x 128))
6900 key))) 6902 x))
6903 key)
6904 unread-command-events)))
6901 (let ((cursor-in-echo-area t) 6905 (let ((cursor-in-echo-area t)
6902 gnus-pick-mode) 6906 gnus-pick-mode)
6903 (describe-key-briefly (read-key-sequence nil t) insert))) 6907 (describe-key-briefly (read-key-sequence nil t) insert)))
diff --git a/lisp/info.el b/lisp/info.el
index 48d9d1981af..0a2206d61bf 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3825,7 +3825,7 @@ with a list of packages that contain all specified keywords."
3825 (message (if flag "Type Space to see more" 3825 (message (if flag "Type Space to see more"
3826 "Type Space to return to Info")) 3826 "Type Space to return to Info"))
3827 (if (not (eq ?\s (setq ch (read-event)))) 3827 (if (not (eq ?\s (setq ch (read-event))))
3828 (progn (setq unread-command-events (list ch)) nil) 3828 (progn (push ch unread-command-events) nil)
3829 flag)) 3829 flag))
3830 (scroll-up))) 3830 (scroll-up)))
3831 (bury-buffer "*Help*"))) 3831 (bury-buffer "*Help*")))
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 90a540aae30..f60af4ab9b6 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1415,7 +1415,8 @@ Return the input string."
1415 ;; KEYSEQ is not defined in the translation keymap. 1415 ;; KEYSEQ is not defined in the translation keymap.
1416 ;; Let's return the event(s) to the caller. 1416 ;; Let's return the event(s) to the caller.
1417 (setq unread-command-events 1417 (setq unread-command-events
1418 (string-to-list (this-single-command-raw-keys))) 1418 (append (this-single-command-raw-keys)
1419 unread-command-events))
1419 (setq quail-translating nil)))) 1420 (setq quail-translating nil))))
1420 (quail-delete-region) 1421 (quail-delete-region)
1421 quail-current-str) 1422 quail-current-str)
@@ -1491,7 +1492,8 @@ Return the input string."
1491 ;; KEYSEQ is not defined in the conversion keymap. 1492 ;; KEYSEQ is not defined in the conversion keymap.
1492 ;; Let's return the event(s) to the caller. 1493 ;; Let's return the event(s) to the caller.
1493 (setq unread-command-events 1494 (setq unread-command-events
1494 (string-to-list (this-single-command-raw-keys))) 1495 (append (this-single-command-raw-keys)
1496 unread-command-events))
1495 (setq quail-converting nil)))) 1497 (setq quail-converting nil))))
1496 (setq quail-translating nil) 1498 (setq quail-translating nil)
1497 (if (overlay-start quail-conv-overlay) 1499 (if (overlay-start quail-conv-overlay)
diff --git a/lisp/international/robin.el b/lisp/international/robin.el
index 8254180fcc1..0ef90b18932 100644
--- a/lisp/international/robin.el
+++ b/lisp/international/robin.el
@@ -466,7 +466,7 @@ While this input method is active, the variable
466 (list key) 466 (list key)
467 (delete-region start (point)) 467 (delete-region start (point))
468 (if key 468 (if key
469 (setq unread-command-events (list key))) 469 (push key unread-command-events))
470 (if (stringp output) 470 (if (stringp output)
471 (string-to-list output) 471 (string-to-list output)
472 (list output)))))) 472 (list output))))))
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 327cf455e65..9636a36b1e2 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -432,7 +432,7 @@ Optional arg EMPTY is message to print if no macros are defined."
432 (setq last-input-event nil))) 432 (setq last-input-event nil)))
433 (when last-input-event 433 (when last-input-event
434 (clear-this-command-keys t) 434 (clear-this-command-keys t)
435 (setq unread-command-events (list last-input-event)))) 435 (push last-input-event unread-command-events)))
436 436
437 437
438(defun kmacro-get-repeat-prefix () 438(defun kmacro-get-repeat-prefix ()
diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el
index 8b62ee707f3..c9501d2ef8f 100644
--- a/lisp/language/hanja-util.el
+++ b/lisp/language/hanja-util.el
@@ -6585,7 +6585,9 @@ The value is a hanja character that is selected interactively."
6585 (cmd (lookup-key hanja-keymap seq))) 6585 (cmd (lookup-key hanja-keymap seq)))
6586 (if (functionp cmd) 6586 (if (functionp cmd)
6587 (funcall cmd) 6587 (funcall cmd)
6588 (setq unread-command-events (listify-key-sequence seq)) 6588 (setq unread-command-events
6589 (nconc (listify-key-sequence seq)
6590 unread-command-events))
6589 (throw 'exit-input-loop nil)))))) 6591 (throw 'exit-input-loop nil))))))
6590 (setq hanja-conversions nil)))) 6592 (setq hanja-conversions nil))))
6591 6593
diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el
index 12d7358841b..56a244f4574 100644
--- a/lisp/leim/quail/hangul.el
+++ b/lisp/leim/quail/hangul.el
@@ -410,7 +410,9 @@ When a Korean input method is off, convert the following hangul character."
410 ((commandp cmd) 410 ((commandp cmd)
411 (call-interactively cmd)) 411 (call-interactively cmd))
412 (t 412 (t
413 (setq unread-command-events (listify-key-sequence seq)) 413 (setq unread-command-events
414 (nconc (listify-key-sequence seq)
415 unread-command-events))
414 (throw 'exit-input-loop nil)))))) 416 (throw 'exit-input-loop nil))))))
415 (quail-delete-overlays))))) 417 (quail-delete-overlays)))))
416 418
@@ -454,7 +456,9 @@ When a Korean input method is off, convert the following hangul character."
454 ((commandp cmd) 456 ((commandp cmd)
455 (call-interactively cmd)) 457 (call-interactively cmd))
456 (t 458 (t
457 (setq unread-command-events (listify-key-sequence seq)) 459 (setq unread-command-events
460 (nconc (listify-key-sequence seq)
461 unread-command-events))
458 (throw 'exit-input-loop nil)))))) 462 (throw 'exit-input-loop nil))))))
459 (quail-delete-overlays))))) 463 (quail-delete-overlays)))))
460 464
@@ -499,7 +503,9 @@ When a Korean input method is off, convert the following hangul character."
499 ((commandp cmd) 503 ((commandp cmd)
500 (call-interactively cmd)) 504 (call-interactively cmd))
501 (t 505 (t
502 (setq unread-command-events (listify-key-sequence seq)) 506 (setq unread-command-events
507 (nconc (listify-key-sequence seq)
508 unread-command-events))
503 (throw 'exit-input-loop nil)))))) 509 (throw 'exit-input-loop nil))))))
504 (quail-delete-overlays))))) 510 (quail-delete-overlays)))))
505 511
diff --git a/lisp/leim/quail/japanese.el b/lisp/leim/quail/japanese.el
index fd6628b8a45..831725f8065 100644
--- a/lisp/leim/quail/japanese.el
+++ b/lisp/leim/quail/japanese.el
@@ -59,8 +59,9 @@
59 (setq quail-current-str (aref quail-current-key 0)))) 59 (setq quail-current-str (aref quail-current-key 0))))
60 (if (integerp control-flag) 60 (if (integerp control-flag)
61 (setq unread-command-events 61 (setq unread-command-events
62 (string-to-list 62 (append
63 (substring quail-current-key control-flag))))))) 63 (substring quail-current-key control-flag)
64 unread-command-events))))))
64 control-flag) 65 control-flag)
65 66
66;; Convert Hiragana <-> Katakana in the current translation region. 67;; Convert Hiragana <-> Katakana in the current translation region.
@@ -103,7 +104,7 @@
103 104
104(defun quail-japanese-self-insert-and-switch-to-alpha (key idx) 105(defun quail-japanese-self-insert-and-switch-to-alpha (key idx)
105 (quail-delete-region) 106 (quail-delete-region)
106 (setq unread-command-events (list (aref key (1- idx)))) 107 (push (aref key (1- idx)) unread-command-events)
107 (quail-japanese-switch-package "q" 1)) 108 (quail-japanese-switch-package "q" 1))
108 109
109(defvar quail-japanese-switch-table 110(defvar quail-japanese-switch-table
diff --git a/lisp/leim/quail/lao.el b/lisp/leim/quail/lao.el
index 52357afd8dd..14cf9268287 100644
--- a/lisp/leim/quail/lao.el
+++ b/lisp/leim/quail/lao.el
@@ -36,8 +36,9 @@
36 (buffer-substring (overlay-start quail-overlay) 36 (buffer-substring (overlay-start quail-overlay)
37 (overlay-end quail-overlay)) 37 (overlay-end quail-overlay))
38 unread-command-events 38 unread-command-events
39 (string-to-list 39 (append
40 (substring quail-current-key control-flag))) 40 (substring quail-current-key control-flag)
41 unread-command-events))
41 (setq quail-current-str 42 (setq quail-current-str
42 (compose-string (quail-lookup-map-and-concat quail-current-key)))) 43 (compose-string (quail-lookup-map-and-concat quail-current-key))))
43 control-flag) 44 control-flag)
diff --git a/lisp/leim/quail/lrt.el b/lisp/leim/quail/lrt.el
index 342b52d6ab6..ed9138d2134 100644
--- a/lisp/leim/quail/lrt.el
+++ b/lisp/leim/quail/lrt.el
@@ -41,8 +41,9 @@
41 (buffer-substring (overlay-start quail-overlay) 41 (buffer-substring (overlay-start quail-overlay)
42 (overlay-end quail-overlay)) 42 (overlay-end quail-overlay))
43 unread-command-events 43 unread-command-events
44 (string-to-list 44 (append
45 (substring quail-current-key control-flag))) 45 (substring quail-current-key control-flag)
46 unread-command-events))
46 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key))) 47 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key)))
47 (if (> (aref lao-str 0) 255) 48 (if (> (aref lao-str 0) 255)
48 (setq quail-current-str lao-str) 49 (setq quail-current-str lao-str)
diff --git a/lisp/leim/quail/tibetan.el b/lisp/leim/quail/tibetan.el
index 1313f566def..5dacf290c10 100644
--- a/lisp/leim/quail/tibetan.el
+++ b/lisp/leim/quail/tibetan.el
@@ -50,8 +50,9 @@
50 (buffer-substring (overlay-start quail-overlay) 50 (buffer-substring (overlay-start quail-overlay)
51 (overlay-end quail-overlay)) 51 (overlay-end quail-overlay))
52 unread-command-events 52 unread-command-events
53 (string-to-list 53 (append
54 (substring quail-current-key control-flag))) 54 (substring quail-current-key control-flag)
55 unread-command-events))
55 ;; Special treatment of "-d..." and "-y...". 56 ;; Special treatment of "-d..." and "-y...".
56 (if (string-match "^-[dy]" quail-current-key) 57 (if (string-match "^-[dy]" quail-current-key)
57 (setq quail-current-key (substring quail-current-key 1))) 58 (setq quail-current-key (substring quail-current-key 1)))
@@ -381,8 +382,9 @@
381 (buffer-substring (overlay-start quail-overlay) 382 (buffer-substring (overlay-start quail-overlay)
382 (overlay-end quail-overlay)) 383 (overlay-end quail-overlay))
383 unread-command-events 384 unread-command-events
384 (string-to-list 385 (append
385 (substring quail-current-key control-flag))) 386 (substring quail-current-key control-flag)
387 unread-command-events))
386 (let ((transcription (quail-tibkey-to-transcription quail-current-key))) 388 (let ((transcription (quail-tibkey-to-transcription quail-current-key)))
387 (if (> (length transcription) 0) 389 (if (> (length transcription) 0)
388 (let ((quail-current-key transcription)) 390 (let ((quail-current-key transcription))
diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el
index 6bab61b0f46..f1a38d20f39 100644
--- a/lisp/obsolete/terminal.el
+++ b/lisp/obsolete/terminal.el
@@ -291,7 +291,9 @@ Other chars following \"%s\" are interpreted as follows:\n"
291;; not used. 291;; not used.
292(defun te-escape-extended-command-unread () 292(defun te-escape-extended-command-unread ()
293 (interactive) 293 (interactive)
294 (setq unread-command-events (listify-key-sequence (this-command-keys))) 294 (setq unread-command-events
295 (nconc (listify-key-sequence (this-command-keys))
296 unread-command-events))
295 (te-escape-extended-command)) 297 (te-escape-extended-command))
296 298
297(defun te-set-escape-char (c) 299(defun te-set-escape-char (c)
diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el
index d6adbd4d421..0c345e26f80 100644
--- a/lisp/obsolete/vip.el
+++ b/lisp/obsolete/vip.el
@@ -462,7 +462,8 @@ ARG is used as the prefix value for the executed command. If
462EVENTS is a list of events, which become the beginning of the command." 462EVENTS is a list of events, which become the beginning of the command."
463 (interactive "P") 463 (interactive "P")
464 (let (com key (old-map (current-local-map))) 464 (let (com key (old-map (current-local-map)))
465 (if events (setq unread-command-events events)) 465 (if events (setq unread-command-events
466 (append events unread-command-events)))
466 (setq prefix-arg arg) 467 (setq prefix-arg arg)
467 (use-local-map vip-emacs-local-map) 468 (use-local-map vip-emacs-local-map)
468 (unwind-protect 469 (unwind-protect
@@ -518,7 +519,7 @@ obtained so far, and COM is the command part obtained so far."
518 (while (= char ?U) 519 (while (= char ?U)
519 (vip-describe-arg prefix-arg) 520 (vip-describe-arg prefix-arg)
520 (setq char (read-char))) 521 (setq char (read-char)))
521 (setq unread-command-events (list char))) 522 (push char unread-command-events))
522 523
523(defun vip-prefix-arg-com (char value com) 524(defun vip-prefix-arg-com (char value com)
524 "Vi operator as prefix argument." 525 "Vi operator as prefix argument."
@@ -572,7 +573,7 @@ obtained so far, and COM is the command part obtained so far."
572 (while (= char ?U) 573 (while (= char ?U)
573 (vip-describe-arg prefix-arg) 574 (vip-describe-arg prefix-arg)
574 (setq char (read-char))) 575 (setq char (read-char)))
575 (setq unread-command-events (list char))) 576 (push char unread-command-events))
576 ;; as com is non-nil, this means that we have a command to execute 577 ;; as com is non-nil, this means that we have a command to execute
577 (if (or (= (car com) ?r) (= (car com) ?R)) 578 (if (or (= (car com) ?r) (= (car com) ?R))
578 ;; execute appropriate region command. 579 ;; execute appropriate region command.
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 7bcf2c1759e..90f06953183 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -1112,7 +1112,7 @@ Typing SPC flushes the help buffer."
1112 (scroll-up)))) 1112 (scroll-up))))
1113 (message "")) 1113 (message ""))
1114 (t 1114 (t
1115 (setq unread-command-events (list event)) 1115 (push event unread-command-events)
1116 (throw 'done nil))))) 1116 (throw 'done nil)))))
1117 (if (and pcomplete-last-window-config 1117 (if (and pcomplete-last-window-config
1118 pcomplete-restore-window-delay) 1118 pcomplete-restore-window-delay)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 7d2f3fcb007..826b3ee73a8 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1042,11 +1042,11 @@ In regular expressions (including character classes):
1042 cperl-can-font-lock) 1042 cperl-can-font-lock)
1043 1043
1044(defun cperl-putback-char (c) ; Emacs 19 1044(defun cperl-putback-char (c) ; Emacs 19
1045 (set 'unread-command-events (list c))) ; Avoid undefined warning 1045 (push c unread-command-events)) ; Avoid undefined warning
1046 1046
1047(if (featurep 'xemacs) 1047(if (featurep 'xemacs)
1048 (defun cperl-putback-char (c) ; XEmacs >= 19.12 1048 (defun cperl-putback-char (c) ; XEmacs >= 19.12
1049 (setq unread-command-events (list (eval '(character-to-event c)))))) 1049 (push (eval '(character-to-event c)) unread-command-events)))
1050 1050
1051(or (fboundp 'uncomment-region) 1051(or (fboundp 'uncomment-region)
1052 (defun uncomment-region (beg end) 1052 (defun uncomment-region (beg end)
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index f91e4a741cc..8d7c8aa0267 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -4223,7 +4223,8 @@ NUMBER-OF-STATIC-VARIABLES:"
4223 (1+ (point))))))))) 4223 (1+ (point)))))))))
4224 (unless non-empty 4224 (unless non-empty
4225 (error "No tree buffers")) 4225 (error "No tree buffers"))
4226 (setf unread-command-events (listify-key-sequence "p")) 4226 (setf unread-command-events
4227 (nconc (listify-key-sequence "p") unread-command-events))
4227 (shrink-window-if-larger-than-buffer (selected-window)) 4228 (shrink-window-if-larger-than-buffer (selected-window))
4228 (setq buffer-read-only t)))) 4229 (setq buffer-read-only t))))
4229 4230
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 65aa7454008..83e427da790 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -1117,7 +1117,7 @@ See also `fortran-window-create'."
1117 (message "Type SPC to continue editing.") 1117 (message "Type SPC to continue editing.")
1118 (let ((char (read-event))) 1118 (let ((char (read-event)))
1119 (or (equal char ?\s) 1119 (or (equal char ?\s)
1120 (setq unread-command-events (list char)))))) 1120 (push char unread-command-events)))))
1121 (fortran-window-create))) 1121 (fortran-window-create)))
1122 1122
1123(defun fortran-split-line () 1123(defun fortran-split-line ()
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 50f888cb9fd..89e0b105223 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -919,7 +919,7 @@ startup file, `~/.emacs-octave'."
919 (let ((ch (read-event))) 919 (let ((ch (read-event)))
920 (if (eq ch ?\ ) 920 (if (eq ch ?\ )
921 (set-window-configuration conf) 921 (set-window-configuration conf)
922 (setq unread-command-events (list ch))))))) 922 (push ch unread-command-events))))))
923 923
924(defun inferior-octave-output-digest (_proc string) 924(defun inferior-octave-output-digest (_proc string)
925 "Special output filter for the inferior Octave process. 925 "Special output filter for the inferior Octave process.
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 16e4e8ed53d..2edacf4e69a 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8734,10 +8734,11 @@ is omitted or nil."
8734 (let ((next-input (read-char))) 8734 (let ((next-input (read-char)))
8735 (if (= next-input ?-) ; four dashes 8735 (if (= next-input ?-) ; four dashes
8736 (vhdl-comment-display t) 8736 (vhdl-comment-display t)
8737 (setq unread-command-events ; pushback the char 8737 (push (vhdl-character-to-event next-input)
8738 (list (vhdl-character-to-event next-input)))))) 8738 ; pushback the char
8739 (setq unread-command-events ; pushback the char 8739 unread-command-events))))
8740 (list (vhdl-character-to-event next-input))) 8740 (push (vhdl-character-to-event next-input) ; pushback the char
8741 unread-command-events)
8741 (vhdl-comment-insert))))) 8742 (vhdl-comment-insert)))))
8742 (self-insert-command count))) 8743 (self-insert-command count)))
8743 8744
@@ -10755,8 +10756,8 @@ If starting after end-comment-column, start a new line."
10755 (setq code t)) 10756 (setq code t))
10756 (unless code 10757 (unless code
10757 (insert "--")) ; hardwire to 1 space or use vhdl-basic-offset? 10758 (insert "--")) ; hardwire to 1 space or use vhdl-basic-offset?
10758 (setq unread-command-events 10759 (push (vhdl-character-to-event next-input) ; pushback the char
10759 (list (vhdl-character-to-event next-input)))))) ; pushback the char 10760 unread-command-events))))
10760 10761
10761(defun vhdl-comment-display (&optional line-exists) 10762(defun vhdl-comment-display (&optional line-exists)
10762 "Add 2 comment lines at the current indent, making a display comment." 10763 "Add 2 comment lines at the current indent, making a display comment."
@@ -11310,8 +11311,8 @@ but not if inside a comment or quote."
11310 ;; delete CR which is still in event queue 11311 ;; delete CR which is still in event queue
11311 (if (fboundp 'enqueue-eval-event) 11312 (if (fboundp 'enqueue-eval-event)
11312 (enqueue-eval-event 'delete-char -1) 11313 (enqueue-eval-event 'delete-char -1)
11313 (setq unread-command-events ; push back a delete char 11314 (push (vhdl-character-to-event ?\177) ; push back a delete char
11314 (list (vhdl-character-to-event ?\177)))))))) 11315 unread-command-events))))))
11315 11316
11316(defun vhdl-template-alias-hook () 11317(defun vhdl-template-alias-hook ()
11317 (vhdl-hooked-abbrev 'vhdl-template-alias)) 11318 (vhdl-hooked-abbrev 'vhdl-template-alias))
diff --git a/lisp/simple.el b/lisp/simple.el
index 1a4bcf124db..00c25db07d7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -693,7 +693,8 @@ any other non-digit terminates the character code and is then used as input."))
693 (cond ((null translated)) 693 (cond ((null translated))
694 ((not (integerp translated)) 694 ((not (integerp translated))
695 (setq unread-command-events 695 (setq unread-command-events
696 (listify-key-sequence (this-single-command-raw-keys)) 696 (nconc (listify-key-sequence (this-single-command-raw-keys))
697 unread-command-events)
697 done t)) 698 done t))
698 ((/= (logand translated ?\M-\^@) 0) 699 ((/= (logand translated ?\M-\^@) 0)
699 ;; Turn a meta-character into a character with the 0200 bit set. 700 ;; Turn a meta-character into a character with the 0200 bit set.
@@ -713,7 +714,8 @@ any other non-digit terminates the character code and is then used as input."))
713 (setq done t)) 714 (setq done t))
714 ((not first) 715 ((not first)
715 (setq unread-command-events 716 (setq unread-command-events
716 (listify-key-sequence (this-single-command-raw-keys)) 717 (nconc (listify-key-sequence (this-single-command-raw-keys))
718 unread-command-events)
717 done t)) 719 done t))
718 (t (setq code translated 720 (t (setq code translated
719 done t))) 721 done t)))
diff --git a/lisp/subr.el b/lisp/subr.el
index bfdc0ff4a13..3dd87d65617 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2539,7 +2539,8 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
2539 (or (eq event exit-char) 2539 (or (eq event exit-char)
2540 (eq event (event-convert-list exit-char)) 2540 (eq event (event-convert-list exit-char))
2541 (setq unread-command-events 2541 (setq unread-command-events
2542 (append (this-single-command-raw-keys)))))) 2542 (append (this-single-command-raw-keys)
2543 unread-command-events)))))
2543 (delete-overlay ol)))) 2544 (delete-overlay ol))))
2544 2545
2545 2546
diff --git a/lisp/term.el b/lisp/term.el
index 4c829864200..06a44f29058 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1649,7 +1649,7 @@ See also `term-read-input-ring'."
1649 (let ((ch (read-event))) 1649 (let ((ch (read-event)))
1650 (if (eq ch ?\s) 1650 (if (eq ch ?\s)
1651 (set-window-configuration conf) 1651 (set-window-configuration conf)
1652 (setq unread-command-events (list ch))))))) 1652 (push ch unread-command-events))))))
1653 1653
1654 1654
1655(defun term-regexp-arg (prompt) 1655(defun term-regexp-arg (prompt)
@@ -4128,7 +4128,9 @@ Typing SPC flushes the help buffer."
4128 (set-window-configuration conf)) 4128 (set-window-configuration conf))
4129 (if (eq first ?\s) 4129 (if (eq first ?\s)
4130 (set-window-configuration conf) 4130 (set-window-configuration conf)
4131 (setq unread-command-events (listify-key-sequence key))))))) 4131 (setq unread-command-events
4132 (nconc (listify-key-sequence key)
4133 unread-command-events)))))))
4132 4134
4133;; I need a make-term that doesn't surround with *s -mm 4135;; I need a make-term that doesn't surround with *s -mm
4134(defun term-ansi-make-term (name program &optional startfile &rest switches) 4136(defun term-ansi-make-term (name program &optional startfile &rest switches)
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index b17d11d34a4..de25cbafb0d 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -3089,7 +3089,7 @@ SPC, it is ignored; if it is anything else, it is processed as a command."
3089 (let* ((echo-keystrokes 0) 3089 (let* ((echo-keystrokes 0)
3090 (c (read-event))) 3090 (c (read-event)))
3091 (if (not (eq c 32)) 3091 (if (not (eq c 32))
3092 (setq unread-command-events (list c))))) 3092 (push c unread-command-events))))
3093 (erase-buffer))))) 3093 (erase-buffer)))))
3094 3094
3095;; Improved auto-save file names. 3095;; Improved auto-save file names.