nim-lang / nim-mode

An emacs major mode for the Nim programming language
137 stars 46 forks source link

Package-install ends with: error: scan-error: (Unbalanced parentheses 3514 17751) #249

Closed arjenduinhouwer closed 10 months ago

arjenduinhouwer commented 10 months ago

Conforming Bugs

Please tell us below:

And describe your problem:

I've been using nim-mode before, but on another machine. Today was the first time installing it on this machine. The error message comes directly in the mini buffer after it got downloaded from Melpa.

autoload-generate-file-autoloads: nim-mode.el:0:0: error: scan-error: (Unbalanced parentheses 3514 17751)

Nim-mode will not work after this, I cannot manually invoke it either. No further messages are produced.

Please let me know if you'd like me to deliver more information.

Vindaar commented 10 months ago

edit:

As caught by @jcs090218 the [ needed to be escaped (done as part of #250). I don't understand why I didn't trigger the error locally for me though, but well. It should be fixed now. Feel free to reopen, if the issue persists!

Initial message

Hmm, I worry this is a regression due to the changes from #245. Maybe Emacs 27 struggles with

    (modify-syntax-entry ?# ". 124b" nim-mode-syntax-table)
    (modify-syntax-entry ?[ ". 23" nim-mode-syntax-table))

somehow (at least it confuses rainbow-delimiters-mode as well). But Emacs 29 is perfectly happy with it.

Can you verify if it works fine if you change these lines back to

    (modify-syntax-entry ?# "<" nim-mode-syntax-table))

?