From f7ebcf7a5d58c76055588f62c9d3321074729721 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 30 Sep 2022 11:58:41 +0300 Subject: [PATCH] ENHANCED: provide semantic highlighting for missing term kinds --- sweeprolog.el | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 6a14623..12583c4 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -699,6 +699,13 @@ module name, F is a functor name and N is its arity." (:inherit default) "Meta predicate definitions.") +(sweeprolog-defface + head-dynamic + (:inherit font-lock-constant-face) + (:foreground "magenta" :weight bold) + (:foreground "magenta" :weight bold) + "Dynamic predicate definitions.") + (sweeprolog-defface head-multifile (:inherit font-lock-type-face) @@ -739,7 +746,14 @@ module name, F is a functor name and N is its arity." (:inherit font-lock-keyword-face) (:background "orange" :weight bold) (:background "orange" :weight bold) - "Hook definitions.") + "ISO specified predicate definitions.") + +(sweeprolog-defface + head-imported + (:inherit font-lock-function-name-face) + (:foreground "darkgoldenrod4" :weight bold) + (:foreground "darkgoldenrod4" :weight bold) + "Imported head terms.") (sweeprolog-defface head-undefined @@ -865,7 +879,7 @@ module name, F is a functor name and N is its arity." (:inherit font-lock-keyword-face) (:foreground "magenta4" :weight bold) (:foreground "magenta4" :weight bold) - "Multifile predicate calls.") + "HTML calls.") (sweeprolog-defface option-name @@ -1161,16 +1175,24 @@ module name, F is a functor name and N is its arity." (list (list beg end (sweeprolog-head-unreferenced-face)))) (`("head" "meta" . ,_) (list (list beg end (sweeprolog-head-meta-face)))) + (`("head" "iso" . ,_) + (list (list beg end (sweeprolog-head-iso-face)))) (`("head" "exported" . ,_) (list (list beg end (sweeprolog-head-exported-face)))) (`("head" "hook" . ,_) (list (list beg end (sweeprolog-head-hook-face)))) (`("head" "built_in" . ,_) (list (list beg end (sweeprolog-head-built-in-face)))) + (`("head" ,(rx "imported(") . ,_) + (list (list beg end (sweeprolog-head-imported-face)))) (`("head" ,(rx "extern(") . ,_) (list (list beg end (sweeprolog-head-extern-face)))) (`("head" ,(rx "public(") . ,_) (list (list beg end (sweeprolog-head-public-face)))) + (`("head",(rx "dynamic ") . ,_) + (list (list beg end (sweeprolog-head-dynamic-face)))) + (`("head",(rx "multifile ") . ,_) + (list (list beg end (sweeprolog-head-multifile-face)))) (`("head" ,(rx "local(") . ,_) (list (list beg end (sweeprolog-head-local-face)))) (`("goal" "recursion" . ,_) @@ -1209,7 +1231,7 @@ module name, F is a functor name and N is its arity." (list (list beg end (sweeprolog-undefined-import-face)))) ("html_attribute" (list (list beg end (sweeprolog-html-attribute-face)))) - ("html_call" + ("html" (list (list beg end (sweeprolog-html-call-face)))) ("dict_tag" (list (list beg end (sweeprolog-dict-tag-face)))) -- 2.39.2