Al Haji-Ali <[email protected]> writes:

> I am getting the error `(void-function closure)` on Emacs 29.4 (but not
> on 31.0.50 FWIW) when the default value of the function
> `preview-auto-reveal` is executed. I am able to reproduce the error on
> Emacs 29.4 with this
>
> (require 'preview)
> (apply preview-auto-reveal)
>
> *IF* the preview.el file is not compiled. I can also reproduce the error
>  (assuming lexical-binding is t) by using its default value:
>
> (apply `(eval . ((apply #'preview-arrived-via
>                    (mapcar ,(lambda (cmd)
>                               (if (and (listp cmd) (eq (car cmd) 
> 'key-binding))
>                                   (eval cmd t)
>                                 cmd))
>                            preview-auto-reveal-commands))
>             t)))
>
> or simply with the stripped down version:
>
> (apply `(eval . ((apply #'ignore (mapcar ,(lambda (cmd) nil) nil)) t)))
>
>
> Removing `,` before the (lambda ...) fixes the error, but I am not sure
> why it was there in the first place.

To create a closure at the point where the function is being written.
Maybe 29.4 has a problem with the function cell/data cell retainment in
this expression?

Does preceding ,(lambda ...) with #' help?  That would add a
function-quote around the finished closure.  Which should really not do
anything in this context, but then we should not be getting this error
in the first place.

-- 
David Kastrup



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex
  • bug#79975:... Al Haji-Ali
    • bug#7... Stefan Monnier via bug-auctex via Bug reporting list for AUCTeX
    • bug#7... David Kastrup
      • b... Al Haji-Ali
        • ... Arash Esbati
          • ... Al Haji-Ali
            • ... Arash Esbati

Reply via email to