From: Eshel Yaron Date: Tue, 22 Nov 2022 08:37:51 +0000 (+0200) Subject: FIXED: possible infinite loop looking for next term X-Git-Tag: V8.5.20-sweep-0.8.12~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0657992475cdaa1e8493f294f78ee57e4aa47451;p=sweep.git FIXED: possible infinite loop looking for next term * sweeprolog.el (sweeprolog-beginning-of-next-top-term): handle comments more reliably --- diff --git a/sweeprolog.el b/sweeprolog.el index fb22520..d3d4b4e 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -2475,7 +2475,7 @@ Interactively, POINT is set to the current point." (forward-char) (re-search-forward (rx bol graph) nil t) (while (and (or (nth 8 (syntax-ppss)) - (nth 8 (syntax-ppss (1+ (point))))) + (looking-at-p (rx bol (or "%" "/*")))) (not (eobp))) (re-search-forward (rx bol graph) nil t)) (setq times (1- times))) @@ -2483,7 +2483,7 @@ Interactively, POINT is set to the current point." (setq times (1- times)) (re-search-forward (rx bol graph) nil t) (while (and (or (nth 8 (syntax-ppss)) - (nth 8 (syntax-ppss (1+ (point))))) + (looking-at-p (rx bol (or "%" "/*")))) (not (eobp))) (re-search-forward (rx bol graph) nil t))) (beginning-of-line)