comparison lisp/emulation/viper-cmd.el @ 81331:c3779fe5830e

2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu> * viper-cmd.el (viper-prefix-arg-com,viper-prefix-arg-value): display error messages (viper-prev-destructive-command,viper-insert-prev-from-insertion-ring): get rid of cl.el dependencies. * viper-init.el (viper-suppress-input-method-change-message): new variable. (viper-activate-input-method-action,viper-inactivate-input-method-action): use viper-suppress-input-method-change-message. * viper-kem.el (viper-vi-basic-map): disable the bindings for C-s, C-r. * viper-util.el (viper-set-cursor-color-according-to-state): use viper-replace-overlay-cursor-color instead of viper-replace-overlay-cursor-color. (viper-sit-for-short): use sit-for with 3 arguments. * viper.el (viper-insert-state-mode-list): add gud-mode. (viper-major-mode-modifier-list): add viper-comint-mode-modifier-map to gud-mode. * ediff-mult.el (ediff-meta-buffer-brief-message,ediff-meta-buffer-verbose-message): new variables. (ediff-meta-buffer-message): variable deleted. (ediff-verbose-help-enabled): new variable. (ediff-toggle-verbose-help-meta-buffer): new function. (ediff-redraw-directory-group-buffer): made aware of short/verbose message options * ediff-ptch.el (ediff-context-diff-label-regexp): better regexp. (ediff-fixup-patch-map): improved heuristic.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Tue, 12 Jun 2007 19:20:25 +0000
parents 7a3f13e2dd57
children b98604865ea0 3619e7770f2e
comparison
equal deleted inserted replaced
81330:f7754bd2e73f 81331:c3779fe5830e
104 ;; Commands that are pairs eg. dd. r and R here are a hack 104 ;; Commands that are pairs eg. dd. r and R here are a hack
105 (defconst viper-charpair-commands '(?c ?d ?y ?! ?= ?< ?> ?r ?R)) 105 (defconst viper-charpair-commands '(?c ?d ?y ?! ?= ?< ?> ?r ?R))
106 ;; define viper-charpair-command-p 106 ;; define viper-charpair-command-p
107 (viper-test-com-defun viper-charpair-command) 107 (viper-test-com-defun viper-charpair-command)
108 108
109 (defconst viper-movement-commands '(?b ?B ?e ?E ?f ?F ?G ?h ?H ?j ?k ?l 109 (defconst viper-movement-commands '(?b ?B ?e ?E ?f ?F ?G ?h ?j ?k ?l
110 ?H ?M ?L ?n ?t ?T ?w ?W ?$ ?% 110 ?H ?M ?L ?n ?t ?T ?w ?W ?$ ?%
111 ?^ ?( ?) ?- ?+ ?| ?{ ?} ?[ ?] ?' ?` 111 ?^ ?( ?) ?- ?+ ?| ?{ ?} ?[ ?] ?' ?`
112 ?\; ?, ?0 ?? ?/ ?\ ?\C-m 112 ?\; ?, ?0 ?? ?/ ?\ ?\C-m
113 space return 113 space return
114 delete backspace 114 delete backspace
1319 (progn 1319 (progn
1320 (setq last-command-char char) 1320 (setq last-command-char char)
1321 (setq last-command-event 1321 (setq last-command-event
1322 (viper-copy-event 1322 (viper-copy-event
1323 (if viper-xemacs-p (character-to-event char) char))) 1323 (if viper-xemacs-p (character-to-event char) char)))
1324 (condition-case nil 1324 (condition-case err
1325 (funcall cmd-to-exec-at-end cmd-info) 1325 (funcall cmd-to-exec-at-end cmd-info)
1326 (error 1326 (error
1327 (error ""))))) 1327 (error "%s" (error-message-string err))))))
1328 )) 1328 ))
1329 1329
1330 (defun viper-describe-arg (arg) 1330 (defun viper-describe-arg (arg)
1331 (let (val com) 1331 (let (val com)
1332 (setq val (viper-P-val arg) 1332 (setq val (viper-P-val arg)
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-list viper-command-ring))) 1905 (setq viper-temp-command-ring (copy-sequence 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-list viper-insertion-ring))) 1939 (setq viper-temp-insertion-ring (copy-sequence 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)))