[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33199: lambda forms are not self-quoting
From: |
Eli Zaretskii |
Subject: |
bug#33199: lambda forms are not self-quoting |
Date: |
Tue, 30 Oct 2018 09:01:29 +0200 |
> From: Noam Postavsky <npostavs@gmail.com>
> Date: Mon, 29 Oct 2018 19:06:25 -0400
> Cc: garreau@debbugs.gnu.org, alexandre <galex-713@galex-713.eu>
>
> Alexandre's recent post about pcase-lambda made me notice that lambda's
> docstring claims lambda forms are self-quoting. However, they are not:
>
> ;; -*- lexical-binding: t -*-
> (setq lexical-binding t) ; for *scratch*
>
> (lambda (x) (+ 1 x)) ;=> (closure (t) (x) (+ 1 x))
The doc string is still correct if lexical-binding is not in effect,
isn't it?
> From: Noam Postavsky <npostavs@gmail.com>
> Date: Mon, 29 Oct 2018 19:01:07 -0400
> Subject: [PATCH v1] Don't claim lambda forms are self-quoting
>
> * doc/lispref/functions.texi (Anonymous Functions):
> * lisp/subr.el (lambda): Don't say that a lambda form yields itself,
> under lexical binding it yields a closure object.
This removes useful information, IMO. I'd be much happier if we added
to the existing docs that lambda is not self-quoting in the
lexical-binding environment, and described (and explained) what does
happen in the lexical-binding environment.
Thanks.