GNU bug report logs - #4433
23.1; dolist vs dolist

Previous Next

Package: emacs;

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

Date: Mon, 14 Sep 2009 19:25:05 UTC

Severity: minor

Tags: fixed, wontfix

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

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 4433 in the body.
You can then email your comments to 4433 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#4433; Package emacs. (Mon, 14 Sep 2009 19:25:05 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>. (Mon, 14 Sep 2009 19:25:05 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; dolist vs dolist
Date: Mon, 14 Sep 2009 12:16:27 -0700
The doc strings for the `dolist' defined in emacs -Q and the `dolist'
defined in cl-macs.el are the same. However, the two `dolist's are not
the same.
 
At the very least, the doc string for the CL version should mention
`return-from' and any other features that it offers and which are not
available for the vanilla `dolist'. And the doc string for the vanilla
`dolist' should mention that it is not the same as the `dolist' of
Common Lisp.
 
Even more important is to document this in the Elisp manual. State
clearly that `dolist' (the one provided by Emacs, without cl.el) is
not the same as the `dolist' of Common Lisp or the `dolist' of cl.el,
both of which support `return-from', and so on.
 
The use of the same name by Emacs for a very different function
(macro) is confusing and error prone. The least we can do is point
this out in the doc.

Note that we do say this in node Catch and Throw:

"Common Lisp note: Most other versions of Lisp, including Common
 Lisp, have several ways of transferring control nonsequentially:
 `return', `return-from', and `go', for example.  Emacs Lisp has
 only `throw'."

A similar note is called for wherever Emacs has a function or macro with the
same name as one from Common Lisp, whenever there is a significant difference in
behavior.
 

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





Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 04 Nov 2009 22:10:10 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 13 Jul 2011 13:00:04 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 4433 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 13 Jul 2011 13:00:05 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4433; Package emacs. (Wed, 13 Jul 2011 13:09:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4433 <at> debbugs.gnu.org
Subject: Re: 23.1; dolist vs dolist
Date: Wed, 13 Jul 2011 14:58:46 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> Even more important is to document this in the Elisp manual. State
> clearly that `dolist' (the one provided by Emacs, without cl.el) is
> not the same as the `dolist' of Common Lisp or the `dolist' of cl.el,
> both of which support `return-from', and so on.

If you have a definition of `return-from', then you have the cl.el
`dolist', so I don't really see the point.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jul 2011 13:33:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4433; Package emacs. (Thu, 14 Jul 2011 21:27:01 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 4433 <at> debbugs.gnu.org
Subject: RE: 23.1; dolist vs dolist
Date: Thu, 14 Jul 2011 14:26:40 -0700
> From: Drew Adams  Sent: Wednesday, July 13, 2011 6:30 AM
> 
> > If you have a definition of `return-from', then you have the cl.el
> > `dolist', so I don't really see the point.
> 
> I don't see _your_ point.  There is no need to check 
> `return-from'.  `C-h f' also tells you which you have, by 
> referring to the source file.
> 
> That's not the point.
> 
> These two macros have the same name.
> These two macros have the same doc.
> 
> These two macros have different behavior.
> 
> This difference, with no corresponding difference in doc or 
> name, is a proven source of confusion.
> 
> It's probably too late to make the names different and 
> correct the bad design.
> 
> The doc should distinguish them, carefully and clearly, even 
> explicitly averting users to the possible confusion (gotcha).





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4433; Package emacs. (Tue, 02 Aug 2011 18:51:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4433 <at> debbugs.gnu.org
Subject: Re: 23.1; dolist vs dolist
Date: Tue, 02 Aug 2011 20:49:50 +0200
I've now mentioned the block in the cl-macs dolist.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 02 Aug 2011 18:51:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 4433 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 02 Aug 2011 18:51:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 31 Aug 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 10 days ago.

Previous Next


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