Function: dired-do-replace-regexp-as-diff
dired-do-replace-regexp-as-diff is an autoloaded, interactive and
byte-compiled function defined in dired-aux.el.gz.
Signature
(dired-do-replace-regexp-as-diff FROM TO &optional DELIMITED)
Documentation
Do replace-regexp of FROM with TO as diff, on all marked files.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches. The replacements are displayed in the buffer *replace-diff* that you can later apply as a patch after reviewing the changes.
Probably introduced at or before Emacs version 30.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;;;###autoload
(defun dired-do-replace-regexp-as-diff (from to &optional delimited)
"Do `replace-regexp' of FROM with TO as diff, on all marked files.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
The replacements are displayed in the buffer *replace-diff* that
you can later apply as a patch after reviewing the changes."
(interactive
(let ((common
(query-replace-read-args
"Replace regexp as diff in marked files" t t t)))
(list (nth 0 common) (nth 1 common) (nth 2 common))))
(dired-post-do-command)
(multi-file-replace-regexp-as-diff
(dired-get-marked-files nil nil #'dired-nondirectory-p)
from to delimited))