From 67fa7e1a60966e49eccf21b02110af12afa995e0 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 4 Apr 2016 14:18:09 -0300 Subject: [PATCH] [Fix #78] save-excursion in check-parens --- aggressive-indent.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/aggressive-indent.el b/aggressive-indent.el index 9aa82266e..31cee7253 100644 --- a/aggressive-indent.el +++ b/aggressive-indent.el @@ -4,7 +4,7 @@ ;; Author: Artur Malabarba ;; 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." -- 2.39.2