emacs-diffs
[Top][All Lists]
Advanced

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

master 7d15fa0: Bind 'revert-buffer' to 'C-x g' globally


From: Lars Ingebrigtsen
Subject: master 7d15fa0: Bind 'revert-buffer' to 'C-x g' globally
Date: Tue, 2 Feb 2021 03:49:34 -0500 (EST)

branch: master
commit 7d15fa008af774789a91d7242055dc87497df66f
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Bind 'revert-buffer' to 'C-x g' globally
    
    * lisp/bindings.el: Bind 'revert-buffer' to 'C-x g' globally.
    * doc/emacs/files.texi: Replace 'M-x revert-buffer' with 'C-x g'.
    * etc/NEWS: Document the change (bug#46151).
---
 doc/emacs/files.texi | 6 +++---
 etc/NEWS             | 3 +++
 lisp/bindings.el     | 2 ++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index ede382c..12ceac8 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -927,9 +927,9 @@ 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{M-x
-revert-buffer}.  Since reverting unintentionally could lose a lot of
-work, Emacs asks for confirmation first.
+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.
 
   The @code{revert-buffer} command tries to position point in such a
 way that, if the file was edited only slightly, you will be at
diff --git a/etc/NEWS b/etc/NEWS
index fc3a3da..a376df6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -233,6 +233,9 @@ search string is at least this long.  
'lazy-highlight-initial-delay'
 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.
+
 
 * Editing Changes in Emacs 28.1
 
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 43b62f9..9ea188d 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1413,6 +1413,8 @@ if `inhibit-field-text-motion' is non-nil."
 
 (define-key ctl-x-map "z" 'repeat)
 
+(define-key ctl-x-map "g" #'revert-buffer)
+
 (define-key esc-map "\C-l" 'reposition-window)
 
 (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)



reply via email to

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