GNU bug report logs - #60895
Make lambda warning easier to understand

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Tue, 17 Jan 2023 22:51:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 60895 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60895; Package emacs. (Tue, 17 Jan 2023 22:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 Jan 2023 22:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Make lambda warning easier to understand
Date: Wed, 18 Jan 2023 06:50:36 +0800
After saying
   Warning: (lambda nil \.\.\.) quoted with ' rather than with #'

please also say
   Just change '(lambda into #'(lambda

That way people will understand it.
https://emacs.stackexchange.com/questions/74318/warning-quoted-with-rather-than-with




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60895; Package emacs. (Tue, 17 Jan 2023 23:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 60895 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Dan Jacobson <jidanni <at> jidanni.org>, "60895 <at> debbugs.gnu.org"
 <60895 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#60895: Make lambda warning easier to understand
Date: Tue, 17 Jan 2023 23:25:29 +0000
> After saying
>    Warning: (lambda nil \.\.\.) quoted with ' rather than with #'
> 
> please also say
>    Just change '(lambda into #'(lambda
> 
> That way people will understand it.
> https://urldefense.com/v3/__https://emacs.stackexchange.com/questions/743
> 18/warning-quoted-with-rather-than-
> with__;!!ACWV5N9M2RV99hQ!IsLX9TB5zcLT0PwRzmL0cCiiGzx62LVQbGMPk3EiStP6kJvG
> Um6D1reVbucpBxlw8r6g-KjbeT19F7SFjA$

Users should be told, so they understand:

1. Not to quote lambdas.  Tell them that the result
   is a _list_, which only in some cases will be
   interpreted as a function.  (And mention that the
   byte compiler often can't know the intended use
   is as a function, if it's quoted.)

2. lambdas don't need to be quoted - they're
   self-evaluating in Elisp - like t and nil.

3. Using #' makes the intention/use clear for all,
   including the byte-compiler.

A byte-compiler warning is appropriate.  Preferably
it would also point you to doc explaining this in
more detail in the Elisp manual.





Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 04 Sep 2023 09:14:02 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.