unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [nongnu] elpa/meow cee4a34917: Fix a compilation warning in Emacs29
       [not found] ` <20230327050035.75915C0060F@vcs2.savannah.gnu.org>
@ 2023-03-27 19:23   ` Stefan Monnier
  2023-03-27 19:38     ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2023-03-27 19:23 UTC (permalink / raw)
  To: team-race; +Cc: emacs-devel

> @@ -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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [nongnu] elpa/meow cee4a34917: Fix a compilation warning in Emacs29
  2023-03-27 19:23   ` [nongnu] elpa/meow cee4a34917: Fix a compilation warning in Emacs29 Stefan Monnier
@ 2023-03-27 19:38     ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2023-03-27 19:38 UTC (permalink / raw)
  To: team-race; +Cc: emacs-devel

> 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.

Hmm... once again I should have waitied to read all my mail before
sending this, since the fix was installed soon after (hence before
I sent that email).

Sorry 'bout that.
I guess the only upside is that my crystal ball was right :-)


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-27 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <167989323517.3717.16516832099659022451@vcs2.savannah.gnu.org>
     [not found] ` <20230327050035.75915C0060F@vcs2.savannah.gnu.org>
2023-03-27 19:23   ` [nongnu] elpa/meow cee4a34917: Fix a compilation warning in Emacs29 Stefan Monnier
2023-03-27 19:38     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).