[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master a5000eb 3/5: Fix a bug in the take-10 logic

From: Artur Malabarba
Subject: [elpa] master a5000eb 3/5: Fix a bug in the take-10 logic
Date: Mon, 02 May 2016 02:12:49 +0000

branch: master
commit a5000ebf787eaeab41a7ab1889a91be84e8c1c90
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    Fix a bug in the take-10 logic
 aggressive-indent.el |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 241d0de..5c2f7b8 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -349,8 +349,9 @@ 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
+(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'."
@@ -360,7 +361,7 @@ or messages."
          (if (cl-member-if #'derived-mode-p 
     ;; Take the 10 most recent changes.
-    (let ((cell (last aggressive-indent--changed-list 10)))
+    (let ((cell (nthcdr 10 aggressive-indent--changed-list)))
       (when cell (setcdr cell nil)))
     ;; (message "----------")
     (while aggressive-indent--changed-list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]