]> code.delx.au - gnu-emacs/blobdiff - lisp/comint.el
; Do not overwrite preexisting contents of unread-command-events
[gnu-emacs] / lisp / comint.el
index de2206197514cd5307fa2ed3b342e41ee430de66..7db297a142752929dc12d0163f1dbd1bb61d28ab 100644 (file)
@@ -1051,7 +1051,7 @@ See also `comint-read-input-ring'."
       (let ((ch (read-event)))
        (if (eq ch ?\s)
            (set-window-configuration conf)
-         (setq unread-command-events (list ch)))))))
+         (push ch unread-command-events))))))
 
 
 (defun comint-regexp-arg (prompt)
@@ -3365,7 +3365,8 @@ the completions."
            (set-window-configuration comint-dynamic-list-completions-config))
        (if (eq first ?\s)
            (set-window-configuration comint-dynamic-list-completions-config)
-         (setq unread-command-events (listify-key-sequence key)))))))
+         (setq unread-command-events
+                (nconc (listify-key-sequence key) unread-command-events)))))))
 \f
 (defun comint-get-next-from-history ()
   "After fetching a line from input history, this fetches the following line.