[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog e63fa23249 1/3: MODIFIED: Remove '-face' suffix
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog e63fa23249 1/3: MODIFIED: Remove '-face' suffix from face names |
Date: |
Wed, 24 May 2023 06:04:38 -0400 (EDT) |
branch: elpa/sweeprolog
commit e63fa23249ef913d185570f2e96d237ea8ffaf48
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
MODIFIED: Remove '-face' suffix from face names
Remove the '-face' suffix from the names of all defined faces as
prescribed in (info "(elisp)Defining Faces").
---
sweeprolog-tests.el | 40 ++++++++++++++++++++--------------------
sweeprolog.el | 31 ++++++++++++++++---------------
2 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index 42ebabaa3f..48b35cefd3 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -214,44 +214,44 @@ foo(Foo) :- bar.
(sweeprolog-mode)
(should (equal (get-text-property (+ (point-min) 1)
'font-lock-face)
- '(sweeprolog-neck-default-face
- sweeprolog-directive-default-face)))
+ '(sweeprolog-neck
+ sweeprolog-directive)))
(should (equal (get-text-property (+ (point-min) 2)
'font-lock-face)
- '(sweeprolog-directive-default-face)))
+ '(sweeprolog-directive)))
(should (equal (get-text-property (+ (point-min) 3)
'font-lock-face)
- '(sweeprolog-built-in-default-face
- sweeprolog-body-default-face)))
+ '(sweeprolog-built-in
+ sweeprolog-body)))
(should (equal (get-text-property (+ (point-min) 9)
'font-lock-face)
- '(sweeprolog-body-default-face)))
+ '(sweeprolog-body)))
(should (equal (get-text-property (+ (point-min) 10)
'font-lock-face)
- '(sweeprolog-identifier-default-face
- sweeprolog-body-default-face)))
+ '(sweeprolog-identifier
+ sweeprolog-body)))
(should (equal (get-text-property (+ (point-min) 13)
'font-lock-face)
- '(sweeprolog-body-default-face)))
+ '(sweeprolog-body)))
(should (equal (get-text-property (+ (point-min) 16)
'font-lock-face)
- '(sweeprolog-local-default-face
- sweeprolog-body-default-face)))
+ '(sweeprolog-local
+ sweeprolog-body)))
(should (equal (get-text-property (+ (point-min) 23)
'font-lock-face)
- '(sweeprolog-fullstop-default-face)))
+ '(sweeprolog-fullstop)))
(should (equal (get-text-property (+ (point-min) 26)
'font-lock-face)
- '(sweeprolog-head-exported-default-face
- sweeprolog-clause-default-face)))
+ '(sweeprolog-head-exported
+ sweeprolog-clause)))
(should (equal (get-text-property (+ (point-min) 31)
'font-lock-face)
- '(sweeprolog-singleton-default-face
- sweeprolog-clause-default-face)))
+ '(sweeprolog-singleton
+ sweeprolog-clause)))
(should (equal (get-text-property (+ (point-min) 39)
'font-lock-face)
- '(sweeprolog-undefined-default-face
- sweeprolog-body-default-face)))))
+ '(sweeprolog-undefined
+ sweeprolog-body)))))
(ert-deftest yank-hole ()
"Test killing and yanking a hole as a plain variable."
@@ -750,8 +750,8 @@ bar(Bar) :- baz(Bar).
(prop-match-end
(text-property-search-forward
'font-lock-face
- '(sweeprolog-syntax-error-default-face
- sweeprolog-around-syntax-error-default-face)))))))
+ '(sweeprolog-syntax-error
+ sweeprolog-around-syntax-error)))))))
(ert-deftest file-at-point ()
"Test recognizing file specifications."
diff --git a/sweeprolog.el b/sweeprolog.el
index e0faa1418d..624f2e50ab 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -750,44 +750,44 @@ the order of the arguments is reversed."
;;;; Prolog messages
-(defface sweeprolog-debug-prefix-face
+(defface sweeprolog-debug-prefix
'((default :inherit shadow))
"Face used to highlight the \"DEBUG\" message prefix."
:group 'sweeprolog-faces)
-(defvar sweeprolog-debug-prefix-face 'sweeprolog-debug-prefix-face
+(defvar sweeprolog-debug-prefix-face 'sweeprolog-debug-prefix
"Name of the face used to highlight the \"DEBUG\" message prefix.")
-(defface sweeprolog-debug-topic-face
+(defface sweeprolog-debug-topic
'((default :inherit shadow))
"Face used to highlight the topic in debug messages."
:group 'sweeprolog-faces)
-(defvar sweeprolog-debug-topic-face 'sweeprolog-debug-topic-face
+(defvar sweeprolog-debug-topic-face 'sweeprolog-debug-topic
"Name of the face used to highlight the topic in debug messages.")
-(defface sweeprolog-info-prefix-face
+(defface sweeprolog-info-prefix
'((default :inherit default))
"Face used to highlight the \"INFO\" message prefix."
:group 'sweeprolog-faces)
-(defvar sweeprolog-info-prefix-face 'sweeprolog-info-prefix-face
+(defvar sweeprolog-info-prefix-face 'sweeprolog-info-prefix
"Name of the face used to highlight the \"INFO\" message prefix.")
-(defface sweeprolog-warning-prefix-face
+(defface sweeprolog-warning-prefix
'((default :inherit font-lock-warning-face))
"Face used to highlight the \"WARNING\" message prefix."
:group 'sweeprolog-faces)
-(defvar sweeprolog-warning-prefix-face 'sweeprolog-warning-prefix-face
+(defvar sweeprolog-warning-prefix-face 'sweeprolog-warning-prefix
"Name of the face used to highlight the \"WARNING\" message prefix.")
-(defface sweeprolog-error-prefix-face
+(defface sweeprolog-error-prefix
'((default :inherit error))
"Face used to highlight the \"ERROR\" message prefix."
:group 'sweeprolog-faces)
-(defvar sweeprolog-error-prefix-face 'sweeprolog-error-prefix-face
+(defvar sweeprolog-error-prefix-face 'sweeprolog-error-prefix
"Name of the face used to highlight the \"ERROR\" message prefix.")
(defun sweeprolog-view-messages ()
@@ -1323,11 +1323,12 @@ resulting list even when found in the current clause."
"Define sweeprolog face FACE with doc DOC."
(declare
(indent defun)
- (doc-string 4))
- (let ((func (intern (concat "sweeprolog-" (symbol-name name) "-face")))
- (facd (intern (concat "sweeprolog-" (symbol-name name)
"-dark-face")))
- (facl (intern (concat "sweeprolog-" (symbol-name name)
"-light-face")))
- (face (intern (concat "sweeprolog-" (symbol-name name)
"-default-face"))))
+ (doc-string 5))
+ (let* ((sn (symbol-name name))
+ (func (intern (concat "sweeprolog-" sn "-face")))
+ (facd (intern (concat "sweeprolog-" sn "-dark")))
+ (facl (intern (concat "sweeprolog-" sn "-light")))
+ (face (intern (concat "sweeprolog-" sn))))
`(progn
(defface ,facl
'((default . ,light))