From: Eshel Yaron Date: Fri, 25 Nov 2022 10:44:47 +0000 (+0200) Subject: Do not highlight other occurrences of anonymous variables X-Git-Tag: V9.1.0-sweep-0.9.1~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=61d5576e4b61b546697297e071be775e70a2325c;p=sweep.git Do not highlight other occurrences of anonymous variables * sweeprolog.el (sweeprolog-analyze-fragment-variable): check for anonymous variables ("_"). --- 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))