[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ignore-error?

From: Stefan Monnier
Subject: Re: ignore-error?
Date: Mon, 15 Jul 2019 09:08:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> It seems like people like writing `ignore-errors' a lot more than
> `condition-case', and I think `ignore-errors' is the wrong thing to say
> 90% of the time.

I agree, but I think in 99% of those cases, the author has no idea which
error might need to be caught.

> So would it be a good idea to add a new convenience macro `ignore-error'
> to entice people to not use `ignore-errors' so much?  It would take an
> error condition as its parameter, so:
>   (ignore-error 'file-error
>     (directory-files dir))

[ I think the argument shouldn't be quoted.  ]
More importantly, if you want me to use this, you'll have to improve
elisp-mode's completion so it DTRT for the error symbol, like it does in


reply via email to

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