diff --git a/purescript-indentation.el b/purescript-indentation.el index 781ae94..0adec57 100644 --- a/purescript-indentation.el +++ b/purescript-indentation.el @@ -196,17 +196,18 @@ autofill-mode." (end-of-line)))) (defun purescript-indentation-reindent (col) - (beginning-of-line) - (delete-region (point) - (progn - (when (and (eq purescript-literate 'bird) - (eq (char-after) ?>)) - (forward-char)) - (skip-syntax-forward "-") - (point))) - (when (eq purescript-literate 'bird) - (insert ">")) - (indent-to col)) + (unless (= col (purescript-indentation-current-indentation)) + (beginning-of-line) + (delete-region (point) + (progn + (when (and (eq purescript-literate 'bird) + (eq (char-after) ?>)) + (forward-char)) + (skip-syntax-forward "-") + (point))) + (when (eq purescript-literate 'bird) + (insert ">")) + (indent-to col))) (defun purescript-indentation-current-indentation () (if (eq purescript-literate 'bird)