Subject: Re: bug#49407: Request: Specify default values in `map-let` in Map.el

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 08 Aug 2023 14:41:28 +0200

Michael Heerdegen [2023-07-31 06:02 +0200] wrote:

> Does this addition look appropriate?

Reads fine to me, so AFAIC feel free to install.
Just a couple of thoughts inline:

> diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
> index b55eb431668..04c00a2e908 100644
> --- a/lisp/emacs-lisp/map.el
> +++ b/lisp/emacs-lisp/map.el
> @@ -57,9 +57,10 @@ map
>  defaults to nil.  Both KEY and DEFAULT are evaluated.
>
>  Each element can also be a SYMBOL, which is an abbreviation of
> -a (KEY PAT) tuple of the form (\\='SYMBOL SYMBOL).  When SYMBOL
> -is a keyword, it is an abbreviation of the form (:SYMBOL SYMBOL),
> -useful for binding plist values.
> +a (KEY PAT) tuple of the form (\\='SYMBOL SYMBOL).  A keyword :FOO
> +is an abbreviation of the form (:FOO FOO), useful for binding plist values.

If you prefer to keep the stronger connectedness(?) between the
sentences, and/or avoid introducing a metaname with no inherent meaning:

                                                      Specifically
  when SYMBOL is a keyword :KEY, it is an abbreviation of the
  form (:KEY KEY), which can be useful for binding plist values.

> +See `map-elt' for an explanation of the used equality tests.

s/used/relevant/ would avoid the passive voice, if you prefer.
Or 'for details on key lookup', or ...

[ Trying to get on Eli's non-naughty list. ]

> If it's not clear: I changed :SYMBOL to :FOO because the original text
> called SYMBOL a keyword and then used SYMBOL and :SYMBOL (although then
> only :SYMBOL would be the keyword) - I found that confusing.  :KEYWORD
> would also be confusing, so I went with the placeholder "FOO".

I'm confused, I thought FOO stood For Obfuscation Only ;).

Thanks,
-- 
Basil