[Top][All Lists]

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

Re: backward-sexp throws scan-error "Unbalanced parentheses", but forwar

From: Stefan Monnier
Subject: Re: backward-sexp throws scan-error "Unbalanced parentheses", but forward-sexp works
Date: Wed, 19 Jan 2022 15:57:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> The maintainer is not really responsive. I skimmed the code and
> it seems it only calls (indent-according-to-mode) and stuff,
> and does not do anything crazy:

I haven't looked in detail, but I did notice that it let-binds
`after-change-functions` which can interfere with other code adding
functions to this hook.

Does the quick&dirty patch below help?


diff --git a/aggressive-indent.el b/aggressive-indent.el
index 0234fcf29c..a08a4c241b 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -393,7 +393,7 @@ or messages."
   "Indent the regions in `aggressive-indent--changed-list'."
   (unless (or (run-hook-wrapped 'aggressive-indent--internal-dont-indent-if 
-    (let ((after-change-functions (remove 
'aggressive-indent--keep-track-of-changes after-change-functions))
+    (let ((aggressive-indent-mode nil)
           (inhibit-point-motion-hooks t)
            (if (cl-member-if #'derived-mode-p 

reply via email to

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