From e02bc0d2fb92677fe7cdfbc419de3eb04ab0f730 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 5 Oct 2024 00:43:06 +0200 Subject: [PATCH] Also use "Python Module Index" for info lookup * lisp/info-look.el (:mode): Also search Python module index. (cherry picked from commit e2b8e9d940d1bddff9c1d201f8ca6ea85f2af104) --- lisp/info-look.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 -- 2.39.2