unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4433: 23.1; dolist vs dolist
@ 2009-09-14 19:16 Drew Adams
  2011-07-13 12:58 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2009-09-14 19:16 UTC (permalink / raw)
  To: bug-gnu-emacs

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







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

* bug#4433: 23.1; dolist vs dolist
  2009-09-14 19:16 bug#4433: 23.1; dolist vs dolist Drew Adams
@ 2011-07-13 12:58 ` Lars Magne Ingebrigtsen
  2011-07-14 21:26   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-13 12:58 UTC (permalink / raw)
  To: Drew Adams; +Cc: 4433

"Drew Adams" <drew.adams@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/





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

* bug#4433: 23.1; dolist vs dolist
  2011-07-13 12:58 ` Lars Magne Ingebrigtsen
@ 2011-07-14 21:26   ` Drew Adams
  2011-08-02 18:49     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2011-07-14 21:26 UTC (permalink / raw)
  To: 'Lars Magne Ingebrigtsen'; +Cc: 4433

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






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

* bug#4433: 23.1; dolist vs dolist
  2011-07-14 21:26   ` Drew Adams
@ 2011-08-02 18:49     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-08-02 18:49 UTC (permalink / raw)
  To: Drew Adams; +Cc: 4433

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/





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

end of thread, other threads:[~2011-08-02 18:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-14 19:16 bug#4433: 23.1; dolist vs dolist Drew Adams
2011-07-13 12:58 ` Lars Magne Ingebrigtsen
2011-07-14 21:26   ` Drew Adams
2011-08-02 18:49     ` Lars Magne Ingebrigtsen

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