From a1efc55529cbc35d82e37984ada880e16ca94ecd Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 14 Apr 2022 07:12:41 -0700 Subject: [PATCH] Bind 'imenu' to 'M-g i' globally. * lisp/bindings.el (goto-map): Bind 'imenu' to 'M-g i' globally. * doc/emacs/programs.texi (Imenu): * lisp/progmodes/cperl-mode.el: Replace 'M-x imenu' with 'M-g i'. * etc/NEWS: Document the change. --- doc/emacs/programs.texi | 4 ++-- etc/NEWS | 3 +++ lisp/bindings.el | 1 + lisp/progmodes/cperl-mode.el | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index ff4405f1fb..45bc4c79b4 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -250,8 +250,8 @@ Imenu together.) @findex imenu - If you type @kbd{M-x imenu}, it reads the name of a definition using -the minibuffer, then moves point to that definition. You can use + If you type @kbd{M-g i}, it reads the name of a definition using the +minibuffer, then moves point to that definition. You can use completion to specify the name; the command always displays the whole list of valid names. diff --git a/etc/NEWS b/etc/NEWS index 79c27da549..152fc40c46 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -499,6 +499,9 @@ are met. The conditions are given by the argument, which can be +++ *** New command 'rcirc-when'. ++++ +** 'imenu' is now bound to 'M-g i' globally. + * Editing Changes in Emacs 29.1 --- diff --git a/lisp/bindings.el b/lisp/bindings.el index 1913f82600..bfe5ba8623 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1127,6 +1127,7 @@ goto-map (define-key goto-map "p" 'previous-error) (define-key goto-map "\M-p" 'previous-error) (define-key goto-map "\t" 'move-to-column) +(define-key goto-map "i" 'imenu) (defvar search-map (make-sparse-keymap) "Keymap for search related commands.") diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 94ecc45b15..3742286e5d 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -64,7 +64,7 @@ ;; This mode supports font-lock, imenu and mode-compile. In the ;; hairy version font-lock is on, but you should activate imenu ;; yourself (note that mode-compile is not standard yet). Well, you -;; can use imenu from keyboard anyway (M-x imenu), but it is better +;; can use imenu from keyboard anyway (M-g i), but it is better ;; to bind it like that: ;; (define-key global-map [M-S-down-mouse-3] 'imenu) -- 2.30.2