From bfedfed9d1f5d245a0fc4b40a5029cfd4c666c27 Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Wed, 9 Mar 2016 18:28:10 +0100 Subject: 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. --- coq/coq-smie.el | 17 +++++++++-------- 1 file 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)) -- cgit v1.2.3