[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 8c31bd2bde 1/4: * (sweeprolog-hole-face): new f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 8c31bd2bde 1/4: * (sweeprolog-hole-face): new face for highlighting holes |
Date: |
Tue, 22 Nov 2022 15:59:40 -0500 (EST) |
branch: elpa/sweeprolog
commit 8c31bd2bde3b2b233f23052ef95403f22cf86c14
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
* (sweeprolog-hole-face): new face for highlighting holes
---
sweeprolog.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/sweeprolog.el b/sweeprolog.el
index d1c585bd8f..5072cd9760 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -1743,6 +1743,12 @@ resulting list even when found in the current clause."
(:inherit font-lock-doc-face :foreground "green")
"Structured comments.")
+(sweeprolog-defface
+ hole
+ (:box t)
+ (:box t)
+ (:box t)
+ "Holes.")
;;;; Font-lock
@@ -1805,7 +1811,9 @@ resulting list even when found in the current clause."
(`("goal" "recursion" . ,_)
(list (list beg end (sweeprolog-recursion-face))))
(`("goal" "meta" . ,_)
- (list (list beg end (sweeprolog-meta-face))))
+ (cons (list beg end (sweeprolog-meta-face))
+ (when (get-text-property beg 'sweeprolog-hole)
+ (list (list beg end (sweeprolog-hole-face))))))
(`("goal" "built_in" . ,_)
(list (list beg end (sweeprolog-built-in-face))))
(`("goal" "undefined" . ,_)
@@ -1889,7 +1897,9 @@ resulting list even when found in the current clause."
("control"
(list (list beg end (sweeprolog-control-face))))
("var"
- (list (list beg end (sweeprolog-variable-face))))
+ (cons (list beg end (sweeprolog-variable-face))
+ (when (get-text-property beg 'sweeprolog-hole)
+ (list (list beg end (sweeprolog-hole-face))))))
("fullstop"
(save-excursion
(goto-char (min end (point-max)))