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

    * (sweeprolog-at-beginning-of-top-term-p): handle comments
---
 sweeprolog.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sweeprolog.el b/sweeprolog.el
index f98e947417..b514c5be74 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -2629,7 +2629,8 @@ of them signal success by returning non-nil."
 
 (defun sweeprolog-at-beginning-of-top-term-p ()
   (and (looking-at-p (rx bol graph))
-       (not (nth 8 (syntax-ppss)))))
+       (not (nth 8 (syntax-ppss)))
+       (not (looking-at-p (rx bol (or "%" "/*"))))))
 
 (defun sweeprolog-analyze-term-at-point (cb)
   (add-hook 'sweeprolog-analyze-region-fragment-hook cb nil t)

Reply via email to