Fix bug in paredit forward character deletion at the beginning of the
authorTaylor R. Campbell <net/mumble/campbell>
Thu, 28 Dec 2006 22:28:20 +0000 (22:28 +0000)
committerTaylor R. Campbell <net/mumble/campbell>
Thu, 28 Dec 2006 22:28:20 +0000 (22:28 +0000)
buffer: formerly it would cause a hardware trap, because it would ask
for the non-existent character before the point, without checking
whether there is in fact a valid character position in the buffer
there.

v7/src/edwin/paredit.scm

index 5819009a8135bee64cd4490917c588cee99af182..91b4379b265592e02d6522602f0e7384bb4c3429 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: paredit.scm,v 1.7 2006/07/03 19:41:23 riastradh Exp $
+$Id: paredit.scm,v 1.8 2006/12/28 22:28:20 riastradh Exp $
 
 This code is written by Taylor R. Campbell and placed in the Public
 Domain.  All warranties are disclaimed.
@@ -293,7 +293,8 @@ With a prefix argument, simply delete a character forward, without
                          (char=? syn #\" )))
                    ;; Enter into an S-expression forward.
                    (set-current-point! (mark1+ point)))
-                  ((and (not (mark-right-char-quoted?
+                  ((and (not (group-start? point))
+                       (not (mark-right-char-quoted?
                               (mark-1+ point)))
                         (char=? (char-syntax right)
                                 #\) )