Signal an error in `search-forward-help-for-help'

* lisp/help.el (search-forward-help-for-help): Error out instead
of showing an empty buffer (bug#50881).
This commit is contained in:
Lars Ingebrigtsen 2021-09-29 17:43:16 +02:00
parent dab846e04f
commit 1aaeed903a

View file

@ -952,8 +952,11 @@ current buffer."
(describe-function-1 defn)))))))
(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.