unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: backward-sexp throws scan-error "Unbalanced parentheses", but forward-sexp works
Date: Wed, 19 Jan 2022 15:57:34 -0500	[thread overview]
Message-ID: <jwvv8yfla5r.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: nY2Zo90KD4pUvLR39E4aDs_yM1kp46FfdqEXG4aCeh1mrBtzGPd57kj2jOUMqtcRQwQAH--ub-Iiik1XOVtq40dj6_MI6cY5MYcRCezF3k8=@protonmail.com

> 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?


        Stefan


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 #'eval)
               (aggressive-indent--run-user-hooks))
-    (let ((after-change-functions (remove 'aggressive-indent--keep-track-of-changes after-change-functions))
+    (let ((aggressive-indent-mode nil)
           (inhibit-point-motion-hooks t)
           (indent-function
            (if (cl-member-if #'derived-mode-p aggressive-indent-modes-to-prefer-defun)




  parent reply	other threads:[~2022-01-19 20:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 16:49 backward-sexp throws scan-error "Unbalanced parentheses", but forward-sexp works ndame via Users list for the GNU Emacs text editor
2022-01-12 17:33 ` ndame via Users list for the GNU Emacs text editor
2022-01-12 21:06   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-01-13  5:40 ` ndame via Users list for the GNU Emacs text editor
2022-01-13  5:54   ` ndame via Users list for the GNU Emacs text editor
2022-01-13  6:23     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-13  9:04     ` ndame via Users list for the GNU Emacs text editor
2022-01-19 20:47       ` ndame
2022-01-19 20:52         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-19 20:57         ` Stefan Monnier via Users list for the GNU Emacs text editor [this message]
2022-01-19 21:30         ` ndame
2022-01-19 23:44           ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-01-20  4:47           ` ndame
2022-01-20 17:20             ` Stefan Monnier via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvv8yfla5r.fsf-monnier+emacs@gnu.org \
    --to=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).