]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind 'imenu' to 'M-g i' globally
authorSean Whitton <spwhitton@spwhitton.name>
Thu, 14 Apr 2022 14:12:41 +0000 (07:12 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Thu, 21 Apr 2022 18:57:01 +0000 (11:57 -0700)
Another candidate was 'M-s i'.  Discussion on emacs-devel has led me
to conclude that most people will find 'M-g i' more intuitive and thus
easier to memorize.

* lisp/bindings.el (goto-map): Bind 'imenu' to 'M-g i' globally.
* etc/NEWS: Document the change.
* doc/emacs/programs.texi (Imenu):
* lisp/progmodes/cperl-mode.el: Replace 'M-x imenu' with 'M-g i'.

doc/emacs/programs.texi
etc/NEWS
lisp/bindings.el
lisp/progmodes/cperl-mode.el

index ff4405f1fbcfc96d6ca8e0fd61042816e19e21c5..45bc4c79b4fd414672b3ceea70d92b99d2a357b6 100644 (file)
@@ -250,8 +250,8 @@ where it treats each chapter, section, etc., as a definition.
 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.
 
index 36db29bbbeb59da74bfedb9fb772d5c76194bdb5..f8938534f39c03041fad10dc3bbad689d27bfe13 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -546,6 +546,9 @@ Rcirc will use the default 'completion-at-point' mechanism.  The
 conventional IRC behaviour of completing by cycling through the
 available options can be restored by enabling this option.
 
++++
+** 'imenu' is now bound to 'M-g i' globally.
+
 * Editing Changes in Emacs 29.1
 
 ---
index 1913f82600478f826cd30afb6ec5dff16ce711e1..bfe5ba862370e43b2a1ab9afe2bebae95d1c4642 100644 (file)
@@ -1127,6 +1127,7 @@ if `inhibit-field-text-motion' is non-nil."
 (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.")
index 94ecc45b15fb777f1fbd87b26de849a48a1b971b..3742286e5d3fb45f516f287e417977c85fb4d8b5 100644 (file)
@@ -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)