What is the difference between ‘cl-labels’ and ‘named-let’?
tpeplt <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
The Emacs Lisp reference manual does not describe the difference between the new-ish (since Emacs 28) ‘named-let’ and ‘cl-labels’ (other than the syntax, which allows ‘cl-labels’ to define many recursive local functions, while ‘named-let’ can only define one function per call). Are these two different in some significant way? The description for ‘named-let’ says that recursive calls in the tail position are guaranteed to be optimized tail calls, while the description for ‘cl-labels’ does not mention this. Is this not the case for ‘cl-labels’, too? (info "(cl) Function Bindings") Also, the Emacs Lisp reference manual describes ‘named-let’ as a special form (like ‘if’), while its docstring describes it as a macro. Is this an error in the reference manual? (info "(elisp) Local Variables") -- The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.