From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: New undo element (fun . args) Date: Sun, 30 Jan 2005 19:11:21 +0100 Message-ID: References: <87fz0jyn19.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107109236 5516 80.91.229.6 (30 Jan 2005 18:20:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2005 18:20:36 +0000 (UTC) Cc: snogglethorpe@gmail.com, emacs-devel@gnu.org, rms@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 30 19:20:37 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvJgb-00027A-00 for ; Sun, 30 Jan 2005 19:20:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvJpa-0005XE-3u for ged-emacs-devel@m.gmane.org; Sun, 30 Jan 2005 13:29:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvJpF-0005Qa-Sm for emacs-devel@gnu.org; Sun, 30 Jan 2005 13:29:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvJp8-0005Lc-A7 for emacs-devel@gnu.org; Sun, 30 Jan 2005 13:29:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvJp8-0005Ik-8D for emacs-devel@gnu.org; Sun, 30 Jan 2005 13:29:26 -0500 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CvJXf-00077b-8M; Sun, 30 Jan 2005 13:11:23 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 9B5AE47FE01; Sun, 30 Jan 2005 19:11:21 +0100 (CET) Original-To: Stefan Monnier In-Reply-To: <87fz0jyn19.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 30 Jan 2005 10:07:22 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32646 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32646 Stefan Monnier writes: >>> To fix both of these problems, I suggest to change the format to: >>> >>> (apply FUN ARGS BEG . END) > >> How about: > >> (apply FUN BEG END . ARGS) > >> Seems more natural... > > 100% agreement. I even suggest we pass the BEG and END args to FUN. > I.e. basically keep the current setup, except require the first 2 args to be > BEG and END. Elaborating on my previous proposal, I think the format should be (apply FUN INFO . ARGS) where INFO is either nil (if undo-in-region is not supported), or (START END . DELTA) if it is. This makes it easier to handle cases where the extra information is not needed (e.g. for ses.el), specifically FUN needs just one extra arg rather than three, and it is sufficient to specify nil for INFO. -- Kim F. Storm http://www.cua.dk