From: Stefan Kangas Date: Fri, 4 Oct 2024 22:43:06 +0000 (+0200) Subject: Also use "Python Module Index" for info lookup X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e02bc0d2fb92677fe7cdfbc419de3eb04ab0f730;p=emacs.git Also use "Python Module Index" for info lookup * lisp/info-look.el (:mode): Also search Python module index. (cherry picked from commit e2b8e9d940d1bddff9c1d201f8ca6ea85f2af104) --- diff --git a/lisp/info-look.el b/lisp/info-look.el index 9834c6d19ba..6926d524b82 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -977,14 +977,14 @@ Return nil if there is nothing appropriate in the buffer near point." :doc-spec-function (lambda () ;; Python is released annually (PEP 602). - (let ((yy (- (decoded-time-year (decode-time (current-time))) 2000))) - (list - (list - (cl-loop for version from yy downto 7 - for name = (format "python3.%d" version) - if (Info-find-file name t) - return (format "(%s)Index" name) - finally return "(python)Index")))))) + (let* ((yy (- (decoded-time-year (decode-time (current-time))) 2000)) + (manual (cl-loop for version from yy downto 7 + for name = (format "python3.%d" version) + if (Info-find-file name t) + return name + finally return "python"))) + `((,(format "(%s)Index" manual)) + (,(format "(%s)Python Module Index" manual)))))) (info-lookup-maybe-add-help :mode 'perl-mode