GNU bug report logs - #52063
28.0.60; Confusing presentation of lambda

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Tue, 23 Nov 2021 18:57:02 UTC

Severity: normal

Found in version 28.0.60

Full log


Message #95 received at 52063 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, fgunbin <at> fastmail.fm, larsi <at> gnus.org,
 52063 <at> debbugs.gnu.org
Subject: Re: bug#52063: 28.0.60; Confusing presentation of lambda
Date: Wed, 24 Nov 2021 22:37:53 +0000
>> I'm annoyed by this misfeature.  If it means nothing to you and others, 
>> so be it.
>
> I fully understand desire to see function values printed as much as 
> possible as their original source code, but it's hard to reconcile this 
> with the needs of clean semantics, efficient execution, good code 
> analysis, ...
>

AFAIU, the fundamental question here is: is "(closure (t) args body)" 
different in any way from "(lambda args body)"?  If not, is there a good 
reason to use a "(closure (t)" instead of a "(lambda"?

FWIW, I'm running an Emacs with the following patch right now, which 
apparently breaks a couple of edebug tests in make check.  Apart from 
that, it seems that it doesn't change anything in the way Emacs behaves.

diff --git a/src/eval.c b/src/eval.c
index 94ad060773..5d02cabaf4 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -564,6 +564,8 @@ DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 
0,
     xsignal2 (Qwrong_number_of_arguments, Qfunction, Flength (args));

   if (!NILP (Vinternal_interpreter_environment)
+      && !(EQ (Fcar (Vinternal_interpreter_environment), Qt) &&
+          NILP (Fcdr (Vinternal_interpreter_environment)))
       && CONSP (quoted)
       && EQ (XCAR (quoted), Qlambda))
     { /* This is a lambda expression within a lexical environment;




This bug report was last modified 3 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.