aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
authorRaúl Benencia <id@rbenencia.name>2024-12-12 07:30:49 -0800
committerRaúl Benencia <id@rbenencia.name>2024-12-12 07:31:14 -0800
commit9900cf013511222e03aed453ba517c939d6f8cd3 (patch)
tree1239db139a63117ebc7dbd256c0321572f6ff9c7 /.emacs.d/init.el
parent3b7b57a0900e7e49e3fbc2520b0e6b01f4526be1 (diff)
emacs: same-some-buffers diff option
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