Function: ediff-merge-buffers
ediff-merge-buffers is an autoloaded, interactive and byte-compiled
function defined in ediff.el.gz.
Signature
(ediff-merge-buffers BUFFER-A BUFFER-B &optional STARTUP-HOOKS JOB-NAME MERGE-BUFFER-FILE)
Documentation
Merge buffers without ancestor.
BUFFER-A and BUFFER-B are the buffers to be merged.
STARTUP-HOOKS is a list of functions that Emacs calls without
arguments after setting up the Ediff buffers. JOB-NAME is a
symbol describing the Ediff job type; it defaults to
ediff-merge-buffers, but can also be one of
ediff-merge-files-with-ancestor, ediff-last-dir-ancestor,
ediff-last-dir-C, ediff-buffers, ediff-buffers3, or
ediff-merge-buffers-with-ancestor. 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-buffers (buffer-A buffer-B
&optional
;; MERGE-BUFFER-FILE is the file to be
;; associated with the merge buffer
startup-hooks job-name merge-buffer-file)
"Merge buffers without ancestor.
BUFFER-A and BUFFER-B are the buffers to be merged.
STARTUP-HOOKS is a list of functions that Emacs calls without
arguments after setting up the Ediff buffers. JOB-NAME is a
symbol describing the Ediff job type; it defaults to
`ediff-merge-buffers', but can also be one of
`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor',
`ediff-last-dir-C', `ediff-buffers', `ediff-buffers3', or
`ediff-merge-buffers-with-ancestor'. MERGE-BUFFER-FILE is the
name of the file to be associated with the merge buffer."
(interactive
(let (bf)
(list (setq bf (read-buffer "Buffer A to merge: "
(ediff-other-buffer "") t))
(read-buffer "Buffer B to merge: "
(progn
;; realign buffers so that two visible bufs will be
;; at the top
(save-window-excursion (other-window 1))
(ediff-other-buffer bf))
t))))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
(or job-name (setq job-name 'ediff-merge-buffers))
(ediff-buffers-internal
buffer-A buffer-B nil startup-hooks job-name merge-buffer-file))