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

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

[nongnu] elpa/sweeprolog 4580354dce 4/5: FIXED: beginning-of-clause dete


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog 4580354dce 4/5: FIXED: beginning-of-clause detection with quoted head functors
Date: Thu, 16 Feb 2023 09:00:20 -0500 (EST)

branch: elpa/sweeprolog
commit 4580354dce0434c5f7fccef6ff9c4cad2e7c8fe2
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    FIXED: beginning-of-clause detection with quoted head functors
    
    * sweeprolog.el (sweeprolog-beginning-of-top-term): don't skip quoted
    functors in clause heads.
---
 sweeprolog.el | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/sweeprolog.el b/sweeprolog.el
index 6bf7e5afb0..990c19fd41 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -3073,17 +3073,20 @@ is the prefix argument."
             (setq times (1- times))
             (when-let ((safe-start (nth 8 (syntax-ppss))))
               (goto-char safe-start))
-            (re-search-backward (rx bol graph) nil t)
-            (let ((safe-start (or (nth 8 (syntax-ppss))
-                                  (nth 8 (syntax-ppss (1+ (point)))))))
-              (while (and safe-start (not (bobp)))
-                (goto-char safe-start)
-                (if (bobp)
-                    (setq safe-start nil)
-                  (backward-char)
-                  (re-search-backward (rx bol graph) nil t)
-                  (setq safe-start (or (nth 8 (syntax-ppss))
-                                       (nth 8 (syntax-ppss (1+ (point))))))))))
+            (unless (and (sweeprolog-at-beginning-of-top-term-p)
+                         (not (= p (point))))
+              (re-search-backward (rx bol graph) nil t)
+              (let ((safe-start (or (nth 8 (syntax-ppss))
+                                    (nth 8 (syntax-ppss (1+ (point)))))))
+                (while (and safe-start (not (bobp)))
+                  (goto-char safe-start)
+                  (if (or (bobp)
+                          (sweeprolog-at-beginning-of-top-term-p))
+                      (setq safe-start nil)
+                    (backward-char)
+                    (re-search-backward (rx bol graph) nil t)
+                    (setq safe-start (or (nth 8 (syntax-ppss))
+                                         (nth 8 (syntax-ppss (1+ 
(point)))))))))))
           (not (= p (point))))
       (sweeprolog-beginning-of-next-top-term (- times)))))
 



reply via email to

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