From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ryan Hodges Newsgroups: gmane.emacs.bugs Subject: bug#67185: Small bug in the Introduction to Elisp manual Date: Tue, 14 Nov 2023 15:14:53 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ed8449060a24f4c7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25351"; mail-complaints-to="usenet@ciao.gmane.io" To: 67185@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 15 02:57:37 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1r359t-0006Tt-56 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Nov 2023 02:57:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r359h-0008OY-ES; Tue, 14 Nov 2023 20:57:25 -0500 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 1r359d-0008N7-4G for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 20:57:21 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r359c-0002hE-Sc for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 20:57:20 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r35AJ-0007Rl-9D for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 20:58:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ryan Hodges Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Nov 2023 01:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67185 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170001344328485 (code B ref -1); Wed, 15 Nov 2023 01:58:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Nov 2023 01:57:23 +0000 Original-Received: from localhost ([127.0.0.1]:34399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r359f-0007PH-6b for submit@debbugs.gnu.org; Tue, 14 Nov 2023 20:57:23 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:48294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r32dT-000314-Dy for submit@debbugs.gnu.org; Tue, 14 Nov 2023 18:16:00 -0500 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 1r32cg-00083y-0U for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 18:15:10 -0500 Original-Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r32cd-0008Gf-2B for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 18:15:09 -0500 Original-Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5a9bf4fbd3fso4974217a12.1 for ; Tue, 14 Nov 2023 15:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700003705; x=1700608505; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=FX6x16x0SjUYz4SLDw/REqg2azsZMsPdMasr8Z/qpmo=; b=AgLRTcDSgjFn1ppZcBbjj+Sn7R3c4bIu9ZjJ3dwAXNN6IShkvGvuw3sY9pgejOU6PT G0L6B9chjBxJdNtfjQhoMFzsnnmlCChuRLEE25L0ncCVEtLhjBZbAVO379ufagsTXxfw Js6vVivb5POTPjFr6iSL5LzJ+ahyhm+O0XFokTMjVO9klPRE7MJeUi8nIv1nNoX8AKwE sC+0LFKUFfUBaIxpTXJWVt1AAFxc2K7Vh6dFBQEzTSgaluU0yU4oGNMNz93ud563HBJc xdC8ecOaAyU1F7rixNcD/N+p72Zph2mbDdjmy2owX2sXSf/tNsWy0H9FanbGSvqpO9Vu XcwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700003705; x=1700608505; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=FX6x16x0SjUYz4SLDw/REqg2azsZMsPdMasr8Z/qpmo=; b=SWPCDxJkH+9Pm5Sr7QSNQtXSFut5QUK0QmmMbfeNXP0i+Hs7vzhH1QwKctjhdCXd9j 930BCJOaPxJ4IQ3B3Rb1pT7mNcghO65Se5cUsjAgdom+lnJUZPGo7OFF+l1jbleEGBoD x8a+3C+YHWU0DlloPL7Y900AhyFm7JuOthR7eqRvNaKmaBUjk5aQKNVcZfzTm+oxQBse imQjdouQyvaL3AVQsxVE8/E1m4soGxHtSQoWzYcc9Wu/YZHfc7yK8UkHs4ByH3YvZNaP 6yPKi0lA3SDQ4kLK2fR8HlPAsldjb485zVosqTuj1IhVh9mIPKPioNeMemLls/dlyXvq VqCg== X-Gm-Message-State: AOJu0Ywn5VejKsuRPISNfeiHznucvlSUGDWaTgGE12GQjSeq7vi7J4zh pHtspV7ByOs1WjCVwtdLR8bCuV4Mq922M3tRZmfyGlSjvoE= X-Google-Smtp-Source: AGHT+IGWnmc5fQ10DdA1Pq88FHAjrqlk2N+zWNPdSqroO+9aOSbZV45XPVbUR8PE7+CL2QC/u5FhPgqcrRYtRAGiJ6E= X-Received: by 2002:a17:90b:3a8d:b0:27d:a0e5:2a67 with SMTP id om13-20020a17090b3a8d00b0027da0e52a67mr10795780pjb.18.1700003704569; Tue, 14 Nov 2023 15:15:04 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=rphodges@gmail.com; helo=mail-pg1-x530.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 14 Nov 2023 20:57:16 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274338 Archived-At: --000000000000ed8449060a24f4c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In section '8.2.2 Lisp macro' it says, "The =E2=80=98kill-region=E2=80=99 function definition also has an =E2=80= =98unless=E2=80=99 macro; it is the converse of =E2=80=98when=E2=80=99. The =E2=80=98unless=E2=80=99 ma= cro is an =E2=80=98if=E2=80=99 without a then clause" Instead of saying "converse of 'when'" it should say "inverse of 'when'." Also, that statement about 'unless' being an 'if' without a 'then' clause tripped me up. I thought you were trying to say that the 'unless' form didn't have a then clause, which isn't correct. Then I thought the point you were really trying to make was that the unless form, like when, doesn't have an 'else' clause. Now that I've read the corresponding section in the reference manual I know what you mean. I think we should borrow the examples from the reference manual to make it clear and also emphasize that 'unless' is a convenient mechanism for evaluating multiple statements when a condition is not true. Maybe the text should be: "The kill-region function definition also has an 'unless' macro. It is the inverse of 'when'. The form, (unless CONDITION A B C) is equivalent to the form (when (not (CONDITION)) A B C) The 'unless' form is ideal in situations when multiple expressions should be evaluated when a condition is not true. The 'unless' macro can also be viewed as an 'if' which does nothing in the 'then' clause but evaluates one or more statements in the 'else' clause. In particular, (unless CONDITION A B C) is equivalent to the form, (if CONDITION nil A B C) In other words, if CONDITION is true, the form does nothing. Otherwise, when CONDITION is false, the form evaluates 'A B C'. If you approve of the text or provide me more accurate phrasing, I'll gladly submit a patch. I also understand if you think I'm being a little too verbose. Regards, Ryan Hodges --000000000000ed8449060a24f4c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In section '8.2.2 Lisp macro' it says,=C2=A0
<= br>
"The =E2=80=98kill-region=E2=80=99 function definition also ha= s an =E2=80=98unless=E2=80=99 macro; it
is the converse of =E2=80=98wh= en=E2=80=99.=C2=A0 The =E2=80=98unless=E2=80=99 macro is an =E2=80=98if=E2= =80=99 without a then=C2=A0clause"

