From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: To `boundp' or not to `boundp'? Date: Tue, 1 Sep 2015 11:00:23 -0700 (PDT) Message-ID: <03650f69-e11e-4fe9-9046-acabd0065ce6@default> References: <55E5C99B.3020608@yandex.ru> <933687a5-d288-499a-a34a-93260456d907@default> <87k2sat646.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441130466 28920 80.91.229.3 (1 Sep 2015 18:01:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2015 18:01:06 +0000 (UTC) To: Michael Heerdegen , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 01 20:00:54 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZWprY-0006gU-RN for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 20:00:52 +0200 Original-Received: from localhost ([::1]:56575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWprY-0006HF-Oa for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 14:00:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWprE-0006Gs-Vd for help-gnu-emacs@gnu.org; Tue, 01 Sep 2015 14:00:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWpr9-0001Pl-Bu for help-gnu-emacs@gnu.org; Tue, 01 Sep 2015 14:00:32 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:41738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWpr9-0001PW-5j for help-gnu-emacs@gnu.org; Tue, 01 Sep 2015 14:00:27 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t81I0P5e024142 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Sep 2015 18:00:26 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t81I0P8H009657 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 1 Sep 2015 18:00:25 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t81I0OtP000498; Tue, 1 Sep 2015 18:00:24 GMT In-Reply-To: <87k2sat646.fsf@web.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106968 Archived-At: > > If they really wanted a macro for this, it should have been called > > something that reflects what it does, e.g., `var-value-or-nil' or > > `if-bound-then-value-else-nil'. >=20 > One needs this quite often, so it's good to factor it out. And so it was. I'm not convinced it helps. But if it helps you, great. (and (boundp 'VAR) VAR) works for me. > I've no strong opinion about the name, but I guess the macro was indeed > intended for cases where the return value is used as a boolean. There > are other use cases where the name then is confusing. Maybe > `symbol-value-safe' in analogy to `car-safe' would be better? Then it > would have to be a function, though. I don't see why it would have to be a function, just due to a name change. But the name is what it is, and likely won't be changed. (And whatever the name, I will likely use (and (boundp 'VAR) VAR).)