emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New undo element (fun . args)


From: Kim F. Storm
Subject: Re: New undo element (fun . args)
Date: Sun, 30 Jan 2005 18:22:45 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Stefan Monnier <address@hidden> 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.

I was about to suggest that, but I couldn't quite understand the implications
if BEG and END are modified in the undo-in-region undo list -- but probably
it it the correct thing to do.

However, it occurred to me that we need to record a value for the
undo-delta of this undo entry if we want this to work with
undo-in-region.  So something like:

   (apply FUN BEG END DELTA . ARGS)

seems to be needed.  IIUC, the DELTA is the amount of data insert in
or deleted from the region by this command (i.e. the number of bytes
added to or subtracted from END).  But I'm not into every detail of
the undo-in-region, so someone who understands that code should
comment on this, pls.

Maybe if DELTA is nil, this entry should be ignored during
undo-in-region (whatever the implications of that could be).

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]