emacs-devel
[Top][All Lists]
Advanced

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

Re: Arguing for a nilp function and where to put it


From: tomas
Subject: Re: Arguing for a nilp function and where to put it
Date: Sat, 1 Apr 2023 08:01:14 +0200

On Sat, Apr 01, 2023 at 07:37:44AM +0200, Pedro Andres Aranda Gutierrez wrote:
> Use case for a nilp function:
> 
> I have a buffer-local variable with a default value, and I want to
> allow to (silently) set it to nil (and only to nil) from
> .dir-locals.el or Local Variables.
> 
> Currently I have
> 
> (defun nilp(v) (unless v t))

If I understand your needs correctly, the function you are
looking for is called `null'.

Yes, it breaks the convention for predicates (i.e. that they
should end in -p), but I think it's just because it has been
there for so long, like an old olive tree :-)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


reply via email to

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