emacs-devel
[Top][All Lists]
Advanced

[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: Sat, 02 Jan 2021 21:47:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> In these cases lisp syntax is ok, but `elisp--local-variables-1' fails on
> it:
>
> (with-current-buffer (get-buffer-create "bb")
>   (erase-buffer)
>   (insert "(let cc ")
>   (elisp--local-variables))
> ==> Lisp error: (wrong-type-argument listp cc)
>
> (with-current-buffer (get-buffer-create "bb")
>   (erase-buffer)
>   (insert "(let [a b]\n")
>   (elisp--local-variables))
> ==> Lisp error: (wrong-type-argument listp [a b])
>
> Should we fix all these cases one by one,

I think we should try to, yes.

> or maybe just run `elisp--local-variables` under `ignore-errors`, what
> do you think?

I think it's best to let the caller ignore (or demote) errors if it wants to.


        Stefan




reply via email to

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