emacs-devel
[Top][All Lists]
Advanced

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

Re: Opaque objects and Emacs documentation


From: Tomas Hlavaty
Subject: Re: Opaque objects and Emacs documentation
Date: Tue, 21 Jul 2020 22:49:33 +0200

On Tue 21 Jul 2020 at 22:00, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 19.07.2020 17:48, Eli Zaretskii wrote:
>>    . a predicate to test whether an arbitrary Lisp value is an object
>>      of that type
>
> A predicate would look like:
>
> (defun project-instance-p (pr)
>    (condition-case nil
>        (progn
>          (project-roots pr)
>          t)
>      (error
>       nil)))

that's ugly

it's better not to use errors for control flow

what happens if project-roots raises error on legitimate project
instance?



reply via email to

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