From: <tomas@tuxteam.de>
To: emacs-devel@gnu.org
Subject: Re: Arguing for a nilp function and where to put it
Date: Sat, 1 Apr 2023 08:01:14 +0200 [thread overview]
Message-ID: <ZCfIqpsrVikCTHay@tuxteam.de> (raw)
In-Reply-To: <CAO48Bk_E7XSLB7X_Q8T5M7gifUBF=-50cGUNjRfVLbkhVyRykg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2023-04-01 6:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-01 5:37 Arguing for a nilp function and where to put it Pedro Andres Aranda Gutierrez
2023-04-01 6:01 ` tomas [this message]
2023-04-01 6:07 ` Michael Albinus
2023-04-01 6:10 ` Eli Zaretskii
2023-04-01 7:09 ` Pedro Andres Aranda Gutierrez
2023-04-02 21:28 ` Roland Winkler
2023-04-03 3:02 ` Richard Stallman
2023-04-03 3:34 ` Emanuel Berg
2023-04-03 12:46 ` Andreas Schwab
2023-04-03 18:48 ` Roland Winkler
2023-04-03 23:44 ` Emanuel Berg
2023-04-04 2:56 ` Richard Stallman
2023-04-05 7:24 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCfIqpsrVikCTHay@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.