RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.860
diff -u -r1.860 slime.el
--- slime.el	14 Sep 2007 13:36:23 -0000	1.860
+++ slime.el	15 Sep 2007 02:04:52 -0000
@@ -9053,13 +9053,16 @@
          (slime-region-for-defun-at-point)))
 
 (defun slime-region-for-defun-at-point ()
-  "Return the start and end position of the toplevel form at point."
+  "Return the start and end position of the toplevel form at
+point.  If the end position cannot be determined, nil will be
+used in its place."
   (save-excursion
     (save-match-data
-      (end-of-defun)
-      (let ((end (point)))
-        (beginning-of-defun)
-        (list (point) end)))))
+      (beginning-of-defun)
+      (list (point)
+            (ignore-errors
+              (end-of-defun)
+              (point))))))
 
 (defun slime-beginning-of-symbol ()
   "Move point to the beginning of the current symbol."
