about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/workstation/emacs/init.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/workstation/emacs/init.el b/modules/workstation/emacs/init.el
index 7d65b30dc7ba..40136d6ba400 100644
--- a/modules/workstation/emacs/init.el
+++ b/modules/workstation/emacs/init.el
@@ -32,6 +32,11 @@
 (global-set-key (kbd "C-x g") 'magit-status)
 (global-set-key (kbd "C-x M-g") 'magit-dispatch)
 
+;; Allow reverting buffers directly from the "Save file ...?" message.
+(add-to-list 'save-some-buffers-action-alist
+  `(?r ,(lambda (buf) (with-current-buffer buf (revert-buffer t t)))
+       ,(purecopy "revert this buffer")))
+
 ;;; Rainbow Delimiters ;;;
 (add-hook 'prog-mode-hook #'rainbow-delimiters-mode)