From 258f29c9b11d040bac85bd43be4ac858146d0bcf Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 13 May 2020 11:44:50 -0700 Subject: fix the indentation of line containing 'where' if needed Signed-off-by: Sean Whitton --- haskell-tab-indent.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'haskell-tab-indent.el') diff --git a/haskell-tab-indent.el b/haskell-tab-indent.el index 15686cb..9680749 100644 --- a/haskell-tab-indent.el +++ b/haskell-tab-indent.el @@ -92,7 +92,13 @@ (prev-line-decl prev-line-tabs) ;; if the previous line was the beginning of a where ;; clause, indent should be exactly one more - (prev-line-where (1+ prev-line-tabs)) + (prev-line-where + ;; also ensure indentation of the 'where' is + ;; correct + (save-excursion + (forward-line -1) + (haskell-tab-indent)) + (1+ prev-line-tabs)) ;; if the user explicitly requested an indent ;; change, cycle through the plausible indents ((eq this-command 'indent-for-tab-command) -- cgit v1.2.3