[climacs-devel] overwrite mode
Robert Strandh
strandh at labri.fr
Sun Jan 9 15:46:44 UTC 2005
Aleksandar Bakic writes:
> > I would put it in base.lisp and make it a combination of (setf
> > buffer-object) and forward-mark.
>
> I suppose you meant that the point should be moved one place to the right. How
> would (setf buffer-object) relate to undo, for example?
I don't know. I guess a compound undo record could be used. The
reason I am suggesting a combination of (setf buffer-object) and
forward-mark, is that it is potentially more efficient.
On the other hand, the real question is about semantics. If you have
the text:
abcdef
with the point between the c and the d, and a right-sticky mark at the
same place, then using a combination between delete and insert to
overwrite the d will put the mark between the d and the e, whereas
using a combination of (setf buffer-object) and forward-mark will
leave it between the c and the d. The analogous thing happens to a
left-sticky mark initially between the d and the e.
> (Have you intentionally
> omitted this from the buffer protocol for some reason?)
This? Overwrite? No, I just don't ever use it myself.
> Should there also be a
> primitive for overwriting a sequence? I don't think I ever used something like
> that, though, but one might want to yank a sequence in the overwrite mode.
Sure, someone that uses overwrite mode might want to do that.
--
Robert Strandh
---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
More information about the climacs-devel
mailing list