Subject: bug#75498: 31.0.50; cl-block is not lexically scoped

From: Michael Heerdegen <[email-masked]>
Date: Wed, 15 Jan 2025 14:34:04 +0100

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Not sure what I was thinking when I wrote that code.
> IIRC someone else reported basically this bug already some years ago,
> and I lost track of it somehow.
> I think the patch below might do the trick.

Hmm - but there is something wrong, I get

Debugger entered--Lisp error: (void-variable --cl-block-x--)
  (throw --cl-block-x-- 'dynamic)
  (return-from-x)
  (catch --cl-block-x-- (return-from-x) (throw --cl-block-x-- 'lexical))
  (let ((--cl-block-x-- (cons '--cl-block-x-- nil))) (catch --cl-block-x-- (return-from-x) (throw --cl-block-x-- 'lexical)))
  (x-block)

for the originally posted example.

Michael.