Function: ediff-combine-diffs

ediff-combine-diffs is an interactive and byte-compiled function defined in ediff-merg.el.gz.

Signature

(ediff-combine-diffs N &optional BATCH-INVOCATION)

Documentation

Combine Nth diff regions of buffers A and B and place the combination in C.

N is a prefix argument. If nil, combine the current difference regions. Combining is done according to the specifications in variable ediff-combination-pattern.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/ediff-merg.el.gz
;; N here is the user's region number.  It is 1+ what Ediff uses internally.
(defun ediff-combine-diffs (n &optional batch-invocation)
  "Combine Nth diff regions of buffers A and B and place the combination in C.
N is a prefix argument.  If nil, combine the current difference regions.
Combining is done according to the specifications in variable
`ediff-combination-pattern'."
  (interactive "P")
  (setq n (if (numberp n) (1- n) ediff-current-difference))

  (let (reg-combined)
    ;;(setq regA (ediff-get-region-contents n 'A ediff-control-buffer)
    ;;	  regB (ediff-get-region-contents n 'B ediff-control-buffer))
    ;;(setq reg-combined (ediff-make-combined-diff regA regB))
    (setq reg-combined (ediff-get-combined-region n))

    (ediff-copy-diff n nil 'C batch-invocation reg-combined))
    (or batch-invocation (ediff-jump-to-difference (1+ n))))