comparison lisp/emulation/viper-cmd.el @ 85890:d505125b0b46

2007-11-02 Michael Kifer <kifer@cs.stonybrook.edu> * viper-ex.el (viper-ex): do not ignore the region. * viper-cmd.el (viper-prev-destructive-command) (viper-insert-prev-from-insertion-ring): use ring-copy instead of copy-sequence. * ediff-util.el (ediff-make-current-diff-overlay): do not use face-name. Got rid of ediff-copy-list. * ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer): do not use face-name. (ediff-test-utility,ediff-diff-mandatory-option) (ediff-reset-diff-options): removed to simplify yhe mandatory option handling on windows. (ediff-set-diff-options): added. (ediff-diff-options): changed. * ediff-vers.el (ediff-vc-internal): use ediff-vc-revision-other-window. (ediff-vc-merge-internal): use ediff-vc-revision-other-window and ediff-vc-working-revision. Require vc-hooks.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Fri, 02 Nov 2007 06:03:12 +0000
parents ff85cbd27ee2
children 51aa47312c4b
comparison
equal deleted inserted replaced
85889:683a6a9e56ab 85890:d505125b0b46
1900 (if (eq last-command 'viper-display-current-destructive-command) 1900 (if (eq last-command 'viper-display-current-destructive-command)
1901 ;; repeated search through command history 1901 ;; repeated search through command history
1902 (setq viper-intermediate-command 1902 (setq viper-intermediate-command
1903 'repeating-display-destructive-command) 1903 'repeating-display-destructive-command)
1904 ;; first search through command history--set temp ring 1904 ;; first search through command history--set temp ring
1905 (setq viper-temp-command-ring (copy-sequence viper-command-ring))) 1905 (setq viper-temp-command-ring (ring-copy viper-command-ring)))
1906 (setq cmd (if next 1906 (setq cmd (if next
1907 (viper-special-ring-rotate1 viper-temp-command-ring 1) 1907 (viper-special-ring-rotate1 viper-temp-command-ring 1)
1908 (viper-special-ring-rotate1 viper-temp-command-ring -1))) 1908 (viper-special-ring-rotate1 viper-temp-command-ring -1)))
1909 (if (null cmd) 1909 (if (null cmd)
1910 () 1910 ()
1934 (if viper-last-inserted-string-from-insertion-ring 1934 (if viper-last-inserted-string-from-insertion-ring
1935 (backward-delete-char 1935 (backward-delete-char
1936 (length viper-last-inserted-string-from-insertion-ring)))) 1936 (length viper-last-inserted-string-from-insertion-ring))))
1937 ) 1937 )
1938 ;;first search through insertion history 1938 ;;first search through insertion history
1939 (setq viper-temp-insertion-ring (copy-sequence viper-insertion-ring))) 1939 (setq viper-temp-insertion-ring (ring-copy viper-insertion-ring)))
1940 (setq this-command 'viper-insert-from-insertion-ring) 1940 (setq this-command 'viper-insert-from-insertion-ring)
1941 ;; so that things will be undone properly 1941 ;; so that things will be undone properly
1942 (setq buffer-undo-list (cons nil buffer-undo-list)) 1942 (setq buffer-undo-list (cons nil buffer-undo-list))
1943 (setq viper-last-inserted-string-from-insertion-ring 1943 (setq viper-last-inserted-string-from-insertion-ring
1944 (viper-special-ring-rotate1 viper-temp-insertion-ring (if arg 1 -1))) 1944 (viper-special-ring-rotate1 viper-temp-insertion-ring (if arg 1 -1)))
2788 (viper-chars-in-region pt (point)) 2788 (viper-chars-in-region pt (point))
2789 (- (viper-chars-in-region pt (point)))))) 2789 (- (viper-chars-in-region pt (point))))))
2790 2790
2791 (defun viper-next-line-carefully (arg) 2791 (defun viper-next-line-carefully (arg)
2792 (condition-case nil 2792 (condition-case nil
2793 ;; do not use forward-line! need to keep column
2793 (next-line arg) 2794 (next-line arg)
2794 (error nil))) 2795 (error nil)))
2795 2796
2796 2797
2797 2798
3087 (interactive "P") 3088 (interactive "P")
3088 (viper-leave-region-active) 3089 (viper-leave-region-active)
3089 (let ((val (viper-p-val arg)) 3090 (let ((val (viper-p-val arg))
3090 (com (viper-getCom arg))) 3091 (com (viper-getCom arg)))
3091 (if com (viper-move-marker-locally 'viper-com-point (point))) 3092 (if com (viper-move-marker-locally 'viper-com-point (point)))
3093 ;; do not use forward-line! need to keep column
3092 (next-line val) 3094 (next-line val)
3093 (if viper-ex-style-motion 3095 (if viper-ex-style-motion
3094 (if (and (eolp) (not (bolp))) (backward-char 1))) 3096 (if (and (eolp) (not (bolp))) (backward-char 1)))
3095 (setq this-command 'next-line) 3097 (setq this-command 'next-line)
3096 (if com (viper-execute-com 'viper-next-line val com)))) 3098 (if com (viper-execute-com 'viper-next-line val com))))
3130 (interactive "P") 3132 (interactive "P")
3131 (viper-leave-region-active) 3133 (viper-leave-region-active)
3132 (let ((val (viper-p-val arg)) 3134 (let ((val (viper-p-val arg))
3133 (com (viper-getCom arg))) 3135 (com (viper-getCom arg)))
3134 (if com (viper-move-marker-locally 'viper-com-point (point))) 3136 (if com (viper-move-marker-locally 'viper-com-point (point)))
3137 ;; do not use forward-line! need to keep column
3135 (previous-line val) 3138 (previous-line val)
3136 (if viper-ex-style-motion 3139 (if viper-ex-style-motion
3137 (if (and (eolp) (not (bolp))) (backward-char 1))) 3140 (if (and (eolp) (not (bolp))) (backward-char 1)))
3138 (setq this-command 'previous-line) 3141 (setq this-command 'previous-line)
3139 (if com (viper-execute-com 'viper-previous-line val com)))) 3142 (if com (viper-execute-com 'viper-previous-line val com))))