aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Courtieu2011-11-11 00:07:23 +0000
committerPierre Courtieu2011-11-11 00:07:23 +0000
commit772f6217a26af0430cd19c220a670b46b23d2270 (patch)
tree470841d87a6c1392be0b4c36ec675e744fb9bd4f
parent14a99ba7764b951e4ed82f2421a67d8ec888e8d5 (diff)
Fixed coq smie indentation.
-rw-r--r--coq/coq.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/coq/coq.el b/coq/coq.el
index c44476b2..f1605054 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -271,7 +271,6 @@ Lemma foo: forall n,
("if" exp "then" exp "else" exp)
("quantif exists" exp "," exp)
("forall" exp "," exp)
- ("∀" exp "," exp)
("(" exps ")")
("{|" exps "|}")
("{" exps "}")
@@ -477,6 +476,7 @@ Lemma foo: forall n,
(coq-smie-backward-token)
'("." ";" "[" "]" "|" "BeginSubproof" "EndSubproof"))))
"quantif exists"))
+ ((equal tok "∀") "forall")
((and (equal tok "with")
(save-excursion
(equal (coq-smie-search-token-backward '("match" ".")) "match")))
@@ -511,7 +511,7 @@ KIND is the situation and TOKEN is the thing w.r.t which the rule applies."
(:elem (case token
(basic proof-indent)))
(:list-intro
- (or (member token'("fun" "forall" "∀" "quantif exists"))
+ (or (member token'("fun" "forall" "quantif exists"))
;; We include "." in list-intro for the ". { .. } \n { .. }" so the
;; second {..} is aligned with the first rather than being indented as
;; if it were an argument to the first.
@@ -541,14 +541,15 @@ KIND is the situation and TOKEN is the thing w.r.t which the rule applies."
((and (equal token ":=")
(smie-rule-parent-p "Definition" "Lemma" "Fixpoint" "Inductive"
"Function" "Let" "Record" "Instance" "Class"
- "Ltac" "Add"))
+ "Ltac" "Add" "Theorem"))
;(or proof-indent smie-indent-basic)
2
)
((and (equal token ":")
- (smie-rule-parent-p "Definition" "Lemma" "Fixpoint" "Inductive"
- "Function" "Let" "Record" "Instance" "Class"
- "Ltac" "Add")) 2)
+ (smie-rule-parent-p "Definition" "Lemma" "Theorem" "Fixpoint"
+ "Inductive" "Function" "Let" "Record"
+ "Instance" "Class" "Ltac" "Add"))
+ 2)
((equal token ".")
(if (smie-rule-parent-p "BeginSubproof" "Module" "Section" "Proof") 2))
((and (equal token "Proof End")
@@ -568,10 +569,10 @@ KIND is the situation and TOKEN is the thing w.r.t which the rule applies."
;((and (equal token "forall" "exists") (smie-rule-prev-p ":")
; (smie-rule-parent-p "Lemma"))
; (smie-rule-parent))
- ((and (member token '("forall" "∀" "quantif exists"))
+ ((and (member token '("forall" "quantif exists"))
(not (smie-rule-parent-p
"Definition" "Lemma" "Fixpoint" "Inductive" "Function" "Let"
- "Record" "Instance" "Class" "Ltac" "Add"))) ;; FIXME add more
+ "Theorem" "Record" "Instance" "Class" "Ltac" "Add")))
(smie-rule-parent))))))
;;