branch: master
commit 3e9612418f87236fb5a1aec0525610ea88508bc6
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

    [#77] Actually use aggressive-indent--balanced-parens
---
 aggressive-indent.el |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 31cee72..36a7f42 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -349,9 +349,12 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
+(defvar-local aggressive-indent--balanced-parens t
+  "Non-nil if the current-buffer has balanced parens.")
+
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
-  (when aggressive-indent--changed-list
+  (when (and aggressive-indent--changed-list 
aggressive-indent--balanced-parens)
     (save-excursion
       (save-selected-window
         (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
@@ -368,9 +371,6 @@ or messages."
                 (setq aggressive-indent--changed-list
                       (cdr aggressive-indent--changed-list))))))))))
 
-(defvar-local aggressive-indent--balanced-parens t
-  "Non-nil if the current-buffer has balanced parens.")
-
 (defun aggressive-indent--check-parens ()
   "Check if parens are balanced in the current buffer.
 Store result in `aggressive-indent--balanced-parens'."

Reply via email to