Subject: bug#31792: 27.0.50; Regression in #'labels, recent versions

From: Alan Mackenzie <[email-masked]>
Date: 13 Jun 2018 16:57:03 -0000

In article <[email-masked]> you wrote:
> found 31792 25.3
> quit

> Aidan Kehoe <[email-masked]> writes:

>> When I do the same in the emacs 22.1.1 that Apple built and shipped with
>> my OS, I get a compiled function object, as is much closer to being the
>> correct behaviour.

> Seems to have regressed in Emacs 25, cl-labels still works correctly.
> Here's a smaller reproducer:

> (labels ((foo () t))
>   #'foo) ;=> foo

> (cl-labels ((foo () t))
>   #'foo) ;=> (lambda nil t)

Just as a matter of interest, the doc strings for both these functions
are poor.

That for cl-labels says "make temporary function bindings" without saying
what a "function binding" is (it's not obvious), without saying what
functions (?or symbols) are being bound, and doesn't say whether they get
bound one after the other (in `let*' fashion) or all at once (in `let'
fashion).

It goes on to say "The bindings can be recursive, ...".  This is
gibberish to me.

Further, "the scoping is lexical".  The scoping of what is lexical?  And
in what?

I dare say I could fathom out most of these things with effort, but I
shouldn't have to.  Maybe this macro could be of use to me, but with the
doc string as it is, I'll never find out.  Pity.

-- 
Alan Mackenzie (Nuremberg, Germany).