[Top][All Lists]

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

Re: [MIT-Scheme-devel] forcing left-insertion or right-insertion in Edwi

From: Chris Hanson
Subject: Re: [MIT-Scheme-devel] forcing left-insertion or right-insertion in Edwin
Date: Wed, 28 Jun 2006 21:46:39 -0400
User-agent: Thunderbird (X11/20060619)

Taylor R. Campbell wrote:
> Is it possible to force left-insertion or right-insertion of
> characters in Edwin, so that any permanent marks at the desired
> position will not be shifted?

It's not possible by going through the standard abstractions.

> Alternatively, is there a better way to
> do this sort of thing?  SAVE-EXCURSION isn't entirely working for me
> -- insertion at marks equivalent to the original point moves the point
> even after SAVE-EXCURSION returns, because SAVE-EXCURSION created a
> permanent copy of the current point, so inserting at that position
> moves it.

Is it obvious that the point should remain to the left of inserted
characters?  I am not sure.  I think it may depend on what is being
done, but I don't have any examples handy.

I believe that point and mark are handled this way because point is
always left-inserting and mark is always right-inserting.  Presumably so
copying point into mark and then inserting stuff causes the inserted
stuff to be in the region.

But you may have noticed that save-excursion was used in exactly one
place prior to the introduction of paredit.  So it hasn't been used in
multiple contexts before.

You should note that save-window-configuration does something similar.
If you decide to change one you might need to change the other to
guarantee consistency.

reply via email to

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