diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-04 10:23:18 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-04 10:23:18 +0200 |
commit | ef6c43b896bb50ca76e1c79ac6185d95169520f4 (patch) | |
tree | de4cc9d166f9d6fce6d20db0d8cab025f60178c6 | |
parent | 3b8dda6c903e8e103a26ce812fc9400b301a09ae (diff) | |
download | emacs-ef6c43b896bb50ca76e1c79ac6185d95169520f4.tar.gz emacs-ef6c43b896bb50ca76e1c79ac6185d95169520f4.tar.bz2 emacs-ef6c43b896bb50ca76e1c79ac6185d95169520f4.zip |
Revert "Make info-look search harder for the Python info file"
This reverts commit 711eb40b9b9e2aabd0e23ec264e8e8f913329d33.
This leads to loading info-look being excessively slow if the info path is long. It'll be reimplemented in Emacs 29.
-rw-r--r-- | lisp/info-look.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el index 7cc5462dd4a..cc6a806f56f 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -43,7 +43,6 @@ (require 'info) (eval-when-compile (require 'subr-x)) -(eval-when-compile (require 'cl-lib)) (defgroup info-lookup nil "Major mode sensitive help agent." @@ -905,13 +904,9 @@ Return nil if there is nothing appropriate in the buffer near point." (info-lookup-maybe-add-help :mode 'python-mode - ;; Debian includes Python info files, but they're version-named - ;; instead of having a symlink. - :doc-spec `((,(cl-loop for version from 20 downto 7 - for name = (format "python3.%d" version) - if (Info-find-file name t) - return (format "(%s)Index" name) - finally return "(python)Index")))) + :doc-spec `((,(if (Info-find-file "python3.9" t) + "(python3.9)Index" + "(python)Index")))) (info-lookup-maybe-add-help :mode 'cperl-mode |