Function: smerge-makeup-conflict
smerge-makeup-conflict is an interactive and byte-compiled function
defined in smerge-mode.el.gz.
Signature
(smerge-makeup-conflict PT1 PT2 PT3 &optional PT4)
Documentation
Insert diff3 markers to make a new conflict.
Uses point and mark for two of the relevant positions and previous marks
for the other ones.
By default, makes up a 2-way conflict,
with a C-u (universal-argument) prefix, makes up a 3-way conflict.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/smerge-mode.el.gz
(defun smerge-makeup-conflict (pt1 pt2 pt3 &optional pt4)
"Insert diff3 markers to make a new conflict.
Uses point and mark for two of the relevant positions and previous marks
for the other ones.
By default, makes up a 2-way conflict,
with a \\[universal-argument] prefix, makes up a 3-way conflict."
(interactive
(list (point)
(mark)
(progn (pop-mark) (mark))
(when current-prefix-arg (pop-mark) (mark))))
;; Start from the end so as to avoid problems with pos-changes.
(pcase-let ((`(,pt1 ,pt2 ,pt3 ,pt4)
(sort `(,pt1 ,pt2 ,pt3 ,@(if pt4 (list pt4))) '>=)))
(goto-char pt1) (beginning-of-line)
(insert ">>>>>>> LOWER\n")
(goto-char pt2) (beginning-of-line)
(insert "=======\n")
(goto-char pt3) (beginning-of-line)
(when pt4
(insert "||||||| BASE\n")
(goto-char pt4) (beginning-of-line))
(insert "<<<<<<< UPPER\n"))
(if smerge-mode nil (smerge-mode 1))
(smerge-refine))