From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Arguing for a nilp function and where to put it Date: Sat, 1 Apr 2023 08:01:14 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uQ8lFDhQbIRx0+Tx" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5314"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 01 08:02:00 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1piUJM-0001A7-Pl for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Apr 2023 08:02:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piUIi-0007Q2-81; Sat, 01 Apr 2023 02:01:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piUIf-0007O7-Th for emacs-devel@gnu.org; Sat, 01 Apr 2023 02:01:17 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piUIe-0007Jv-ED for emacs-devel@gnu.org; Sat, 01 Apr 2023 02:01:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a3r1DwvY7WNsPiv6D+EXClExJxBpqG/g6MIOZzNRudc=; b=CjbzhJ74AyqUPM8ijud/FWuioy CJMvA2K3cwrOxBJcvTQgph81kUJvz1UKh7zpm4RFRlNNKTLpaoIAL8RpL+GVLp+k4bp8IKCsDt/Hi ulC0NAhp01pKJGBCCtzYImf8dgZSz9FrhTyaLOcasxjHbgjptKoXEs5yfZPmrYCYDC/HngNBfGgh2 nuC/h4icnTWucGhCr3+PQOEb8eLtBEk4Q0wdrJTL653ZziN72dztXz8sQUeNQ1Dy6sLAF7Gyc4rYF PwUWzQdyEX+CXc/szlbDeMrZC+tEOVNVoRWqqnxbY6Ua1gMl6VQeoyDnsJEjY8XQKqj0//YqBhftt kclfrtKA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1piUIc-0001yo-5U for emacs-devel@gnu.org; Sat, 01 Apr 2023 08:01:14 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304961 Archived-At: --uQ8lFDhQbIRx0+Tx Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 01, 2023 at 07:37:44AM +0200, Pedro Andres Aranda Gutierrez wro= te: > Use case for a nilp function: >=20 > 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. >=20 > Currently I have >=20 > (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 --=20 t --uQ8lFDhQbIRx0+Tx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZCfIqgAKCRAFyCz1etHa Rk2mAJ9RmU3qznipQJVvhnakP1js8ru++wCaAym1cdVTuhk58JzPKsuaUauS3GQ= =Ryo6 -----END PGP SIGNATURE----- --uQ8lFDhQbIRx0+Tx--