Function: smerge-vc-next-conflict
smerge-vc-next-conflict is an interactive and byte-compiled function
defined in smerge-mode.el.gz.
Signature
(smerge-vc-next-conflict)
Documentation
Go to next conflict, possibly in another file.
First tries to go to the next conflict in the current buffer, and if not found, uses VC to try and find the next file with conflict.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/smerge-mode.el.gz
(defun smerge-vc-next-conflict ()
"Go to next conflict, possibly in another file.
First tries to go to the next conflict in the current buffer, and if not
found, uses VC to try and find the next file with conflict."
(interactive)
(condition-case nil
;; FIXME: Try again from BOB before moving to the next file.
(smerge-next)
(error
(if (and (or smerge-change-buffer-confirm
(and (buffer-modified-p) buffer-file-name))
(not (or (eq last-command this-command)
(eq ?\r last-command-event)))) ;Called via M-x!?
;; FIXME: Don't emit this message if `vc-find-conflicted-file' won't
;; go to another file anyway (because there are no more conflicted
;; files).
(message (if (buffer-modified-p)
"No more conflicts here. Repeat to save and go to next buffer"
"No more conflicts here. Repeat to go to next buffer"))
(if (and (buffer-modified-p) buffer-file-name)
(save-buffer))
(vc-find-conflicted-file)
;; At this point, the caret will only be at a conflict marker
;; if the file did not correspond to an opened
;; buffer. Otherwise we need to jump to a marker explicitly.
(unless (looking-at "^<<<<<<<")
(let ((prev-pos (point)))
(goto-char (point-min))
(unless (ignore-errors (not (smerge-next)))
(goto-char prev-pos))))))))