Function: smerge-swap
smerge-swap is an interactive and byte-compiled function defined in
smerge-mode.el.gz.
Signature
(smerge-swap)
Documentation
Swap the "Upper" and the "Lower" chunks.
Can be used before things like smerge-keep-all or smerge-resolve where the
ordering can have some subtle influence on the result, such as preferring the
spacing of the "Lower" chunk.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/smerge-mode.el.gz
(defun smerge-swap ()
;; FIXME: Extend for diff3 to allow swapping the middle end as well.
"Swap the \"Upper\" and the \"Lower\" chunks.
Can be used before things like `smerge-keep-all' or `smerge-resolve' where the
ordering can have some subtle influence on the result, such as preferring the
spacing of the \"Lower\" chunk."
(interactive)
(smerge-match-conflict)
(goto-char (match-beginning 3))
(let ((txt3 (delete-and-extract-region (point) (match-end 3))))
(insert (delete-and-extract-region (match-beginning 1) (match-end 1)))
(goto-char (match-beginning 1))
(insert txt3)))