]> git.eshelyaron.com Git - emacs.git/commit
Improve ibuffer-diff-with-file
authorBasil L. Contovounesios <contovob@tcd.ie>
Sat, 1 Apr 2023 14:14:34 +0000 (15:14 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Sat, 8 Apr 2023 10:51:43 +0000 (11:51 +0100)
commit10b58633b566cf8f66f12e2126da3b43cd09dfc8
tree58db217f3824018d92b20d1f778140ee52a17f0f
parent9848ae17161828190cc0ba31e89ae54a2f08a2ef
Improve ibuffer-diff-with-file

* lisp/ibuf-ext.el (ibuffer-diff-with-file): Link to diff-command in
docstring.  Make Diff buffer read-only from outset and inhibit as
needed to avoid surprises.  Check whether diff-command
supports --label.  Leave point at BOB and clean up any excess
newline inserted by ibuffer-diff-buffer-with-file-1.  Prefer
pop-to-buffer-same-window over switch-to-buffer.

(ibuffer-diff-buffer-with-file-1): Add docstring.  Remove unused
unwind-protect and copypasta from diff-no-select (bug#62599).  Use
diff-file-local-copy, string-join, and redisplay in place of
analogues.  Condition --label use on availability, and label buffers
consistently with diff-no-select.  Leave empty line between runs.
Let diff-sentinel delete temporary files.  Leave point at EOB for
next run.
lisp/ibuf-ext.el