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

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

[nongnu] elpa/sweeprolog c69c6bad3c 084/166: FIXED: correctly identify t


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog c69c6bad3c 084/166: FIXED: correctly identify the predicate defined at start of clause
Date: Fri, 30 Sep 2022 04:59:28 -0400 (EDT)

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

    FIXED: correctly identify the predicate defined at start of clause
---
 sweep.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sweep.el b/sweep.el
index 6ab1d6c34a..f996831067 100644
--- a/sweep.el
+++ b/sweep.el
@@ -1150,12 +1150,16 @@ Interactively, a prefix arg means to prompt for BUFFER."
             (string-to-syntax "w")))))
      start end)))
 
+(defun sweep-at-beginning-of-top-term-p ()
+  (and (looking-at-p (rx (seq bol graph)))
+       (not (nth 8 (syntax-ppss)))))
 
 (defun sweep-identifier-at-point (&optional point)
   (let* ((p (or point (point)))
          (beg (save-mark-and-excursion
                 (goto-char p)
-                (sweep-beginning-of-top-term)
+                (unless (sweep-at-beginning-of-top-term-p)
+                  (sweep-beginning-of-top-term))
                 (point)))
          (end (save-mark-and-excursion
                 (goto-char p)



reply via email to

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