From 0d34e8b98c76bfc1f9dcd24dc0691793b2e03ae5 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 28 Apr 2020 00:25:11 +0200 Subject: [PATCH] Make leaving Info-summary more intuitive * lisp/info.el (Info-summary): Discard character on exit instead of pushing it onto 'unread-command-events'. --- lisp/info.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 3015e60a4f..703907b98f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3828,14 +3828,14 @@ Info-summary (insert (documentation 'Info-mode)) (help-mode) (goto-char (point-min)) - (let (ch flag) - (while (progn (setq flag (not (pos-visible-in-window-p (point-max)))) - (message (if flag "Type Space to see more" - "Type Space to return to Info")) - (if (not (eq ?\s (setq ch (read-event)))) - (progn (push ch unread-command-events) nil) - flag)) - (scroll-up))) + (while (let ((flag (not (pos-visible-in-window-p (point-max))))) + (message (if flag "Type Space to see more" + "Type any key to return to Info")) + ;; Space scrolls if there is more content. + ;; Any other key returns. + (setq ch (read-event)) + (and flag (eq ch ?\s))) + (scroll-up)) (bury-buffer "*Help*"))) (defun Info-get-token (pos start all &optional errorstring) -- 2.26.2