From 9900cf013511222e03aed453ba517c939d6f8cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Thu, 12 Dec 2024 07:30:49 -0800 Subject: emacs: same-some-buffers diff option --- .emacs.d/init.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.emacs.d/init.el') 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 -- cgit v1.2.3