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: Mon, 31 Jan 2005 14:02:03 +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 1107176668 22138 80.91.229.6 (31 Jan 2005 13:04:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2005 13:04:28 +0000 (UTC) Cc: snogglethorpe@gmail.com, emacs-devel@gnu.org, Stefan Monnier , miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 14:04:14 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 1CvbDy-0004SZ-00 for ; Mon, 31 Jan 2005 14:04:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvbQg-0001H3-D0 for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2005 08:17:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvbPT-0000jB-JB for emacs-devel@gnu.org; Mon, 31 Jan 2005 08:16:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvbPQ-0000gL-05 for emacs-devel@gnu.org; Mon, 31 Jan 2005 08:16:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvbPP-0000fw-KH for emacs-devel@gnu.org; Mon, 31 Jan 2005 08:16:03 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1CvbBw-0001Fl-3q for emacs-devel@gnu.org; Mon, 31 Jan 2005 08:02:08 -0500 Original-Received: (qmail 71772 invoked from network); 31 Jan 2005 13:02:05 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 31 Jan 2005 13:02:05 -0000 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 31 Jan 2005 07:01:39 -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:32666 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32666 Richard Stallman writes: > 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. > > That would be a nuisance; you would be unable to use existing functions > for this purpose. > > By the way, note that we would have to change SES to handle the new > format, if we change the format. We have two othogonal issues: a) the format of the undo entry Here I guess we can agree on (apply DELTA BEG END FUN . ARGS) And that FUN is called with ARGS only (if necessary, the BEG END etc. can be included explicitly in ARGS). b) the undo-in-region support I don't know, but in the case of ses, it may not make sense to have undo in a region, and consequently may be quite hard to put something sensible into DELTA, BEG and END. For this purpose, I suppose that we have an alternate, short format that omits the undo-in-region information: (apply FUN . ARGS) For undo-in-region, this simply says that undo-in-region is not supported beyond this element in the undo list. It is trivial to distinguish the two formats - if second element is an integer, it is the long format, otherwise it is the short format. That makes it trivial to change ses.el. -- Kim F. Storm http://www.cua.dk