Call UNDO-RECORD-POINT! before modifications in `paredit-splice-sexp'
authorTaylor R. Campbell <net/mumble/campbell>
Tue, 27 Jun 2006 18:43:59 +0000 (18:43 +0000)
committerTaylor R. Campbell <net/mumble/campbell>
Tue, 27 Jun 2006 18:43:59 +0000 (18:43 +0000)
and `paredit-split-sexp' commands, so that their undoing works as
expected.

v7/src/edwin/paredit.scm

index 3ae7e74e25bb8a050a13ed59916b4c13a22f92aa..da9c1b9d3267f34e2003fbb3a613ebc47bf0b157 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: paredit.scm,v 1.4 2006/06/27 18:39:45 riastradh Exp $
+$Id: paredit.scm,v 1.5 2006/06/27 18:43:59 riastradh Exp $
 
 This code is written by Taylor R. Campbell and placed in the Public
 Domain.  All warranties are disclaimed.
@@ -582,6 +582,7 @@ With a numerical prefix argument N, kill N S-expressions backward in
   enclosing list.  If N is negative, kill forward."
   "P"
   (lambda (argument)
+    (undo-record-point!)
     (if argument (paredit-kill-surrounding-sexps-for-splice argument))
     (let* ((before-open (backward-up-list (current-point) 1 'ERROR))
            (before-close
@@ -668,6 +669,7 @@ With a numerical prefix argument N, kill N S-expressions backward in
              (paredit-save-excursion (lambda ()
                                        (insert-char #\space))))
             (else
+             (undo-record-point!)
              (split-sexp-at-point))))))
 
 (define (split-sexp-at-point)