Subject: Re: bug#59714: 30.0.50; (void-function cl-letf)

From: Eli Zaretskii <[email-masked]>
Date: Wed, 30 Nov 2022 15:47:19 +0200

> Date: Wed, 30 Nov 2022 07:45:51 +0100
> From:  Manuel Uberti via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> this is the problem:
> 
> - emacs -Q
> - Evaluate: (cl-letf (((default-value 'process-environment) nil)))
> - You see the following error:
> 
> Debugger entered--Lisp error: (void-function cl-letf)
>    (cl-letf (((default-value 'process-environment) nil)))
>    (progn (cl-letf (((default-value 'process-environment) nil))))
>    eval((progn (cl-letf (((default-value 'process-environment) nil)))) t)
>    elisp--eval-last-sexp(nil)
>    eval-last-sexp(nil)
>    funcall-interactively(eval-last-sexp nil)
>    call-interactively(eval-last-sexp nil nil)
>    command-execute(eval-last-sexp)
> 
> - Evaluate again: (cl-letf (((default-value 'process-environment) nil)))
> 
> The error is not shown any more.

Why is this a problem?  Before you evaluate the offending expression,
(featurep 'cl-lib) yields nil, after that it yields t (because Emacs needed
to load that package).  I don't see what is wrong here.