aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r--.emacs.d/init.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index acad923..a07d86f 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -52,6 +52,13 @@
(pixel-scroll-precision-mode 1) ; Precision scrolling
+
+;; Source: https://protesilaos.com/codelog/2024-12-11-emacs-diff-save-some-buffers/
+(add-to-list 'save-some-buffers-action-alist
+ (list "d"
+ (lambda (buffer) (diff-buffer-with-file (buffer-file-name buffer)))
+ "show diff between the buffer and its file"))
+
;; Server
(require 'server)
(setq server-client-instructions nil) ; Keep it quiet when opening an ec
nihil fit ex nihilo