]> code.delx.au - gnu-emacs/blobdiff - lisp/ehelp.el
; Do not overwrite preexisting contents of unread-command-events
[gnu-emacs] / lisp / ehelp.el
index 66e4f5c633bf7f4d0b14f3162efc4e27f41c1185..2e15af34a81242752d7e8aeb28da2f8dc11de596 100644 (file)
@@ -204,10 +204,10 @@ BUFFER is put back into its original major mode."
   (catch 'exit
     (if (pos-visible-in-window-p (point-max))
        (progn (message "%s" (substitute-command-keys "<<< Press Space to bury the help buffer, Press \\[electric-help-retain] to retain it >>>"))
-              (if (equal (setq unread-command-events (list (read-event)))
-                         '(?\s))
-                  (progn (setq unread-command-events nil)
-                         (throw 'exit t)))))
+               (let ((ev (read-event)))
+                 (if (equal ev ?\s)
+                     (throw 'exit t)
+                   (push ev unread-command-events)))))
     (let (up down both neither
          (standard (and (eq (key-binding " " nil t)
                             'scroll-up)