]> git.eshelyaron.com Git - emacs.git/commitdiff
* viper-cmd.el (viper-change-state): Use
authorMichael Kifer <kifer@cs.stonybrook.edu>
Sat, 4 Dec 1999 06:19:05 +0000 (06:19 +0000)
committerMichael Kifer <kifer@cs.stonybrook.edu>
Sat, 4 Dec 1999 06:19:05 +0000 (06:19 +0000)
viper-ESC-moves-cursor-back to decide whether to move the cursor
back.

lisp/ChangeLog
lisp/emulation/viper-cmd.el

index 6c06499a374d6ab165240128089ac689f8ee80b0..daaa7a408d8b018fb7bef9521e0191e841204ab4 100644 (file)
@@ -1,3 +1,9 @@
+1999-12-04  Michael Kifer  <kifer@cs.sunysb.edu>
+
+       * viper-cmd.el (viper-change-state): Use
+       viper-ESC-moves-cursor-back to decide whether to move the cursor
+       back.
+       
 1999-12-03  Kenichi Handa  <handa@mule.m17n.org>
 
        * international/mule-util.el (truncate-string-to-width): Docsting
index 78ed5e5d53ca7e747b6d9f93518ed0556ee0c64d..90f17223ec359726360faea874704ddcb2888e2b 100644 (file)
                 (control n) (control p) (control f) (control b)))
       (viper-restore-cursor-color 'after-replace-mode)))
 
+
+;; Make sure we don't delete more than needed.
+;; This is executed at viper-last-posn-in-replace-region
+(defsubst viper-trim-replace-chars-to-delete-if-necessary ()
+  (setq viper-replace-chars-to-delete
+       (max 0
+            (min viper-replace-chars-to-delete
+                 ;; Don't delete more than to the end of repl overlay
+                 (viper-chars-in-region
+                  (viper-replace-end) viper-last-posn-in-replace-region)
+                 ;; point is viper-last-posn-in-replace-region now
+                 ;; So, this limits deletion to the end of line
+                 (viper-chars-in-region (point) (viper-line-pos 'end))
+                 ))))
+
+
 (defun viper-replace-state-post-command-sentinel ()
   ;; Restoring cursor color is needed despite
   ;; viper-replace-state-pre-command-sentinel: When one jumps to another buffer
                    (viper-push-onto-ring viper-last-insertion
                                          'viper-insertion-ring))
 
-               (if viper-ex-style-editing
+               (if viper-ESC-moves-cursor-back
                    (or (bolp) (backward-char 1))))
               ))
 
@@ -2235,20 +2251,6 @@ problems."
 
       )))
 
-;; Make sure we don't delete more than needed.
-;; This is executed at viper-last-posn-in-replace-region
-(defsubst viper-trim-replace-chars-to-delete-if-necessary ()
-  (setq viper-replace-chars-to-delete
-       (max 0
-            (min viper-replace-chars-to-delete
-                 ;; Don't delete more than to the end of repl overlay
-                 (viper-chars-in-region
-                  (viper-replace-end) viper-last-posn-in-replace-region)
-                 ;; point is viper-last-posn-in-replace-region now
-                 ;; So, this limits deletion to the end of line
-                 (viper-chars-in-region (point) (viper-line-pos 'end))
-                 ))))
-
 
 ;; Delete stuff between viper-last-posn-in-replace-region and the end of
 ;; viper-replace-overlay-marker, if viper-last-posn-in-replace-region is within