Index: /branches/ide-1.0/ccl/hemlock/src/buffer.lisp
===================================================================
--- /branches/ide-1.0/ccl/hemlock/src/buffer.lisp	(revision 6652)
+++ /branches/ide-1.0/ccl/hemlock/src/buffer.lisp	(revision 6653)
@@ -325,4 +325,42 @@
   (buffer-point *current-buffer*))
 
+(defun current-point-for-insertion ()
+  "Check to see if the current buffer can be modified at its
+  current point; error if not.  If there's a selection in the
+  current buffer, delete it.  Return the current point."
+  (let* ((buffer *current-buffer*)
+         (point (buffer-point buffer)))
+    (check-buffer-modification buffer point)
+    (let* ((region (%buffer-current-region buffer)))
+      (when region
+        (delete-region region))
+      point)))
+
+(defun current-point-for-deletion ()
+  "Check to see if the current buffer can be modified at its
+  current point; error if not.  If there's a selection in the
+  current buffer, delete it and return NIL, else return the
+  current point."
+  (let* ((buffer *current-buffer*)
+         (point (buffer-point buffer)))
+    (check-buffer-modification buffer point)
+    (let* ((region (%buffer-current-region buffer)))
+      (if region
+        (progn
+          (delete-region region)
+          nil)
+        point))))
+
+(defun current-point-unless-selection ()
+  "Check to see if the current buffer can be modified at its
+  current point; error if not.  If there's a selection in the
+  current buffer, return NIL, else return the  current point."
+  (let* ((buffer *current-buffer*)
+         (point (buffer-point buffer)))
+    (check-buffer-modification buffer point)
+    (let* ((region (%buffer-current-region buffer)))
+      (unless region
+        point))))
+
 ;;; %SET-CURRENT-BUFFER  --  Internal
 ;;;
