bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51140: 28.0.50; cl-letf appears not to work with native-comp (at lea


From: Michael Heerdegen
Subject: bug#51140: 28.0.50; cl-letf appears not to work with native-comp (at least for process-exit-status and other builtins)
Date: Tue, 12 Oct 2021 04:50:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Robert Irelan <rirelan@gmail.com> writes:

>     (defun +ivy--always-return-zero-exit-code-a (fn &rest args)
>       (let ((process-exit-status-orig
>              (symbol-function 'process-exit-status)))
>         (cl-letf* (((symbol-function 'process-exit-status)
>                     (lambda (_proc)
>                       (let ((code (funcall process-exit-status-orig proc)))
>                         (if (= code 2) 0 code)))))
>           (apply fn args)))

You didn't touch what I meant: the variable `proc' is free in your
lambda.  There is only an argument with the similar name `_prog'.  So
that code still looks broken.

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]