From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: request for a new function, say, `sequence' Date: Tue, 25 Mar 2003 10:25:18 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303250125.KAA06703@etlken.m17n.org> References: <200303230302.MAA04327@etlken.m17n.org> <200303241541.h2OFfbpa011227@rum.cs.yale.edu> <200303250015.JAA06592@etlken.m17n.org> <200303250050.JAA06631@etlken.m17n.org> <200303250057.h2P0vBj6016367@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1048555740 19457 80.91.224.249 (25 Mar 2003 01:29:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2003 01:29:00 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 25 02:28:57 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18xdFI-00053V-00 for ; Tue, 25 Mar 2003 02:28:56 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18xdG2-00070y-00 for ; Tue, 25 Mar 2003 02:29:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xdDy-0007Sw-06 for emacs-devel@quimby.gnus.org; Mon, 24 Mar 2003 20:27:34 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18xdCG-0006p6-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 20:25:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18xdCF-0006nW-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 20:25:47 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xdBs-0006Ns-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 20:25:24 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h2P1PJ918322; Tue, 25 Mar 2003 10:25:19 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h2P1PJA18591; Tue, 25 Mar 2003 10:25:19 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA06703; Tue, 25 Mar 2003 10:25:18 +0900 (JST) Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-reply-to: <200303250057.h2P0vBj6016367@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12590 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12590 In article <200303250057.h2P0vBj6016367@rum.cs.yale.edu>, "Stefan Monnier" writes: >> (dolist (c (sequence #X #Y 'list)) >> ..operate-on-C) > I agree that such code is pretty common, but I'd rather extend dotimes > to allow something like (dotimes (c (cons X Y)) BODY). I'm not sure it is a good idea to extend dotimes and make it different from Commong Lisp. And, using `sequence' is more flexible, for instance, in the following case. ;; Combining diacritics (setq c #x300) (while (<= c #x362) (modify-category-entry (decode-char 'ucs c) ?^) (setq c (1+ c))) ;; Combining marks (setq c #x20d0) (while (<= c #x20e3) (modify-category-entry (decode-char 'ucs c) ?^) (setq c (1+ c))) can be: (dolist (c (append (sequence #x0300 #x0362 'list) (sequence #x20d0 #x20e3 'list))) (modify-category-entry (decode-char 'ucs c) ?^) Of course, in this specific case, allowing FROM and TO in modify-category-entry is better. --- Ken'ichi HANDA handa@m17n.org