Index: /branches/ide-1.0/ccl/hemlock/src/command.lisp
===================================================================
--- /branches/ide-1.0/ccl/hemlock/src/command.lisp	(revision 6656)
+++ /branches/ide-1.0/ccl/hemlock/src/command.lisp	(revision 6657)
@@ -29,17 +29,7 @@
 (dolist (buff *buffer-list*) (hcmd-new-buffer-hook-fun buff))
 
-(defcommand "Exit Hemlock" (p)
-  "Exit hemlock returning to the Lisp top-level read-eval-print loop."
-  "Exit hemlock returning to the Lisp top-level read-eval-print loop."
-  (declare (ignore p))
-  (exit-hemlock))
-
-(defcommand "Pause Hemlock" (p)
-  "Pause the Hemlock/Lisp process returning to the process that invoked the
-   Lisp."
-  "Pause the Hemlock/Lisp process returning to the process that invoked the
-   Lisp."
-  (declare (ignore p))
-  (pause-hemlock))
+
+
+
 
 
@@ -56,7 +46,7 @@
     (if (and p (> p 1))
 	(insert-string
-	 (current-point)
+	 (current-point-for-insertion)
 	 (make-string p :initial-element char))
-	(insert-character (current-point) char))))
+	(insert-character (current-point-for-insertion) char))))
 
 (defcommand "Quoted Insert" (p)
@@ -64,10 +54,10 @@
   With prefix argument, insert the character that many times."
   "Reads a key-event from *editor-input* and inserts it at the point."
-  (let ((char (hemlock-ext:key-event-char (get-key-event *editor-input* t)))
-	(point (current-point)))
+  (let ((char (hemlock-ext:key-event-char (get-key-event *editor-input* t))))
     (unless char (editor-error "Can't insert that character."))
-    (if (and p (> p 1))
+    (let* ((point (current-point-for-insertion)))
+      (if (and p (> p 1))
 	(insert-string point (make-string p :initial-element char))
-	(insert-character point char))))
+	(insert-character point char)))))
 
 (defcommand "Forward Character" (p)
@@ -118,9 +108,10 @@
   (or left if prefix is negative)."
   "Deletes p characters to the right of the point."
-  (cond ((kill-characters (current-point) (or p 1)))
-	((and p (minusp p))
-	 (editor-error "Not enough previous characters."))
-	(t
-	 (editor-error "Not enough next characters."))))
+  (let* ((point (current-point-for-deletion)))
+    (cond ((kill-characters point (or p 1)))
+          ((and p (minusp p))
+           (editor-error "Not enough previous characters."))
+          (t
+           (editor-error "Not enough next characters.")))))
 
 (defcommand "Delete Previous Character" (p)
@@ -137,16 +128,17 @@
   "Exchanges the characters on either side of the point and moves forward."
   (let ((arg (or p 1))
-	(point (current-point)))
-    (dotimes (i (abs arg))
-      (when (minusp arg) (mark-before point))
-      (let ((prev (previous-character point))
-	    (next (next-character point)))
-
-	(cond ((not prev) (editor-error "No previous character."))
-	      ((not next) (editor-error "No next character."))
-	      (t
-	       (setf (previous-character point) next)
-	       (setf (next-character point) prev))))
-      (when (plusp arg) (mark-after point)))))
+	(point (current-point-unless-selection)))
+    (when point
+      (dotimes (i (abs arg))
+        (when (minusp arg) (mark-before point))
+        (let ((prev (previous-character point))
+              (next (next-character point)))
+
+          (cond ((not prev) (editor-error "No previous character."))
+                ((not next) (editor-error "No next character."))
+                (t
+                 (setf (previous-character point) next)
+                 (setf (next-character point) prev))))
+        (when (plusp arg) (mark-after point))))))
 
 
@@ -363,12 +355,5 @@
 
 
-(defcommand "Track Buffer Point" (p)
-  "Make the current window track the buffer's point.
-   This means that each time Hemlock redisplays, it will make sure the buffer's
-   point is visible in the window.  This is useful for windows into buffer's
-   that receive output from streams coming from other processes."
-  "Make the current window track the buffer's point."
-  (declare (ignore p))
-  (setf (window-display-recentering (current-window)) t))
+
 ;;;
 (defun reset-window-display-recentering (window &optional buffer)
