]> git.eshelyaron.com Git - emacs.git/commitdiff
Also use "Python Module Index" for info lookup
authorStefan Kangas <stefankangas@gmail.com>
Fri, 4 Oct 2024 22:43:06 +0000 (00:43 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 6 Oct 2024 06:49:03 +0000 (08:49 +0200)
* lisp/info-look.el (:mode): Also search Python module index.

(cherry picked from commit e2b8e9d940d1bddff9c1d201f8ca6ea85f2af104)

lisp/info-look.el

index 9834c6d19ba93f2ca3acf4df4b5e5ecf46b86453..6926d524b82da09ce120bc7131570f842b307ca3 100644 (file)
@@ -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