]> git.eshelyaron.com Git - emacs.git/commitdiff
Signal an error in `search-forward-help-for-help'
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 29 Sep 2021 15:43:16 +0000 (17:43 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 29 Sep 2021 15:43:16 +0000 (17:43 +0200)
* lisp/help.el (search-forward-help-for-help): Error out instead
of showing an empty buffer (bug#50881).

lisp/help.el

index b794751ecab9cc518aa137850f5184bf63a37320..02e9b9e8e46f0e8c8c6b6ab488cb6553bf45da39 100644 (file)
@@ -952,8 +952,11 @@ current buffer."
            (describe-function-1 defn)))))))
 \f
 (defun search-forward-help-for-help ()
-  "Search forward \"help window\"."
+  "Search forward in the help-for-help window.
+This command is meant to be used after issuing the `C-h C-h' command."
   (interactive)
+  (unless (get-buffer help-for-help-buffer-name)
+    (error "No %s buffer; use `C-h C-h' first" help-for-help-buffer-name))
   ;; Move cursor to the "help window".
   (pop-to-buffer help-for-help-buffer-name)
   ;; Do incremental search forward.