aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-smie.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2014-12-24 01:32:07 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2014-12-24 01:32:07 +0000
commita86143f025aaa4c62ec2621df7ebe3363c251cb4 (patch)
tree97e2c762358482bba9b2ba9068971286c8ce7ce6 /coq/coq-smie.el
parent5d93450f3556da77dbc70812884a6be207bbfbca (diff)
fixing a small pb in indentation of arrow (->). Not perfect.
Diffstat (limited to 'coq/coq-smie.el')
-rw-r--r--coq/coq-smie.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/coq/coq-smie.el b/coq/coq-smie.el
index fcc2ff83..dd0d584c 100644
--- a/coq/coq-smie.el
+++ b/coq/coq-smie.el
@@ -448,6 +448,17 @@ The point should be at the beginning of the command name."
"; tactic"
"; record"))))))
+ ; Same for "->" : rewrite or intro arg or term's implication
+ ; FIXME: user defined arrows will be considered a term
+ ((equal tok "->")
+ (save-excursion
+ (let ((backtok (coq-smie-search-token-backward '("intro" "intros" "rewrite" "."))))
+ (cond
+ ((equal backtok ".") "->")
+ ((equal backtok nil) "->")
+ (t "-> tactic")))))
+
+
((equal tok "Module")
(save-excursion
;(coq-find-real-start)
@@ -503,13 +514,11 @@ The point should be at the beginning of the command name."
(save-excursion
;; recursive call looking at the ptoken immediately before
(let ((prevtok (coq-smie-backward-token)))
- ;; => may be wrong here but rare (have "=> ltac"?)
+ ;; => may be wrong here but rare (have "=> ltac"?)
(not (or (coq-is-cmdend-token prevtok)
(member prevtok '("; tactic" "[" "]" "|" "=>")))))))
"quantif exists")
-
-
((equal tok "∀") "forall")
((equal tok "→") "->")
((equal tok "∨") "\\/")
@@ -517,7 +526,7 @@ The point should be at the beginning of the command name."
((equal tok "with") ; "with" is a nightmare: at least 4 different uses
(save-excursion (coq-smie-with-deambiguate)))
- ((equal tok "where") ; "with" is a nightmare: at least 4 different uses
+ ((equal tok "where")
"where")
((and (equal tok "signature")