emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 ac09e8e: * lisp/vc/smerge-mode.el (smerge-match-conflict): Fix


From: Stefan Monnier
Subject: emacs-27 ac09e8e: * lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#38456
Date: Tue, 21 Jan 2020 15:58:24 -0500 (EST)

branch: emacs-27
commit ac09e8e1213631e2843af7e81cffa749edc5f074
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#38456
    
    This situation is not an internal error, but a perfectly normal occurrence,
    so a `cl-assert` is not right
---
 lisp/vc/smerge-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index d4984bb..85868b9 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -797,7 +797,10 @@ An error is raised if not inside a conflict."
               (filename (or (match-string 1) ""))
 
               (_ (re-search-forward smerge-end-re))
-              (_ (cl-assert (< orig-point (match-end 0))))
+              (_ (when (< (match-end 0) orig-point)
+                   ;; Point is not within the conflict we found,
+                    ;; so this conflict is not ours.
+                   (signal 'search-failed (list smerge-begin-re))))
 
               (lower-end (match-beginning 0))
               (end (match-end 0))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]