From: Eshel Yaron Date: Fri, 25 Nov 2022 14:39:09 +0000 (+0200) Subject: Recognize and highlight XPCE string comments as docstrings X-Git-Tag: V9.1.0-sweep-0.9.1~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f60ed45288efe75142cdc8959909c42e8d8ee3c;p=dict.git Recognize and highlight XPCE string comments as docstrings * sweeprolog.el (sweeprolog-analyze-fragment-to-faces): recognize string comments. --- diff --git a/sweeprolog.el b/sweeprolog.el index d9bce9b..d5ecf6e 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -1761,6 +1761,13 @@ resulting list even when found in the current clause." (:inherit default) "Directives.") +(sweeprolog-defface + string-comment + (:inherit font-lock-doc-face) + (:inherit font-lock-doc-face :foreground "darkgreen") + (:inherit font-lock-doc-face :foreground "green") + "String comments.") + (sweeprolog-defface structured-comment (:inherit font-lock-doc-face) @@ -1804,6 +1811,9 @@ resulting list even when found in the current clause." (`("comment" . "structured") (list (list beg end nil) (list beg end (sweeprolog-structured-comment-face)))) + (`("comment" . "string") + (list (list beg end nil) + (list beg end (sweeprolog-string-comment-face)))) (`("comment" . ,_) (list (list beg end nil) (list beg end (sweeprolog-comment-face)))) @@ -2019,7 +2029,7 @@ resulting list even when found in the current clause." ("grammar_rule" (list (list beg end nil) (list beg end (sweeprolog-grammar-rule-face)))) ("method" - (list (list beg end (sweeprolog-method-face)))) + (list (list beg end nil) (list beg end (sweeprolog-method-face)))) ("class" (list (list beg end (sweeprolog-class-face))))))