GNU bug report logs - #4290
23.1; (elisp)Anonymous Functions - unclear about #'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 29 Aug 2009 21:10:06 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4290 in the body.
You can then email your comments to 4290 AT debbugs.gnu.org in the normal way.

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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4290; Package emacs. (Sat, 29 Aug 2009 21:10:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 29 Aug 2009 21:10:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Sat, 29 Aug 2009 14:07:31 -0700
This Info node is unclear. It combines pre-Emacs 22 text that
explicitly says that lambda forms are *not* byte-compiled unless you
use `#'' or `function', with this statement that says that they are:
 
  Nowadays it is possible to omit `function' entirely, like this:
     (defun double-property (symbol prop)
       (change-property symbol prop (lambda (x) (* 2 x))))
  This is because `lambda' itself implies `function'.
 
What should be said is something like this:
 
"Starting with Emacs 22, a lambda form is byte-compiled when it is used
as a function, regardless of whether it is preceded by `function' or
`#''.  With Emacs versions prior to 22, you must explicitly use `#''
or `function' if you want the form to be byte-compiled."
 
This means rewording or replacing the paragraph that says that unless
you use `function' a lambda form won't be byte-compiled. The example
and its accompanying text need to be clarified.
 

In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4290; Package emacs. (Sat, 12 Sep 2009 02:10:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 12 Sep 2009 02:10:05 GMT) Full text and rfc822 format available.

Message #10 received at 4290 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: emacs-devel <at> gnu.org, 4290 <at> debbugs.gnu.org
Subject: Re: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Fri, 11 Sep 2009 22:02:09 -0400
> This Info node is unclear. It combines pre-Emacs 22 text that
> explicitly says that lambda forms are *not* byte-compiled unless you
> use `#'' or `function', with this statement that says that they are:

>   Nowadays it is possible to omit `function' entirely, like this:
>      (defun double-property (symbol prop)
>        (change-property symbol prop (lambda (x) (* 2 x))))
>   This is because `lambda' itself implies `function'.

Thanks for spotting this.

Hmm---is `function' still useful for anything?



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4290; Package emacs. (Sat, 12 Sep 2009 06:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 12 Sep 2009 06:20:03 GMT) Full text and rfc822 format available.

Message #15 received at 4290 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Chong Yidong'" <cyd <at> stupidchicken.com>
Cc: <emacs-devel <at> gnu.org>, <4290 <at> debbugs.gnu.org>
Subject: RE: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Fri, 11 Sep 2009 23:13:03 -0700
> > This Info node is unclear. It combines pre-Emacs 22 text that
> > explicitly says that lambda forms are *not* byte-compiled unless you
> > use `#'' or `function', with this statement that says that they are:
> 
> >   Nowadays it is possible to omit `function' entirely, like this:
> >      (defun double-property (symbol prop)
> >        (change-property symbol prop (lambda (x) (* 2 x))))
> >   This is because `lambda' itself implies `function'.
> 
> Thanks for spotting this.
> 
> Hmm---is `function' still useful for anything?

At the very least it is needed for comptability with older Emacs versions. It
needs to be tolerated, at least.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4290; Package emacs. (Sat, 12 Sep 2009 19:50:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 12 Sep 2009 19:50:05 GMT) Full text and rfc822 format available.

Message #20 received at 4290 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: "Drew Adams" <drew.adams <at> oracle.com>, 4290 <at> debbugs.gnu.org,
        emacs-devel <at> gnu.org
Subject: Re: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Sat, 12 Sep 2009 15:41:15 -0400
> Thanks for spotting this.
> Hmm---is `function' still useful for anything?

Well, it's just as useful as ever.  I.e. it's useless when you consider
that its implementation is the same as `quote', but it's otherwise
indispensable (e.g. look at the implementation of the `lambda' macro in
subr.el).


        Stefan



Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Sun, 13 Sep 2009 01:55:09 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sun, 13 Sep 2009 01:55:09 GMT) Full text and rfc822 format available.

Message #25 received at 4290-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4290-done <at> debbugs.gnu.org
Subject: Re: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Sat, 12 Sep 2009 21:49:48 -0400
I have clarified the text.  Thanks for the bug report.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Sun, 11 Oct 2009 14:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 256 days ago.

Previous Next


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