unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #'
@ 2009-08-29 21:07 ` Drew Adams
  2009-09-13  1:55   ` bug#4290: marked as done (23.1; (elisp)Anonymous Functions - unclear about #') Emacs bug Tracking System
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2009-08-29 21:07 UTC (permalink / raw)
  To: bug-gnu-emacs

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)'
 







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #'
@ 2009-09-12  2:02 Chong Yidong
  0 siblings, 0 replies; 5+ messages in thread
From: Chong Yidong @ 2009-09-12  2:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: 4290, emacs-devel

> 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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #'
       [not found] <87my50gbtq.fsf@stupidchicken.com>
@ 2009-09-12  6:13 ` Drew Adams
  2009-09-12 19:41 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2009-09-12  6:13 UTC (permalink / raw)
  To: 'Chong Yidong'; +Cc: 4290, emacs-devel

> > 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.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #'
       [not found] <87my50gbtq.fsf@stupidchicken.com>
  2009-09-12  6:13 ` Drew Adams
@ 2009-09-12 19:41 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2009-09-12 19:41 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 4290, emacs-devel

> 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#4290: marked as done (23.1; (elisp)Anonymous Functions - unclear about #')
  2009-08-29 21:07 ` bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #' Drew Adams
@ 2009-09-13  1:55   ` Emacs bug Tracking System
  0 siblings, 0 replies; 5+ messages in thread
From: Emacs bug Tracking System @ 2009-09-13  1:55 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

Your message dated Sat, 12 Sep 2009 21:49:48 -0400
with message-id <87zl8zbolf.fsf@cyd.mit.edu>
and subject line Re: 23.1; (elisp)Anonymous Functions - unclear about #'
has caused the Emacs bug report #4290,
regarding 23.1; (elisp)Anonymous Functions - unclear about #'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4290: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4290
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3841 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: <bug-gnu-emacs@gnu.org>
Subject: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Sat, 29 Aug 2009 14:07:31 -0700
Message-ID: <3633B0285FB94C2FB4A96A411451331D@us.oracle.com>

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)'
 




[-- Attachment #3: Type: message/rfc822, Size: 1115 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 4290-done@emacsbugs.donarmstrong.com
Subject: Re: 23.1; (elisp)Anonymous Functions - unclear about #'
Date: Sat, 12 Sep 2009 21:49:48 -0400
Message-ID: <87zl8zbolf.fsf@cyd.mit.edu>

I have clarified the text.  Thanks for the bug report.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-13  1:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87zl8zbolf.fsf@cyd.mit.edu>
2009-08-29 21:07 ` bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #' Drew Adams
2009-09-13  1:55   ` bug#4290: marked as done (23.1; (elisp)Anonymous Functions - unclear about #') Emacs bug Tracking System
2009-09-12  2:02 bug#4290: 23.1; (elisp)Anonymous Functions - unclear about #' Chong Yidong
     [not found] <87my50gbtq.fsf@stupidchicken.com>
2009-09-12  6:13 ` Drew Adams
2009-09-12 19:41 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).