1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-08 00:33:13 -08:00

Also use "Python Module Index" for info lookup

* lisp/info-look.el (:mode): Also search Python module index.
This commit is contained in:
Stefan Kangas 2024-10-05 00:43:06 +02:00
parent 0cca6146dc
commit e2b8e9d940

View file

@ -976,14 +976,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