emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ad89ec84ee 1/2: Bind 'imenu' to 'M-g i' globally


From: Sean Whitton
Subject: master ad89ec84ee 1/2: Bind 'imenu' to 'M-g i' globally
Date: Thu, 21 Apr 2022 15:01:49 -0400 (EDT)

branch: master
commit ad89ec84ee20a027e36922c187ad9f2dcb93bcaf
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Sean Whitton <spwhitton@spwhitton.name>

    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'.
---
 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 @@ 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.
 
diff --git a/etc/NEWS b/etc/NEWS
index 36db29bbbe..f8938534f3 100644
--- 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
 
 ---
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 @@ 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.")
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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]