[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11782: 24.1; closure is not self-quoting
From: |
Christopher Schmidt |
Subject: |
bug#11782: 24.1; closure is not self-quoting |
Date: |
Tue, 28 May 2013 23:35:08 +0100 (BST) |
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
Hi Stefan,
> Could you expand on why you think it's severe?
I think this issue is severe because the behaviour is odd and follows
neither other mature Lispy languages nor the reference manual.
(info "(elisp)Lambda Expressions")
In Emacs Lisp, such a list is valid as an expression--it evaluates
to itself.
As I said 11 month ago, I hit on this issue a few times already. So did
others. In most cases I had a lambda form that was eval'ed twice due to
macro expansion.
;; -*- lexical-binding: t -*-
(defmacro a ()
(let ((l (lambda () )))
`(funcall ,l)))
(a)
I realise there is a technical need for lambda's to evaluate to closures
in a lexical environment. Are there any technical reasons for lexical
closures to not self-quote?
BTW I am perfectly fine with just fixing the docs.
Christopher