From: Eshel Yaron Date: Sat, 19 Nov 2022 16:36:19 +0000 (+0200) Subject: * (sweeprolog-at-beginning-of-top-term-p): handle comments X-Git-Tag: V8.5.20-sweep-0.8.9~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c4efb5ea1980d11207382b1722abb28c4e8edbd2;p=dict.git * (sweeprolog-at-beginning-of-top-term-p): handle comments --- diff --git a/sweeprolog.el b/sweeprolog.el index f98e947..b514c5b 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)