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

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

bug#64646: Master: Native compiler doesn't always compile lambda forms.


From: Andrea Corallo
Subject: bug#64646: Master: Native compiler doesn't always compile lambda forms.
Date: Mon, 17 Jul 2023 09:17:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Alan Mackenzie <acm@muc.de> writes:

> In the master branch:
>
> (i) emacs -Q
> (ii) C-x b foo.el <RET>
> (iii) Insert into foo.el:
>     ;; -*- lexical-binding:t -*-
> (iv) M-x emacs-lisp-mode
> (v) Insert into foo.el:
>     (defun foo () "foo doc string"
>       (lambda (bar) "lambda doc string" (car bar)))
> (vi) With point after the function, C-x C-e to evaluate it.
>
> (vii) M-: (native-compile 'foo)
> This returns #<subr foo>
> (viii) M-: (foo)
> This returns the lambda form as a byte-compiled function.  This is a bug:
> it should return the lambda form as a native-compiled function.
>
> Note: this bug is also in the emacs-29 branch.

Hi Alan,

I can reproduce, (native-compile 'foo) compiles only foo, compiling the
whole compilation unit with eg `emacs-lisp-native-compile-and-load'
compiles as expected also the inner lambda.

I'm not 100% convinced this behaviour is a bug tho.

  Andrea





reply via email to

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