From 61d5576e4b61b546697297e071be775e70a2325c Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 25 Nov 2022 12:44:47 +0200 Subject: [PATCH] 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 3264299..94ccb26 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)) -- 2.39.2