From: Jari Aalto <jari.aalto@cante.net>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 7408@debbugs.gnu.org
Subject: bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return
Date: Fri, 19 Nov 2010 00:02:39 +0200 [thread overview]
Message-ID: <877hga5lz4.fsf_-_@picasso.cante.net> (raw)
In-Reply-To: <jwvwroccbyc.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 17 Nov 2010 08:39:37 -0500")
2010-11-17 15:39 Stefan Monnier <monnier@IRO.UMontreal.CA>:
>> Is the explanation (I'm not familiar with the history) that at the time
>> cl.el was added there was no dolist in core Emacs, so there was no
>> perceived need to call it dolist* as in other similar cases (mapcar*,
>> defun* etc)? (In that case my sincere disdain would go for the person
>> who introduced dolist into subr.el later without addressing the naming
>> clash.)
>
> AFAIK subr.el's dolist and dotimes are 100% compatible with
> CL's definition. Of course, if you want to call `return' in there,
> you'll need to define `return', which is only provided by CL so you need
> to (require 'cl).
>
2010-11-17 15:39 Stefan Monnier <monnier@IRO.UMontreal.CA>:
>> The 'return' has been integral part of 'dolist' since the start.
>
> Who cares?
There happens to be people that care.
> Show me a piece of code which would work with CL's dolist (but without
> CL's return) and yet doesn't work with subr.el's dolist.
As per request:
- "if you want to call `return' in there, you'll need to define `return"
- "dolist and dotimes are 100% compatible with CL's definition."
Jari
$ emacs -Q
(progn
(autoload 'return "cl-macs" nil nil 'macro)
(dolist (elt '(1 2))
(return elt)))
Debugger entered--Lisp error: (no-catch --cl-block-nil-- 1)
cl-block-throw(--cl-block-nil-- 1)
(return-from nil elt)
(return elt)
(while --dolist-tail-- (setq elt (car --dolist-tail--)) (return elt) (setq --dolist-tail-- (cdr --dolist-tail--)))
(let ((--dolist-tail-- ...) elt) (while --dolist-tail-- (setq elt ...) (return elt) (setq --dolist-tail-- ...)))
(dolist (elt (quote ...)) (return elt))
(progn (autoload (quote return) "cl-macs" nil nil (quote macro)) (dolist (elt ...) (return elt)))
eval((progn (autoload (quote return) "cl-macs" nil nil (quote macro)) (dolist (elt ...) (return elt))))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
next prev parent reply other threads:[~2010-11-18 22:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <r6eo4w45.fsf@blue.sea.net>
[not found] ` <1213200935.4147.62.camel@cyberelk.elk>
2010-10-16 13:42 ` bug#7227: re-search-forward goes infinite loop with dash inside [] Jari Aalto
2010-10-16 13:54 ` Andreas Schwab
2010-11-16 21:25 ` bug#7408: Linux patchutils: Development of the project? Jari Aalto
2010-11-16 21:59 ` Lennart Borgman
2010-11-16 22:21 ` Stefan Monnier
2010-11-17 4:47 ` jari
2010-11-17 8:25 ` Glenn Morris
2010-11-17 13:39 ` Stefan Monnier
2010-11-17 12:47 ` Štěpán Němec
2010-11-17 13:39 ` Stefan Monnier
2010-11-18 22:02 ` Jari Aalto [this message]
2010-11-21 5:45 ` bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return Stefan Monnier
2010-11-21 9:08 ` jari
2010-11-21 17:49 ` Eli Zaretskii
2010-11-21 18:51 ` Stefan Monnier
2010-11-17 14:18 ` bug#7408: Linux patchutils: Development of the project? martin rudalics
2010-11-15 10:51 bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return Jari Aalto
2010-11-15 17:22 ` Stefan Monnier
2010-11-15 17:49 ` Lennart Borgman
2010-11-15 19:38 ` Stefan Monnier
[not found] ` <handler.7408.D7408.12898423464754.notifdone@debbugs.gnu.org>
2010-11-15 21:21 ` bug#7408: closed (Re: bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return) jari
2010-11-15 21:57 ` bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return Glenn Morris
-- strict thread matches above, loose matches on Subject: below --
2010-10-16 9:16 bug#7227: re-search-forward goes infinite loop with dash inside [] Jari Aalto
2010-10-16 11:27 ` Andreas Schwab
2010-10-16 11:39 ` Andreas Röhler
2010-10-22 7:55 ` bug#7227: Close bts:gnu Jari Aalto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877hga5lz4.fsf_-_@picasso.cante.net \
--to=jari.aalto@cante.net \
--cc=7408@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.