aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-11-23 13:36:10 -0500
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-11-23 13:36:10 -0500
commit47e2b3bbf10a391a4131697f202991470c9a68de (patch)
treed00e49a1cc27b30e8c221e3e675cf83c87f9eac1
parent7155ac935ea4c5cd9bc00cb1382649abdc776f4c (diff)
Introduce a coq-question-mark-face
Closes #12
-rw-r--r--coq/coq-db.el6
-rw-r--r--coq/coq-syntax.el38
2 files changed, 25 insertions, 19 deletions
diff --git a/coq/coq-db.el b/coq/coq-db.el
index dc83c85f..631df56d 100644
--- a/coq/coq-db.el
+++ b/coq/coq-db.el
@@ -305,6 +305,11 @@ See `coq-syntax-db' for DB structure."
"Face for unicode binders, by default a bold version of `font-lock-type-face'."
:group 'proof-faces)
+(defface coq-question-mark-face
+ '((t :inherit font-lock-variable-name-face))
+ "Face for Ltac binders and evars."
+ :group 'proof-faces)
+
(defconst coq-solve-tactics-face 'coq-solve-tactics-face
"Expression that evaluates to a face.
Required so that 'coq-solve-tactics-face is a proper facename")
@@ -317,6 +322,7 @@ Required so that 'coq-cheat-face is a proper facename")
"Expression that evaluates to a face.
Required so that 'coq-symbol-binder-face is a proper facename")
+(defconst coq-question-mark-face 'coq-question-mark-face)
(provide 'coq-db)
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el
index 80c7f3bb..3b4ad3cc 100644
--- a/coq/coq-syntax.el
+++ b/coq/coq-syntax.el
@@ -1090,27 +1090,27 @@ It is used:
;; We define a slightly different set of keywords for response buffer.
(defvar coq-response-font-lock-keywords
- (append
- coq-font-lock-terms
- (list
- (cons coq-reserved-regexp 'font-lock-type-face)
- (cons coq-keywords-regexp 'font-lock-keyword-face)
- (cons coq-shell-eager-annotation-start 'proof-warning-face)
- (cons coq-error-regexp 'proof-error-face)
- (cons (proof-regexp-alt-list-symb (list "In environment" "The term" "has type")) 'proof-error-face)
- (cons (proof-regexp-alt-list-symb (list "Set" "Type" "Prop")) 'font-lock-type-face)
- (list (concat "[?]" coq-id) 0 'proof-eager-annotation-face);; highlight evars
- (list coq-hyp-name-in-goal-or-response-regexp 2 'proof-declaration-name-face)
- (list "^\\([^ \n]+\\) \\(is defined\\)" (list 1 'font-lock-function-name-face t)))))
+ (append
+ coq-font-lock-terms
+ (list
+ (cons coq-reserved-regexp 'font-lock-type-face)
+ (cons coq-keywords-regexp 'font-lock-keyword-face)
+ (cons coq-shell-eager-annotation-start 'proof-warning-face)
+ (cons coq-error-regexp 'proof-error-face)
+ (cons (proof-regexp-alt-list-symb (list "In environment" "The term" "has type")) 'proof-error-face)
+ (cons (proof-regexp-alt-list-symb (list "Set" "Type" "Prop")) 'font-lock-type-face)
+ (list (concat "[?]" coq-id) 0 'coq-question-mark-face) ;; highlight evars and Ltac variables
+ (list coq-hyp-name-in-goal-or-response-regexp 2 'proof-declaration-name-face)
+ (list "^\\([^ \n]+\\) \\(is defined\\)" (list 1 'font-lock-function-name-face t)))))
(defvar coq-goals-font-lock-keywords
- (append
- coq-font-lock-terms
- (list
- (cons coq-reserved-regexp 'font-lock-type-face)
- (list (concat "[?]" coq-id) 0 'proof-eager-annotation-face);; highlight evars
- (list coq-hyp-name-in-goal-or-response-regexp 2 'proof-declaration-name-face)
- (cons (proof-regexp-alt-list-symb (list "Set" "Type" "Prop")) 'font-lock-type-face))))
+ (append
+ coq-font-lock-terms
+ (list
+ (cons coq-reserved-regexp 'font-lock-type-face)
+ (list (concat "[?]" coq-id) 0 'coq-question-mark-face) ;; highlight evars and Ltac variables
+ (list coq-hyp-name-in-goal-or-response-regexp 2 'proof-declaration-name-face)
+ (cons (proof-regexp-alt-list-symb (list "Set" "Type" "Prop")) 'font-lock-type-face))))