Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bogus "Unbalanced parentheses" error after indentation #153

Closed
accforbugreports opened this issue Jan 13, 2022 · 2 comments
Closed

Bogus "Unbalanced parentheses" error after indentation #153

accforbugreports opened this issue Jan 13, 2022 · 2 comments

Comments

@accforbugreports
Copy link

There is a discussion of the a problem on Emacs help:

https://lists.gnu.org/archive/html/help-gnu-emacs/2022-01/msg00148.html

Turns out the problem can only be replicated when aggressive indent is on.

Steps:

  1. Open a new empty elisp file, e.g. test.el
  2. Make sure aggressive indent mode is on
  3. Download the attached file example.txt
  4. Open it and copy the whole contents to the clipboard
  5. Go to the empty elisp file and paste the text into it
  6. the example file contains a huge lisp expression with an indentation error in it, so when you paste it into a lisp buffer with aggressive indent on, aggressive indent corrects the indentation which is good
  7. you are at the end of the expression, press C-M-b that is backward-sexp
  8. You get the "Unbalanced parentheses" error though the expression is balanced. You can check it by going to the beginning of the file and pressing C-M-f. If you step into the vector that is at the end before ] character and keep pressing C-M-b, you can find the problematic point. There the syntax highlight is mixed up. This only happens with aggressive indent on.

Tested with Emacs 27.1

@accforbugreports
Copy link
Author

Does your code do something extra with syntax or font locking which could explain this?

@accforbugreports
Copy link
Author

The problem went away by upgrading to a newer version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant