From 6fd185fa1f135e39b81091fbe0626a75005b4dc0 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 24 May 2023 10:11:44 +0300 Subject: [PATCH] Use 'nil' for some 'defface's instead of ':inherit default' Change 'defface's that only specify inheritance from 'default' to empty (nil) definitions, such that the appearance of text these with faces can be determined by other faces applied to the same text. This is important, for example, when using Sweep in Org mode source blocks. --- sweeprolog.el | 41 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 624f2e5..b3b68d0 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -1457,8 +1457,7 @@ resulting list even when found in the current clause." (sweeprolog-defface head-meta (:inherit font-lock-preprocessor-face) - (:inherit default) - (:inherit default) + nil nil "Meta predicate definitions.") (sweeprolog-defface @@ -1743,7 +1742,7 @@ resulting list even when found in the current clause." (sweeprolog-defface qq-content - (:inherit default) + nil (:foreground "red4") (:foreground "red4") "Quasi-quotation content.") @@ -1972,46 +1971,22 @@ resulting list even when found in the current clause." (:background "orange") "Syntax errors.") -(sweeprolog-defface - around-syntax-error - (:inherit default) - (:inherit default) - (:inherit default) +(sweeprolog-defface around-syntax-error nil nil nil "Text around a syntax error.") -(sweeprolog-defface - clause - (:inherit default) - (:inherit default) - (:inherit default) +(sweeprolog-defface clause nil nil nil "Predicate clauses.") -(sweeprolog-defface - grammar-rule - (:inherit default) - (:inherit default) - (:inherit default) +(sweeprolog-defface grammar-rule nil nil nil "DCG grammar rules.") -(sweeprolog-defface - term - (:inherit default) - (:inherit default) - (:inherit default) +(sweeprolog-defface term nil nil nil "Top terms.") -(sweeprolog-defface - body - (:inherit default) - (:inherit default) - (:inherit default) +(sweeprolog-defface body nil nil nil "Clause and query bodies.") -(sweeprolog-defface - directive - (:inherit default) - (:inherit default) - (:inherit default) +(sweeprolog-defface directive nil nil nil "Directives.") (sweeprolog-defface -- 2.39.2