Check for doc-spec-function early, in interactive invocation

* lisp/info-look.el (info-lookup-interactive-arguments):
Move here.
(info-lookup): From here.  (Bug#71314)
This commit is contained in:
James Thomas 2024-06-02 05:59:35 +05:30 committed by Eli Zaretskii
parent 579aaa1ec2
commit d7be9fdbc0

View file

@ -327,8 +327,11 @@ string of `info-lookup-alist'.
If optional argument QUERY is non-nil, query for the help mode."
(let* ((mode (cond (query
(info-lookup-change-mode topic))
((info-lookup->mode-value topic (info-lookup-select-mode))
info-lookup-mode)
((when-let
((info (info-lookup->mode-value
topic (info-lookup-select-mode))))
(info-lookup--expand-info info))
info-lookup-mode)
((info-lookup-change-mode topic))))
(completions (info-lookup->completions topic mode))
(default (info-lookup-guess-default topic mode))
@ -404,9 +407,6 @@ If SAME-WINDOW, reuse the current window. If nil, pop to a
different window."
(or mode (setq mode (info-lookup-select-mode)))
(setq mode (info-lookup--item-to-mode item mode))
(if-let ((info (info-lookup->mode-value topic mode)))
(info-lookup--expand-info info)
(error "No %s help available for `%s'" topic mode))
(let* ((completions (info-lookup->completions topic mode))
(ignore-case (info-lookup->ignore-case topic mode))
(entry (or (assoc (if ignore-case (downcase item) item) completions)