[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 61d5576e4b 2/4: Do not highlight other occurren
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 61d5576e4b 2/4: Do not highlight other occurrences of anonymous variables |
Date: |
Fri, 25 Nov 2022 09:59:34 -0500 (EST) |
branch: elpa/sweeprolog
commit 61d5576e4b61b546697297e071be775e70a2325c
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Do not highlight other occurrences of anonymous variables
* sweeprolog.el (sweeprolog-analyze-fragment-variable): check for
anonymous variables ("_").
---
sweeprolog.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sweeprolog.el b/sweeprolog.el
index 32642997af..94ccb26072 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -2089,9 +2089,11 @@ resulting list even when found in the current clause."
((or "var"
`("goal_term" "meta" variable 0))
(let ((var (buffer-substring-no-properties beg end)))
- (with-silent-modifications
- (put-text-property beg end 'cursor-sensor-functions
- (sweeprolog-cursor-sensor-functions var)))))))
+ (unless (string= var "_")
+ (with-silent-modifications
+ (put-text-property beg end 'cursor-sensor-functions
+ (sweeprolog-cursor-sensor-functions
+ var))))))))
(defvar sweeprolog-analyze-region-start-hook
'(sweeprolog-analyze-start-font-lock))