From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Why is booleanp defined this way? Date: Sat, 18 Apr 2015 08:13:26 +0200 Message-ID: <87d2323qwp.fsf@gnu.org> References: <87siby7au6.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429337635 5019 80.91.229.3 (18 Apr 2015 06:13:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Apr 2015 06:13:55 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 18 08:13:45 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 1YjM0f-00017J-51 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Apr 2015 08:13:45 +0200 Original-Received: from localhost ([::1]:44603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjM0e-00088d-Aj for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Apr 2015 02:13:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjM0V-00088X-BF for help-gnu-emacs@gnu.org; Sat, 18 Apr 2015 02:13:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjM0S-0007mw-5w for help-gnu-emacs@gnu.org; Sat, 18 Apr 2015 02:13:35 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjM0S-0007ms-1y for help-gnu-emacs@gnu.org; Sat, 18 Apr 2015 02:13:32 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 589C220945 for ; Sat, 18 Apr 2015 02:13:30 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Sat, 18 Apr 2015 02:13:30 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=oA1ks16VKBqVvQS3vGxpsLke/DU=; b=EnOvh 23+pg+FfdytoCQ8l2Tgm0OQpGD1GwMTXrGSFZ9iOe1wj1DrXqDXgaI/OA6lPPUyb jN8b2vAp58hrVZBcDuN9WIl7ySU14MbYgw/sN1AXIm+0YqgCUyO9wp8Njv1b7/dW BofrkdYgxpHU8RGXf9OXeje5oWkWlqKvpMEZpE= X-Sasl-enc: Kk1ZGFNFABnsBzsMZiZ8TNofysf1CYg+ku72kHHxjdhr 1429337609 Original-Received: from thinkpad-t440p (unknown [2.161.70.45]) by mail.messagingengine.com (Postfix) with ESMTPA id 618616801BF; Sat, 18 Apr 2015 02:13:29 -0400 (EDT) Mail-Followup-To: Marcin Borkowski , Help Gnu Emacs mailing list In-Reply-To: <87siby7au6.fsf@mbork.pl> (Marcin Borkowski's message of "Fri, 17 Apr 2015 22:34:45 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 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:103807 Archived-At: Marcin Borkowski writes: Hi Marcin, > Of course, this "normalizes" any "truthy" value to "t", but is it > really needed for anything (except perhaps being elegant)? It's just as you say and the others already explained. And then have a look where and `booleanp` is actually used. Basically all usages in emacs itself are (put 'some-variable 'safe-local-variable 'booleanp) So some-variable is safe as a file-local variable only if it is either nil or t but it is not safe when its value is (eval (shell-command "rm -rf ~/")). Another use-case is when you are talking to some external service that wan't "real" (aka, non-generalized booleans) and use some marshalling code which automatically converts nil to false and t to true. Bye, Tassilo