From c4efb5ea1980d11207382b1722abb28c4e8edbd2 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 19 Nov 2022 18:36:19 +0200 Subject: [PATCH] * (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 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) -- 2.39.2