aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-smie.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2016-03-09 18:28:10 +0100
committerGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2016-03-09 18:28:10 +0100
commitbfedfed9d1f5d245a0fc4b40a5029cfd4c666c27 (patch)
treef775a74dfcd4de5b46febb9258b4fc30d6cd7c08 /coq/coq-smie.el
parent1135e8a6490abdae3fe48d27e74dd1571544340c (diff)
Fixing a small glitch in indentation.
if a "; tactic" is not at the end of its line, (hanging) then it should not act on indetation of next line.
Diffstat (limited to 'coq/coq-smie.el')
-rw-r--r--coq/coq-smie.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/coq/coq-smie.el b/coq/coq-smie.el
index 378febea..6f520280 100644
--- a/coq/coq-smie.el
+++ b/coq/coq-smie.el
@@ -966,14 +966,15 @@ KIND is the situation and TOKEN is the thing w.r.t which the rule applies."
;; now ( tac3 ; <- neither here
;; tac5) ;
;; ]
- ((and (equal token "; tactic")
- coq-indent-semicolon-tactical
- (not (coq-smie-is-ltacdef))
- (not (coq-smie-is-inside-parenthesized-tactic)))
- (if (or (not (smie-rule-parent-p "; tactic"))
- (and smie--parent
- (coq-smie--same-line-as-parent
- (nth 1 smie--parent) (point))))
+ ((equal token "; tactic")
+ (if (and (smie-rule-hanging-p)
+ coq-indent-semicolon-tactical
+ (not (coq-smie-is-ltacdef))
+ (not (coq-smie-is-inside-parenthesized-tactic))
+ (or (not (smie-rule-parent-p "; tactic"))
+ (and smie--parent
+ (coq-smie--same-line-as-parent
+ (nth 1 smie--parent) (point)))))
coq-indent-semicolon-tactical
nil))