[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: |
Fri, 26 Nov 2021 13:28:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Jim Porter <jporterbugs@gmail.com> writes:
> 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))
The printer used here is a general Lisp printer, and doesn't know
anything about the semantics. (And I don't think we can change that.)
But Emacs 29 has a language-aware pp variant, which does what you
suggest:
(lambda () 'foo)
=> (closure (t) nil 'foo)
(pp-emacs-lisp-code '(closure (t) nil 'foo))
=> (closure (t) ()
'foo)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#52063: 28.0.60; Confusing presentation of lambda, (continued)
- bug#52063: 28.0.60; Confusing presentation of lambda, Philipp Stephani, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Filipp Gunbin, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/25
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/25
- bug#52063: 28.0.60; Confusing presentation of lambda, Jim Porter, 2021/11/25
- bug#52063: 28.0.60; Confusing presentation of lambda,
Lars Ingebrigtsen <=
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/27
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/27
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/29