all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ryan Hodges <rphodges@gmail.com>
Cc: 67185@debbugs.gnu.org, Richard Stallman <rms@gnu.org>
Subject: bug#67185: Small bug in the Introduction to Elisp manual
Date: Wed, 15 Nov 2023 21:32:08 +0200	[thread overview]
Message-ID: <837cmirex3.fsf@gnu.org> (raw)
In-Reply-To: <CABPno9+==Vp-x851SLp6m7E8-e2kr7DAxkzaYC2HF7VjAk2QjQ@mail.gmail.com> (message from Ryan Hodges on Wed, 15 Nov 2023 09:58:11 -0800)

[Please use Reply All to reply, so that everyone is CC'ed.]

> From: Ryan Hodges <rphodges@gmail.com>
> Date: Wed, 15 Nov 2023 09:58:11 -0800
> 
> On Wed, Nov 15, 2023 at 4:18 AM Eli Zaretskii <eliz@gnu.org> wrote:
> 
>  > From: Ryan Hodges <rphodges@gmail.com>
>  > Date: Tue, 14 Nov 2023 15:14:53 -0800
>  > 
>  > In section '8.2.2 Lisp macro' it says, 
>  > 
>  >  "The ‘kill-region’ function definition also has an ‘unless’ macro; it
>  >  is the converse of ‘when’.  The ‘unless’ macro is an ‘if’ without a then clause"
>  > 
>  > Instead of saying "converse of 'when'" it should say "inverse of
>  > 'when'."
> 
>  I'm not a native English speaker, but "converse" sounds correct to me
>  in this context.
> 
> 'converse'  means to reverse the order of.

Not necessarily, at least not  according to the dictionaries I see.  For example
(https://www.collinsdictionary.com/us/dictionary/english/converse):

   The converse of a statement is its opposite or reverse.

Or (https://dictionary.cambridge.org/dictionary/english/converse):

  the opposite:
    . In the US, you drive on the right-hand side of the road, but in the UK the converse applies.
    . However, the converse of this theory may also be true.

>  No, it says it doesn't have "then", i.e. it only have the "else" part.
>  Which sounds fine to me.
> 
> Earlier in the document, 'when' is described as an 'if' statement without an 'else' clause.  That makes
> sense to me.  The 'else' clause is completely optional.  i.e the 'if' form below does not have an 'else'
> 
> (if (> 5 4) 'true)
> 
> In this section of the document we are describing an 'if' without a 'then'.  That didn't make sense to me
> because the 'then' clause is a mandatory argument.  It can be 'nil' but it's still mandatory.

AFAIU, the text attempts to explain 'when' and 'unless' in terms if
'if', and it doesn't try to be rigorously correct, but rather to be
intuitively understandable by people who may not be programmers or
have a mathematical background. So "if without then" might not make
sense to someone who has the "if" syntax burnt into his/her muscle
memory, but it does make sense if you consider that "if" has a "then"
block and an "else" block, and "unless" executes the "else" block of
the condition.

So this is why I asked Richard to review this text and your comments.





  parent reply	other threads:[~2023-11-15 19:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 23:14 bug#67185: Small bug in the Introduction to Elisp manual Ryan Hodges
2023-11-15 12:18 ` Eli Zaretskii
     [not found]   ` <CABPno9+==Vp-x851SLp6m7E8-e2kr7DAxkzaYC2HF7VjAk2QjQ@mail.gmail.com>
2023-11-15 19:32     ` Eli Zaretskii [this message]
2023-11-15 20:18       ` Ryan Hodges
2023-11-17  3:56         ` Richard Stallman
2023-11-17  7:19           ` Eli Zaretskii
2023-11-17 13:22             ` Ryan Hodges
2023-11-19  3:40             ` Richard Stallman
2023-11-19 10:16               ` Eli Zaretskii
2023-11-19 19:01                 ` Ryan Hodges
2023-11-21  2:42                   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837cmirex3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67185@debbugs.gnu.org \
    --cc=rms@gnu.org \
    --cc=rphodges@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.