bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40915: [PATCH] Make leaving Info-summary more intuitive


From: Stefan Kangas
Subject: bug#40915: [PATCH] Make leaving Info-summary more intuitive
Date: Tue, 28 Apr 2020 19:39:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> For (a), what do you mean by a "general" help
> command?  The point of Info-summary is to provide
> succinct help about Info.

I meant that you can have a command which works in any major mode very
easily:

 (defun Info-summary ()
   "Display a brief summary of all Info commands."
   (interactive)
   (save-window-excursion
     (switch-to-buffer "*Help*")
     (setq buffer-read-only nil)
     (erase-buffer)
-    (insert (documentation 'Info-mode))
+    (insert (documentation major-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)))
     (bury-buffer "*Help*")))

Best regards,
Stefan Kangas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]