;; handle the various conflict styles
(cond
+ ((save-excursion
+ (goto-char mine-start)
+ (re-search-forward smerge-begin-re nil end))
+ ;; There's a nested conflict and we're after the the beginning
+ ;; of the outer one but before the beginning of the inner one.
+ (error "There is a nested conflict"))
+
((re-search-backward smerge-base-re start t)
;; a 3-parts conflict
(set (make-local-variable 'smerge-conflict-style) 'diff3-A)
Returns non-nil if a match is found between the point and LIMIT.
The point is moved to the end of the conflict."
(when (re-search-forward smerge-begin-re limit t)
- (ignore-errors
- (smerge-match-conflict)
- (goto-char (match-end 0)))))
+ (condition-case err
+ (progn
+ (smerge-match-conflict)
+ (goto-char (match-end 0)))
+ (error (smerge-find-conflict limit)))))
(defun smerge-diff (n1 n2)
(smerge-match-conflict)
(provide 'smerge-mode)
-;;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690
+;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690
;;; smerge-mode.el ends here