• Stefan Monnier's avatar
    Cleanup diff-buffer-with-file. · b2e44819
    Stefan Monnier authored
    * lisp/vc/diff.el (diff-old-temp-file, diff-new-temp-file): Remove.
    (diff-sentinel): Get them as arguments instead.
    (diff-old-file, diff-new-file, diff-extra-args): Remove.
    (diff-file-local-copy, diff-better-file-name): New funs.
    (diff-no-select): Rename from diff-into-buffer.
    Support buffers additionally to files.  Move `buf' arg.  Don't display buf.
    Prefer closures to buffer-local variables.
    (diff): Adjust accordingly.
    (diff-buffer-with-file): Move from files.el.
    * lisp/files.el (diff-buffer-with-file): Move to vc/diff.el.
    (diff-buffer-internal): Remove.
    (diff-buffer-buffer): Remove.
    (save-some-buffers-action-alist): Use diff-no-select so as not to guess
    the buffer name used, and so as not to mess up windows and frames.
    b2e44819
files.el 258 KB