From: Eshel Yaron Date: Thu, 8 Sep 2022 13:49:36 +0000 (+0300) Subject: FIXED: correctly identify the predicate defined at start of clause X-Git-Tag: v0.2.0~19 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c69c6bad3c92ff2a15d893513bb627ee5f39426e;p=dict.git FIXED: correctly identify the predicate defined at start of clause --- diff --git a/sweep.el b/sweep.el index 6ab1d6c..f996831 100644 --- a/sweep.el +++ b/sweep.el @@ -1150,12 +1150,16 @@ Interactively, a prefix arg means to prompt for BUFFER." (string-to-syntax "w"))))) start end))) +(defun sweep-at-beginning-of-top-term-p () + (and (looking-at-p (rx (seq bol graph))) + (not (nth 8 (syntax-ppss))))) (defun sweep-identifier-at-point (&optional point) (let* ((p (or point (point))) (beg (save-mark-and-excursion (goto-char p) - (sweep-beginning-of-top-term) + (unless (sweep-at-beginning-of-top-term-p) + (sweep-beginning-of-top-term)) (point))) (end (save-mark-and-excursion (goto-char p)