From 87aed9cf8555945b3a61c493e4aba63162e59f40 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 25 Nov 2022 12:50:21 +0200 Subject: [PATCH] Recognize and highlight built-in predicate definitions * sweeprolog.el (sweeprolog-analyze-fragment-to-faces): recognize "def_swi" and "def_iso" predicate head kinds . --- sweeprolog.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sweeprolog.el b/sweeprolog.el index 94ccb26..d9bce9b 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -1334,6 +1334,20 @@ resulting list even when found in the current clause." (:background "orange" :weight bold) "ISO specified predicate definitions.") +(sweeprolog-defface + head-def-iso + (:inherit font-lock-builtin-face) + (:foreground "blue" :weight bold) + (:foreground "cyan" :weight bold) + "Built-in ISO specified predicate definitions.") + +(sweeprolog-defface + head-def-swi + (:inherit font-lock-builtin-face) + (:foreground "blue" :weight bold) + (:foreground "cyan" :weight bold) + "Built-in SWI-Prolog predicate definitions.") + (sweeprolog-defface head-imported (:inherit font-lock-function-name-face) @@ -1799,6 +1813,10 @@ resulting list even when found in the current clause." (list (list beg end (sweeprolog-head-test-face)))) (`("head" "meta" . ,_) (list (list beg end (sweeprolog-head-meta-face)))) + (`("head" "def_iso" . ,_) + (list (list beg end (sweeprolog-head-def-iso-face)))) + (`("head" "def_swi" . ,_) + (list (list beg end (sweeprolog-head-def-swi-face)))) (`("head" "iso" . ,_) (list (list beg end (sweeprolog-head-iso-face)))) (`("head" "exported" . ,_) -- 2.39.2