(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."
(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."
;;;; 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 ()
"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))