From: Artur Malabarba Date: Sun, 13 Sep 2015 14:41:22 +0000 (+0100) Subject: Only track changes if the mode is active X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/dd31bf0b6c2604f08e88259f3e8e6749f9e1d211 Only track changes if the mode is active --- diff --git a/aggressive-indent.el b/aggressive-indent.el index 9ba136b84..b9af9a32b 100644 --- a/aggressive-indent.el +++ b/aggressive-indent.el @@ -368,7 +368,8 @@ or messages." (defun aggressive-indent--keep-track-of-changes (l r &rest _) "Store the limits (L and R) of each change in the buffer." - (push (list l r) aggressive-indent--changed-list)) + (when aggressive-indent-mode + (push (list l r) aggressive-indent--changed-list))) ;;; Minor modes ;;;###autoload