Subject: bug#67185: Small bug in the Introduction to Elisp manual

From: Eli Zaretskii <[email-masked]>
Date: Wed, 15 Nov 2023 21:32:08 +0200

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

> From: Ryan Hodges <[email-masked]>
> Date: Wed, 15 Nov 2023 09:58:11 -0800
> 
> On Wed, Nov 15, 2023 at 4:18 AM Eli Zaretskii <[email-masked]> wrote:
> 
>  > From: Ryan Hodges <[email-masked]>
>  > 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.