[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: Taylor R. Campbell
Subject: Re: [MIT-Scheme-devel] forcing left-insertion or right-insertion in Edwin
Date: Thu, 29 Jun 2006 04:39:37 +0000
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+

   Date: Wed, 28 Jun 2006 21:46:39 -0400
   From: Chris Hanson <address@hidden>

   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.

In elisp I often use the idiom of wrapping SAVE-EXCURSION around some
text insertion to put it after the point.  This pattern of making a
right-inserting copy of the point before inserting text occurs all
over Edwin's source, in fact, but there's no abstraction for it.  Even
in the place in GNU Emacs analogous with Edwin's single use of
SAVE-EXCURSION, the elisp code makes right-inserting copies of the
point by using elisp's SAVE-EXCURSION.

   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.

Yes, probably.  (I assume you mean WITH-SAVED-CONFIGURATION here.)
Incidentally, GNU Emacs's SAVE-WINDOW-EXCURSION also makes a right-
inserting copy of the point, just like its SAVE-EXCURSION.

Would you mind if I make the change, substituting what I provisionally
called PAREDIT-SAVE-EXCURSION for SAVE-EXCURSION, and altering window
configurations similarly?

reply via email to

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