summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-05-18 14:33:10 -0300
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-05-18 14:33:10 -0300
commiteaab57092284028b1567622c96d9b332de3c7a4d (patch)
tree2eb5c4a3a12686c613853baf4bb704fa061e8e7a
parentc0a1e24ef39e2b0f388135c2ed8f8b419346337c (diff)
Ditch the check-parens functionality
For some unknown reason, it interacts poorly with query-replace.
-rw-r--r--aggressive-indent.el17
1 files changed, 2 insertions, 15 deletions
diff --git a/aggressive-indent.el b/aggressive-indent.el
index 9530bf2..f116129 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -349,10 +349,6 @@ or messages."
"List of (left right) limit of regions changed in the last command loop.")
(make-variable-buffer-local 'aggressive-indent--changed-list)
-(defvar aggressive-indent--balanced-parens t
- "Non-nil if the current-buffer has balanced parens.")
-(make-variable-buffer-local 'aggressive-indent--balanced-parens)
-
(defun aggressive-indent--proccess-changed-list-and-indent ()
"Indent the regions in `aggressive-indent--changed-list'."
(let ((inhibit-modification-hooks t)
@@ -372,7 +368,7 @@ or messages."
(defun aggressive-indent--indent-if-changed ()
"Indent any region that changed in the last command loop."
- (when (and aggressive-indent--changed-list aggressive-indent--balanced-parens)
+ (when aggressive-indent--changed-list
(save-excursion
(save-selected-window
(unless (or (run-hook-wrapped 'aggressive-indent--internal-dont-indent-if #'eval)
@@ -381,19 +377,10 @@ or messages."
(redisplay)
(aggressive-indent--proccess-changed-list-and-indent)))))))
-(defun aggressive-indent--check-parens ()
- "Check if parens are balanced in the current buffer.
-Store result in `aggressive-indent--balanced-parens'."
- (setq aggressive-indent--balanced-parens
- (save-excursion
- (ignore-errors
- (zerop (car (syntax-ppss (point-max))))))))
-
(defun aggressive-indent--keep-track-of-changes (l r &rest _)
"Store the limits (L and R) of each change in the buffer."
(when aggressive-indent-mode
- (push (list l r) aggressive-indent--changed-list)
- (aggressive-indent--check-parens)))
+ (push (list l r) aggressive-indent--changed-list)))
;;; Minor modes
;;;###autoload