emacs-devel
[Top][All Lists]
Advanced

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

Re: [nongnu] elpa/meow cee4a34917: Fix a compilation warning in Emacs29


From: Stefan Monnier
Subject: Re: [nongnu] elpa/meow cee4a34917: Fix a compilation warning in Emacs29
Date: Mon, 27 Mar 2023 15:23:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> @@ -149,10 +149,16 @@ This uses the variable 
> meow-update-cursor-functions-alist, finds the first
>  item in which the car evaluates to true, and runs the cdr. The last item's 
> car
>  in the list will always evaluate to true."
>    (with-current-buffer (window-buffer)
> -    (thread-last meow-update-cursor-functions-alist
> -      (cl-remove-if-not (lambda (el) (funcall (car el))))
> -      (cdar)
> -      (funcall))))
> +    ;; Adapt Emacs29
> +    ;; Using thread-last here causes following error:
> +    ;; Warning: Optimization failure for cdar: Handler: 
> internal--compiler-macro-cXXr (wrong-number-of-arguments (2 . 2) 1)
> +    ;; Original code:
> +    ;; (thread-last meow-update-cursor-functions-alist
> +    ;;   (cl-remove-if-not (lambda (el) (funcall (car el))))
> +    ;;   (cdar)
> +    ;;   (funcall))
> +    (funcall (cdar (cl-remove-if-not (lambda (el) (funcall (car el)))
> +                                     meow-update-cursor-functions-alist)))))

My crystal ball suggests this optimization failure is a red-herring and
that the real problem is that you don't `(require 'subr-x)` so
`thread-last` is not defined and the call to `thread-last` is compiled
as if it were a function call rather than a macro call.


        Stefan




reply via email to

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