summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-04-04 14:18:09 -0300
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-04-04 14:18:32 -0300
commit67fa7e1a60966e49eccf21b02110af12afa995e0 (patch)
tree6dc507a36763b383f820f811c283541e96927f3d
parent456c40803432b34842e43ceda66cdd105fbf8866 (diff)
[Fix #78] save-excursion in check-parens
-rw-r--r--aggressive-indent.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/aggressive-indent.el b/aggressive-indent.el
index 9aa8226..31cee72 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
;; Author: Artur Malabarba <emacs@endlessparentheses.com>
;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5.2
+;; Version: 1.5.3
;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
;; Keywords: indent lisp maint tools
;; Prefix: aggressive-indent
@@ -375,11 +375,12 @@ or messages."
"Check if parens are balanced in the current buffer.
Store result in `aggressive-indent--balanced-parens'."
(setq aggressive-indent--balanced-parens
- (ignore-errors
- (save-restriction
- (narrow-to-defun)
- (check-parens)
- t))))
+ (save-excursion
+ (ignore-errors
+ (save-restriction
+ (narrow-to-defun)
+ (check-parens)
+ t)))))
(defun aggressive-indent--keep-track-of-changes (l r &rest _)
"Store the limits (L and R) of each change in the buffer."