From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jari Aalto Newsgroups: gmane.emacs.bugs 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 Organization: Private Message-ID: <877hga5lz4.fsf_-_@picasso.cante.net> References: <1213200935.4147.62.camel@cyberelk.elk> <87pqu59d16.fsf@picasso.cante.net> <87mxp8kth3.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1290118479 22103 80.91.229.12 (18 Nov 2010 22:14:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 18 Nov 2010 22:14:39 +0000 (UTC) Cc: 7408@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 18 23:14:35 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PJCkU-00051D-LG for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Nov 2010 23:14:34 +0100 Original-Received: from localhost ([127.0.0.1]:60359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJCkT-0006H1-SP for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Nov 2010 17:14:33 -0500 Original-Received: from [140.186.70.92] (port=42726 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJCkK-0006Et-8x for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2010 17:14:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJCkF-0001IO-O4 for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2010 17:14:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJCkF-0001IH-L9 for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2010 17:14:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PJCUT-0007NK-LE; Thu, 18 Nov 2010 16:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jari Aalto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Nov 2010 21:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7408 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7408-submit@debbugs.gnu.org id=B7408.129011746228343 (code B ref 7408); Thu, 18 Nov 2010 21:58:01 +0000 Original-Received: (at 7408) by debbugs.gnu.org; 18 Nov 2010 21:57:42 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PJCU9-0007N6-62 for submit@debbugs.gnu.org; Thu, 18 Nov 2010 16:57:41 -0500 Original-Received: from emh06.mail.saunalahti.fi ([62.142.5.116]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PJCU6-0007Mz-K6 for 7408@debbugs.gnu.org; Thu, 18 Nov 2010 16:57:40 -0500 Original-Received: from saunalahti-vams (vs3-12.mail.saunalahti.fi [62.142.5.96]) by emh06-2.mail.saunalahti.fi (Postfix) with SMTP id 390B4C80CA; Fri, 19 Nov 2010 00:02:43 +0200 (EET) Original-Received: from emh07.mail.saunalahti.fi ([62.142.5.117]) by vs3-12.mail.saunalahti.fi ([62.142.5.96]) with SMTP (gateway) id A002552A6FA; Fri, 19 Nov 2010 00:02:43 +0200 Original-Received: from picasso.cante.net (a91-155-187-216.elisa-laajakaista.fi [91.155.187.216]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id C71D11C6384; Fri, 19 Nov 2010 00:02:39 +0200 (EET) In-Reply-To: (Stefan Monnier's message of "Wed, 17 Nov 2010 08:39:37 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) X-Antivirus: VAMS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 18 Nov 2010 16:58:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41740 Archived-At: 2010-11-17 15:39 Stefan Monnier : >> 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 : >> 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)