diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-26 05:15:44 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-26 05:15:44 -0400 |
| commit | f8fc231f8ca4ac11f76ddd27c1ebe467260d7a8d (patch) | |
| tree | 49e8106fd6a3ca01c561ce6b8c54cdb692c84aa7 /modules/system-utils.el | |
| parent | 3fff6334c0b8d5c0566cfaed62f8d3294831f4fb (diff) | |
| download | dotemacs-f8fc231f8ca4ac11f76ddd27c1ebe467260d7a8d.tar.gz dotemacs-f8fc231f8ca4ac11f76ddd27c1ebe467260d7a8d.zip | |
chore(ibuffer): put diff on d and delete on D
In the ibuffer buffer list, d now diffs the buffer at point against its saved file (ibuffer-diff-with-file, was on =) and D marks it for deletion (was on d; x still executes the marks).
Diffstat (limited to 'modules/system-utils.el')
| -rw-r--r-- | modules/system-utils.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/system-utils.el b/modules/system-utils.el index c76193a71..00be88906 100644 --- a/modules/system-utils.el +++ b/modules/system-utils.el @@ -147,6 +147,16 @@ detached from Emacs." ;; in `nerd-icons-config'. (keymap-global-set "<remap> <list-buffers>" #'ibuffer) +;; Swap delete and diff in the ibuffer list: d diffs the buffer at point against +;; its saved file (was on =), and D marks it for deletion (was on d; `x' still +;; executes the marks). +(defvar ibuffer-mode-map) +(declare-function ibuffer-diff-with-file "ibuffer") +(declare-function ibuffer-mark-for-delete "ibuffer") +(with-eval-after-load 'ibuffer + (keymap-set ibuffer-mode-map "d" #'ibuffer-diff-with-file) + (keymap-set ibuffer-mode-map "D" #'ibuffer-mark-for-delete)) + ;;; -------------------------- Scratch Buffer Happiness ------------------------- (defvar scratch-emacs-version-and-system |
