From 5955ebe1db5dc44bc2564a559ff9e86bd5ae078e Mon Sep 17 00:00:00 2001 From: James Thomas Date: Sun, 2 Jun 2024 05:59:35 +0530 Subject: [PATCH] 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) (cherry picked from commit d7be9fdbc009ecf314e1ae9166429188b6ddb121) --- lisp/info-look.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/info-look.el b/lisp/info-look.el index cd59fdf17d7..2baf133c7d3 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -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) -- 2.39.2