[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g'
From: |
Lars Ingebrigtsen |
Subject: |
master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g' |
Date: |
Sun, 7 Feb 2021 07:30:47 -0500 (EST) |
branch: master
commit a6a5d6a27a86396ab96662fa158cdcc854bd777b
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Move 'revert-buffer' global binding to 'C-x g g'
* lisp/bindings.el: Define ctl-x-g-map and bind 'revert-buffer' to
'C-x x g' globally.
* doc/emacs/files.texi: Replace 'C-x g' with 'C-x x g'.
* etc/NEWS: Document the change (bug#46300).
---
doc/emacs/files.texi | 2 +-
etc/NEWS | 2 +-
lisp/bindings.el | 7 ++++++-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 12ceac8..6b3bc43 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -927,7 +927,7 @@ Manual}). For customizations, see the Custom group
@code{time-stamp}.
If you have made extensive changes to a file-visiting buffer and
then change your mind, you can @dfn{revert} the changes and go back to
-the saved version of the file. To do this, type @kbd{C-x g}. Since
+the saved version of the file. To do this, type @kbd{C-x x g}. Since
reverting unintentionally could lose a lot of work, Emacs asks for
confirmation first.
diff --git a/etc/NEWS b/etc/NEWS
index fb77688..b80c649 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -234,7 +234,7 @@ still applies for shorter search strings, which avoids
flicker in the
search buffer due to too many matches being highlighted.
+++
-** 'revert-buffer' is now bound to 'C-x g' globally.
+** 'revert-buffer' is now bound to 'C-x x g' globally.
* Editing Changes in Emacs 28.1
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 9ea188d..35adfa8 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1413,7 +1413,12 @@ if `inhibit-field-text-motion' is non-nil."
(define-key ctl-x-map "z" 'repeat)
-(define-key ctl-x-map "g" #'revert-buffer)
+(defvar ctl-x-x-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "g" #'revert-buffer)
+ map)
+ "Keymap for subcommands of C-x x.")
+(define-key ctl-x-map "x" ctl-x-x-map)
(define-key esc-map "\C-l" 'reposition-window)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g',
Lars Ingebrigtsen <=