diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/info-look.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/info-look.el')
-rw-r--r-- | lisp/info-look.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el index fd6f8f15082..33f15a34e99 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -43,6 +43,7 @@ (require 'info) (eval-when-compile (require 'subr-x)) +(eval-when-compile (require 'cl-lib)) (defgroup info-lookup nil "Major mode sensitive help agent." @@ -901,6 +902,16 @@ Return nil if there is nothing appropriate in the buffer near point." :parse-rule "[$@%]?\\([_a-zA-Z0-9]+\\|[^a-zA-Z]\\)") (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")))) + +(info-lookup-maybe-add-help :mode 'cperl-mode :regexp "[$@%][^a-zA-Z]\\|\\$\\^[A-Z]\\|[$@%]?[a-zA-Z][_a-zA-Z0-9]*" :other-modes '(perl-mode)) |