Function: ediff-merge-revisions
ediff-merge-revisions is an autoloaded, interactive and byte-compiled
function defined in ediff.el.gz.
Signature
(ediff-merge-revisions &optional FILE STARTUP-HOOKS MERGE-BUFFER-FILE)
Documentation
Run Ediff by merging two revisions of a file.
The file is the optional FILE argument or the file visited by the current buffer. STARTUP-HOOKS is a list of functions that Emacs calls without arguments after setting up the Ediff buffers. MERGE-BUFFER-FILE is the name of the file to be associated with the merge buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/ediff.el.gz
;;;###autoload
(defun ediff-merge-revisions (&optional file startup-hooks merge-buffer-file)
;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer
"Run Ediff by merging two revisions of a file.
The file is the optional FILE argument or the file visited by the
current buffer. STARTUP-HOOKS is a list of functions that Emacs
calls without arguments after setting up the Ediff buffers.
MERGE-BUFFER-FILE is the name of the file to be associated with
the merge buffer."
(interactive)
(if (stringp file) (find-file file))
(let (rev1 rev2)
(setq rev1
(read-string
(format-prompt "Version 1 to merge"
(concat
(if (stringp file)
(file-name-nondirectory file)
"current buffer")
"'s working version")))
rev2
(read-string
(format-prompt "Version 2 to merge"
(if (stringp file)
(file-name-nondirectory file)
"current buffer"))))
(ediff-load-version-control)
;; ancestor-revision=nil
(funcall
(intern (format "ediff-%S-merge-internal" ediff-version-control-package))
rev1 rev2 nil startup-hooks merge-buffer-file)))