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

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

bug#52063: 28.0.60; Confusing presentation of lambda


From: Lars Ingebrigtsen
Subject: bug#52063: 28.0.60; Confusing presentation of lambda
Date: Thu, 25 Nov 2021 14:15:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Filipp Gunbin <fgunbin@fastmail.fm> writes:

> Or maybe we could just _print_ the closure objects in such a special
> way that it's more pleasant to read, especially when there's actually
> empty lexical environment.

(pp-emacs-lisp-code (lambda () (setq foo bar) (setq foo bar)))
=>
(closure
 (t)
 nil
 (setq foo bar)
 (setq foo bar))

Slightly less confusing, but perhaps it should be

(closure (t) nil
  (setq foo bar)
  (setq foo bar))

Depends on the length of the lexical list, though:

(pp-emacs-lisp-code
 (let ((bar 1))
   (lambda (f) (setq foo bar) (setq foo bar))))
=>
(closure ((bar . 1) t) (f)
  (setq foo bar)
  (setq foo bar))

can be unwieldy if the list is long.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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