]> git.eshelyaron.com Git - dict.git/commitdiff
* (sweeprolog-at-beginning-of-top-term-p): handle comments
authorEshel Yaron <me@eshelyaron.com>
Sat, 19 Nov 2022 16:36:19 +0000 (18:36 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 19 Nov 2022 16:36:19 +0000 (18:36 +0200)
sweeprolog.el

index f98e947417c145171ea91ded4c62e117cf4e63c9..b514c5be741d8d622e5be4693d9af451f2b3348a 100644 (file)
@@ -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)