Instead of sayi= ng "converse of 'when'" it should say "inverse of &#= 39;when'." Also, that statement about 'unless' being an &#= 39;if' without a 'then' clause tripped me up. I thought you wer= e trying to say that the 'unless' form didn't have a then claus= e, which isn't correct.=C2=A0 Then I thought the point you were really = trying to make was that the unless form, like when, doesn't have an = 9;else' clause.=C2=A0 =C2=A0=C2=A0

Now that I&= #39;ve read the=C2=A0corresponding section in the reference manual I know w= hat=C2=A0you=C2=A0mean.=C2=A0 =C2=A0I think we should borrow the examples f= rom the reference manual=C2=A0 to make it clear and also emphasize that = 9;unless' is a convenient mechanism=C2=A0for evaluating multiple statem= ents when a condition is not true.
=C2=A0
Maybe the tex= t should be:

"The kill-region function definition a= lso has an 'unless' macro. It is the inverse of 'when'. The= form,=C2=A0
(unless CONDITION A B C)
is equival= ent to the form
(when (not (CONDITION)) A B C)
The 'unless&= #39; form is ideal in situations when multiple expressions should be evalua= ted when a condition is not true. The 'unless' macro can also be vi= ewed as an 'if' which does nothing in the 'then' clause but= evaluates one or more statements in the 'else' clause.=C2=A0 In pa= rticular,
= (unless CONDITION A B C)
is equivalent to the form,
(if CONDITION n= il A B C)
In other words, if CONDITION is true, the form = does nothing.=C2=A0 Otherwise, when CONDITION is false, the form evaluates = 'A B C'.

If you= approve of the text or provide me=C2=A0more accurate=C2=A0phrasing, I'= ll gladly submit a patch.=C2=A0 I also understand if you think I'm bein= g a little too verbose.=C2=A0=C2=A0

Regards,
<= div>Ryan Hodges
--000000000000ed8449060a24f4c7--