[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp--local-variables triggers an error on special input
From: |
Stefan Monnier |
Subject: |
Re: elisp--local-variables triggers an error on special input |
Date: |
Tue, 01 Dec 2020 10:45:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I've noticed that sometimes company raises an error in my *scratch*, I've
> shrinked the case and got:
> (with-current-buffer (get-buffer-create "pwp")
> (erase-buffer)
> (insert "((eg \"\C-,\")")
> (elisp--local-variables))
> Evaluating this sexp raises "Invalid modifier in string" error
> Not sure this is intended, I think elisp--local-variables expects
> `invalid-read-syntax` error for this input, but got another error and does
> not handle it preventing error from happening
Clearly, `elisp--local-variables` should catch this error, but as you
point out, maybe the better way to do that is to change the error that
is signaled so that it is a child of `invalid-read-syntax`.
Stefan