emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 0bfb259 11/57: Add vdiff-debug flag


From: Justin Burkett
Subject: [elpa] master 0bfb259 11/57: Add vdiff-debug flag
Date: Tue, 3 Nov 2020 14:32:18 -0500 (EST)

branch: master
commit 0bfb2592f9cd021224ece3e619e70269b6219860
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>

    Add vdiff-debug flag
---
 vdiff.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 3427dc8..01610f6 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -61,6 +61,7 @@
 
 (defvar vdiff-mode)
 (defvar vdiff-3way-mode)
+(defvar vdiff-debug nil)
 
 (defgroup vdiff nil
   "Diff tool that is like vimdiff"
@@ -610,7 +611,8 @@ an addition when compared to other vdiff buffers."
                          (beg-b (cdr lines)))
                      (while (looking-at-p "+")
                        (setq lines (vdiff--inc-lines lines)))
-                     (cl-assert (or (looking-at-p " ") (eobp)))
+                     (when vdiff-debug
+                       (cl-assert (or (looking-at-p " ") (eobp))))
                      (push
                       ;; there's no context lines at the beginning of the file
                       (list (cons (if (= beg-a 1) 1 (1+ beg-a)) nil)
@@ -628,11 +630,13 @@ an addition when compared to other vdiff buffers."
                           (list (cons beg-a (if (= (car lines) 1) 1 (1- (car 
lines))))
                                 (cons (1+ beg-b) nil))
                           res)
-                       (cl-assert (or (looking-at-p "+") (eobp)))
+                       (when vdiff-debug
+                         (cl-assert (or (looking-at-p "+") (eobp))))
                        (let ((beg-b (cdr lines)))
                          (while (looking-at-p "+")
                            (setq lines (vdiff--inc-lines lines)))
-                         (cl-assert (or (looking-at-p " ") (eobp)))
+                         (when vdiff-debug
+                           (cl-assert (or (looking-at-p " ") (eobp))))
                          (push
                           (list (cons beg-a (1- (car lines)))
                                 (cons beg-b (1- (cdr lines))))



reply via email to

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