(nth 8 (syntax-ppss (1+ (point)))))))
(while (and safe-start (not (bobp)))
(goto-char safe-start)
- (backward-char)
- (re-search-backward (rx bol graph) nil t)
- (setq safe-start (or (nth 8 (syntax-ppss))
- (nth 8 (syntax-ppss (1+ (point)))))))))
+ (if (bobp)
+ (setq safe-start nil)
+ (backward-char)
+ (re-search-backward (rx bol graph) nil t)
+ (setq safe-start (or (nth 8 (syntax-ppss))
+ (nth 8 (syntax-ppss (1+ (point))))))))))
(not (= p (point))))
(sweeprolog-beginning-of-next-top-term (- times)))))
(let ((point (point))
(fun (cadr def))
(ari (caddr def)))
- (while point
+ (while (and point (not (bobp)))
(sweeprolog-beginning-of-top-term)
(backward-char 1)
(if-let* ((ndef (sweeprolog-definition-at-point (point)))