diff options
-rw-r--r-- | NEWS.md | 6 | ||||
-rw-r--r-- | haskell-tab-indent.el | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -11,6 +11,12 @@ - Attempt to line up the first line of definitions with declarations on the previous line, rather than indenting further. +- Reset indentation when current indentation is at least one more than + the previous line, rather than just when it is exactly one more than + the previous line. + + This should make it easier to unindent more than one line. + - Drop reference to an old git subtrees script from README.md. - Code cleanup. diff --git a/haskell-tab-indent.el b/haskell-tab-indent.el index 723786d..678cffa 100644 --- a/haskell-tab-indent.el +++ b/haskell-tab-indent.el @@ -105,7 +105,7 @@ (not prev-line-decl)) ;; avoid indenting too little (and prev-line-decl (= 1 this-line-tabs))) - (if (= (1+ prev-line-tabs) this-line-tabs) + (if (>= this-line-tabs (1+ prev-line-tabs)) ;; reset (delete-region (line-beginning-position) (point)) ;; indent |