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 #125 received at 52063 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Philipp Stephani <p.stephani2 <at> gmail.com>,
 Filipp Gunbin <fgunbin <at> fastmail.fm>, Eli Zaretskii <eliz <at> gnu.org>,
 52063 <at> debbugs.gnu.org
Subject: Re: bug#52063: 28.0.60; Confusing presentation of lambda
Date: Thu, 25 Nov 2021 11:56:16 -0800
On 11/25/2021 11:07 AM, Stefan Monnier via Bug reports for GNU Emacs, 
the Swiss army knife of text editors wrote:
> IOW, the final `t` can be dispensed with, we could swap the arglist and
> the captured environment, and we could filter the environment to only
> include variables which are actually used inside the function.

It might be nice to print an empty arglist as "()" instead of "nil" too. 
While both of those are equivalent, I think "()" is more idiomatic when 
showing an arglist. Currently we have:

  (lambda () (setq foo 1))
  ;; => (closure (t) nil (setq foo 1))

In that case, since there's no captured variables and no args, it might 
be nicer to show it as:

  (closure () () (setq foo 1))

Or even:

  (closure () (setq foo 1))




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.