Bind 'imenu' to 'M-g i' globally

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'.
This commit is contained in:
Sean Whitton 2022-04-14 07:12:41 -07:00
parent 783dd6da31
commit ad89ec84ee
4 changed files with 7 additions and 3 deletions

View 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.

View file

@ -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
---

View 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.")

View 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)