]> git.eshelyaron.com Git - emacs.git/commitdiff
Move 'revert-buffer' global binding to 'C-x g g'
authorSean Whitton <spwhitton@spwhitton.name>
Sun, 7 Feb 2021 12:30:33 +0000 (13:30 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Feb 2021 12:30:42 +0000 (13:30 +0100)
* 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
etc/NEWS
lisp/bindings.el

index 12ceac800efb4eb8523111161db27e1b8396ed34..6b3bc430d97cfd8ba2be56079d1c2ce34a7b9cc0 100644 (file)
@@ -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 g}.  Since
 reverting unintentionally could lose a lot of work, Emacs asks for
 confirmation first.
 
index fb776884701a4d2be18dec24a70b75bef31b4359..b80c649074e98c15b5a56886d3bfe73bee3fc9f2 100644 (file)
--- 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 g' globally.
 
 \f
 * Editing Changes in Emacs 28.1
index 9ea188d1a005e32913fe98155762855d5e65fda1..35adfa8172c01bf9bf30070626585f82522ee389 100644 (file)
@@ -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)