From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jack-mac Newsgroups: gmane.emacs.help Subject: Re: What does ":noerror" do? Date: Mon, 14 Oct 2013 02:33:19 -0700 (PDT) Message-ID: References: <87ob6uks2p.fsf@informatimago.com> <149ed7f3-aa0a-48d9-8236-37237f350704@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1381743316 537 80.91.229.3 (14 Oct 2013 09:35:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Oct 2013 09:35:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 14 11:35:21 2013 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 1VVeYa-0005G2-Lx for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Oct 2013 11:35:20 +0200 Original-Received: from localhost ([::1]:35952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVeYa-0002XB-67 for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Oct 2013 05:35:20 -0400 X-Received: by 10.58.188.113 with SMTP id fz17mr2170088vec.26.1381743199696; Mon, 14 Oct 2013 02:33:19 -0700 (PDT) X-Received: by 10.49.40.168 with SMTP id y8mr643qek.42.1381743199634; Mon, 14 Oct 2013 02:33:19 -0700 (PDT) Original-Path: usenet.stanford.edu!o2no3948141qas.0!news-out.google.com!9ni39657qaf.0!nntp.google.com!i2no11489396qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=92.139.228.38; posting-account=OWLhBgoAAAD1H7ELDXVfr3-5BJaMOe1v Original-NNTP-Posting-Host: 92.139.228.38 User-Agent: G2/1.0 Injection-Date: Mon, 14 Oct 2013 09:33:19 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:201736 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:94005 Archived-At: Le dimanche 13 octobre 2013 05:26:50 UTC+2, Xue Fuqiao a =E9crit=A0: > I see, thank you. Personally, I often use 'no-error or 'noerror. Me too! When an argument (whether optional or required) is expected to be a boolean= ,=20 the expected values are usually `t' and `nil'. But I (try to) NEVER use any of these values (lexically speaking, of course= ). Instead, I use the names of the arguments, the way `eldoc' displays them in= the echo-area, so that, when I (or someone else) read the code some time later,=20 I can directly understand what I meant when I wrote it. For a `true' value (non-nil), I use the (quoted symbol) name of the argumen= t, e.g. 'verbose or 'noerror. For a `false' value (nil), I just use the opposite: (not 'verbose) or (not = 'no error). Of course, with "negative" flags (whose name begins with "no"),=20 it leads to an ugly double negation :( So, for example, as the function `load' is described as: ,----[ M-h f load RET ] | load is a built-in function in `C source code'. |=20 | (load FILE &optional NOERROR NOMESSAGE NOSUFFIX MUST-SUFFIX) `---- I would write, for example: (load file 'noerror 'nomessage) ; if I want no error and no message or (load file (not 'noerror) 'nomessage) ; if I want an error but no message And, yes, in the original context, :noerror 'noerror 'no-error t or any oth= er non-nil value=20 would produce almost(1) the same result. (1) From the point of view of the machine code, I mean.=20 Clearly, it produces a lot of different results in the head or the heart of= the humans reading the code and in the forum contents!