aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Kifer2007-06-12 19:20:25 +0000
committerMichael Kifer2007-06-12 19:20:25 +0000
commitac64a7284e79d99ed5aadbd39d53f14e0f512fc3 (patch)
tree7b2b06478386009b54c9b1a7fece290d34e01507 /lisp
parent95588f91ba16f4f74902cf2a95980770d181f7f9 (diff)
downloademacs-ac64a7284e79d99ed5aadbd39d53f14e0f512fc3.tar.gz
emacs-ac64a7284e79d99ed5aadbd39d53f14e0f512fc3.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog35
-rw-r--r--lisp/diff-mode.el2
-rw-r--r--lisp/ediff-mult.el62
-rw-r--r--lisp/ediff-ptch.el21
-rw-r--r--lisp/emulation/viper-cmd.el10
-rw-r--r--lisp/emulation/viper-init.el15
-rw-r--r--lisp/emulation/viper-keym.el4
-rw-r--r--lisp/emulation/viper-util.el6
-rw-r--r--lisp/emulation/viper.el3
9 files changed, 113 insertions, 45 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 11397368f6d..2bf7ad7cb4c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,38 @@
12007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
2
3 * emulation/viper-cmd.el (viper-prefix-arg-com,viper-prefix-arg-value): display
4 error messages
5 (viper-prev-destructive-command,viper-insert-prev-from-insertion-ring):
6 get rid of cl.el dependencies.
7
8 * emulation/viper-init.el (viper-suppress-input-method-change-message): new
9 variable.
10 (viper-activate-input-method-action,viper-inactivate-input-method-action):
11 use viper-suppress-input-method-change-message.
12
13 * emulation/viper-kem.el (viper-vi-basic-map): disable the bindings for C-s, C-r.
14
15 * emulation/viper-util.el (viper-set-cursor-color-according-to-state): use
16 viper-replace-overlay-cursor-color instead of
17 viper-replace-overlay-cursor-color.
18 (viper-sit-for-short): use sit-for with 3 arguments.
19
20 * emulation/viper.el (viper-insert-state-mode-list): add gud-mode.
21 (viper-major-mode-modifier-list): add viper-comint-mode-modifier-map to
22 gud-mode.
23
24 * ediff-mult.el
25 (ediff-meta-buffer-brief-message,ediff-meta-buffer-verbose-message):
26 new variables.
27 (ediff-meta-buffer-message): variable deleted.
28 (ediff-verbose-help-enabled): new variable.
29 (ediff-toggle-verbose-help-meta-buffer): new function.
30 (ediff-redraw-directory-group-buffer): made aware of short/verbose
31 message options
32
33 * ediff-ptch.el (ediff-context-diff-label-regexp): better regexp.
34 (ediff-fixup-patch-map): improved heuristic.
35
12007-06-12 Stefan Monnier <monnier@iro.umontreal.ca> 362007-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 37
3 * log-view.el (log-view-file-re, log-view-message-re): Use \(?1:...\). 38 * log-view.el (log-view-file-re, log-view-message-re): Use \(?1:...\).
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 87fade841ca..7346de8567a 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -338,7 +338,7 @@ when editing big diffs)."
338 ("^--- .+ ----$" . diff-hunk-header-face) ;context 338 ("^--- .+ ----$" . diff-hunk-header-face) ;context
339 ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal 339 ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal
340 ("^---$" . diff-hunk-header-face) ;normal 340 ("^---$" . diff-hunk-header-face) ;normal
341 ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n" 341 ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\([^\t]+\\)\\(.*[^*-]\\)?\n"
342 (0 diff-header-face) (2 diff-file-header-face prepend)) 342 (0 diff-header-face) (2 diff-file-header-face prepend))
343 ("^\\([-<]\\)\\(.*\n\\)" 343 ("^\\([-<]\\)\\(.*\n\\)"
344 (1 diff-indicator-removed-face) (2 diff-removed-face)) 344 (1 diff-indicator-removed-face) (2 diff-removed-face))
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el
index 8fdd319746c..12dca168412 100644
--- a/lisp/ediff-mult.el
+++ b/lisp/ediff-mult.el
@@ -129,9 +129,15 @@
129;; the registry buffer 129;; the registry buffer
130(defvar ediff-registry-buffer nil) 130(defvar ediff-registry-buffer nil)
131 131
132(defconst ediff-meta-buffer-message "This is an Ediff Session Group Panel: %s 132(defconst ediff-meta-buffer-brief-message "Ediff Session Group Panel: %s
133 133
134Useful commands: 134 Type ? to show useful commands in this buffer
135
136")
137
138(defconst ediff-meta-buffer-verbose-message "Ediff Session Group Panel: %s
139
140Useful commands (type ? to hide them and free up screen):
135 button2, v, or RET over session record: start that Ediff session 141 button2, v, or RET over session record: start that Ediff session
136 M:\tin sessions invoked from here, brings back this group panel 142 M:\tin sessions invoked from here, brings back this group panel
137 R:\tdisplay the registry of active Ediff sessions 143 R:\tdisplay the registry of active Ediff sessions
@@ -360,10 +366,24 @@ buffers."
360 (if (stringp (ediff-get-session-objC-name session-info)) 366 (if (stringp (ediff-get-session-objC-name session-info))
361 (file-directory-p (ediff-get-session-objC-name session-info)) t))) 367 (file-directory-p (ediff-get-session-objC-name session-info)) t)))
362 368
369
370(ediff-defvar-local ediff-verbose-help-enabled nil
371 "If t, display redundant help in ediff-directories and other meta buffers.
372Toggled by ediff-toggle-verbose-help-meta-buffer" )
373
374;; Toggle verbose help in meta-buffers
375;; TODO: Someone who understands all this can make it better.
376(defun ediff-toggle-verbose-help-meta-buffer ()
377 "Toggle showing tediously verbose help in meta buffers."
378 (interactive)
379 (setq ediff-verbose-help-enabled (not ediff-verbose-help-enabled))
380 (ediff-update-meta-buffer (current-buffer) 'must-redraw))
381
363;; set up the keymap in the meta buffer 382;; set up the keymap in the meta buffer
364(defun ediff-setup-meta-map () 383(defun ediff-setup-meta-map ()
365 (setq ediff-meta-buffer-map (make-sparse-keymap)) 384 (setq ediff-meta-buffer-map (make-sparse-keymap))
366 (suppress-keymap ediff-meta-buffer-map) 385 (suppress-keymap ediff-meta-buffer-map)
386 (define-key ediff-meta-buffer-map "?" 'ediff-toggle-verbose-help-meta-buffer)
367 (define-key ediff-meta-buffer-map "q" 'ediff-quit-meta-buffer) 387 (define-key ediff-meta-buffer-map "q" 'ediff-quit-meta-buffer)
368 (define-key ediff-meta-buffer-map "T" 'ediff-toggle-filename-truncation) 388 (define-key ediff-meta-buffer-map "T" 'ediff-toggle-filename-truncation)
369 (define-key ediff-meta-buffer-map "R" 'ediff-show-registry) 389 (define-key ediff-meta-buffer-map "R" 'ediff-show-registry)
@@ -924,27 +944,31 @@ behavior."
924 (mapcar 'delete-overlay (overlays-in 1 1)) ; emacs 944 (mapcar 'delete-overlay (overlays-in 1 1)) ; emacs
925 ) 945 )
926 946
927 (insert (format ediff-meta-buffer-message
928 (ediff-abbrev-jobname ediff-metajob-name)))
929
930 (setq regexp (ediff-get-group-regexp meta-list) 947 (setq regexp (ediff-get-group-regexp meta-list)
931 merge-autostore-dir 948 merge-autostore-dir
932 (ediff-get-group-merge-autostore-dir meta-list)) 949 (ediff-get-group-merge-autostore-dir meta-list))
933 950
934 (cond ((ediff-collect-diffs-metajob) 951 (if ediff-verbose-help-enabled
935 (insert 952 (progn
936 " P:\tcollect custom diffs of all marked sessions\n")) 953 (insert (format ediff-meta-buffer-verbose-message
937 ((ediff-patch-metajob) 954 (ediff-abbrev-jobname ediff-metajob-name)))
938 (insert 955
939 " P:\tshow patch appropriately for the context (session or group)\n"))) 956 (cond ((ediff-collect-diffs-metajob)
940 (insert 957 (insert
941 " ^:\tshow parent session group\n") 958 " P:\tcollect custom diffs of all marked sessions\n"))
942 (or (ediff-one-filegroup-metajob) 959 ((ediff-patch-metajob)
943 (insert 960 (insert
944 " D:\tshow differences among directories\n" 961 " P:\tshow patch appropriately for the context (session or group)\n")))
945 " ==:\tfor each session, show which files are identical\n" 962 (insert
946 " =h:\tlike ==, but also marks those sessions for hiding\n" 963 " ^:\tshow parent session group\n")
947 " =m:\tlike ==, but also marks those sessions for operation\n\n")) 964 (or (ediff-one-filegroup-metajob)
965 (insert
966 " D:\tshow differences among directories\n"
967 " ==:\tfor each session, show which files are identical\n"
968 " =h:\tlike ==, but also marks sessions for hiding\n"
969 " =m:\tlike ==, but also marks sessions for operation\n\n")))
970 (insert (format ediff-meta-buffer-brief-message
971 (ediff-abbrev-jobname ediff-metajob-name))))
948 972
949 (insert "\n") 973 (insert "\n")
950 (if (and (stringp regexp) (> (length regexp) 0)) 974 (if (and (stringp regexp) (> (length regexp) 0))
diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el
index c8a8b70f162..5b345a8d4d6 100644
--- a/lisp/ediff-ptch.el
+++ b/lisp/ediff-ptch.el
@@ -136,10 +136,10 @@ patch. So, don't change these variables, unless the default doesn't work."
136 136
137(defcustom ediff-context-diff-label-regexp 137(defcustom ediff-context-diff-label-regexp
138 (concat "\\(" ; context diff 2-liner 138 (concat "\\(" ; context diff 2-liner
139 "^\\*\\*\\* \\([^ \t]+\\)[^*]+[\t ]*\n--- \\([^ \t]+\\)" 139 "^\\*\\*\\* \\([^\t]+\\)[^*]+[\t ]*\n--- \\([^\t]+\\)"
140 "\\|" ; GNU unified format diff 2-liner 140 "\\|" ; GNU unified format diff 2-liner
141 "^--- \\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ \\([^ \t]+\\)" 141 "^--- \\([^\t]+\\)[\t ]+.*\n\\+\\+\\+ \\([^\t]+\\)"
142 "\\)") 142 "\\)"))
143 "*Regexp matching filename 2-liners at the start of each context diff. 143 "*Regexp matching filename 2-liners at the start of each context diff.
144You probably don't want to change that, unless you are using an obscure patch 144You probably don't want to change that, unless you are using an obscure patch
145program." 145program."
@@ -231,7 +231,7 @@ program."
231 ;; possible-file-names is holding the new file names until we 231 ;; possible-file-names is holding the new file names until we
232 ;; insert the old file name in the patch map 232 ;; insert the old file name in the patch map
233 ;; It is a pair 233 ;; It is a pair
234 ;; (filename-from-1st-header-line . fn from 2nd line) 234 ;; (filename-from-1st-header-line . filename-from-2nd-line)
235 (setq possible-file-names 235 (setq possible-file-names
236 (cons (if (and beg1 end1) 236 (cons (if (and beg1 end1)
237 (buffer-substring beg1 end1) 237 (buffer-substring beg1 end1)
@@ -309,12 +309,13 @@ program."
309 ;; these dirs lead to the actual files starting at the present 309 ;; these dirs lead to the actual files starting at the present
310 ;; directory. So, we don't strip these relative dirs from the 310 ;; directory. So, we don't strip these relative dirs from the
311 ;; file names. This is a heuristic intended to improve guessing 311 ;; file names. This is a heuristic intended to improve guessing
312 (unless (or (file-name-absolute-p base-dir1) 312 (let ((default-directory (file-name-directory filename)))
313 (file-name-absolute-p base-dir2) 313 (unless (or (file-name-absolute-p base-dir1)
314 (not (file-exists-p base-dir1)) 314 (file-name-absolute-p base-dir2)
315 (not (file-exists-p base-dir2))) 315 (not (file-exists-p base-dir1))
316 (setq base-dir1 "" 316 (not (file-exists-p base-dir2)))
317 base-dir2 "")) 317 (setq base-dir1 ""
318 base-dir2 "")))
318 (or (string= (car proposed-file-names) "/dev/null") 319 (or (string= (car proposed-file-names) "/dev/null")
319 (setcar proposed-file-names 320 (setcar proposed-file-names
320 (ediff-file-name-sans-prefix 321 (ediff-file-name-sans-prefix
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 9bd1654020b..f4c0650b1c8 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -106,7 +106,7 @@
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
@@ -1321,10 +1321,10 @@ as a Meta key and any number of multiple escapes is allowed."
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)
@@ -1902,7 +1902,7 @@ With prefix argument, find next destructive command."
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)))
@@ -1936,7 +1936,7 @@ to in the global map, instead of cycling through the insertion ring."
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))
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 86e0e044641..4a1bae82711 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -97,6 +97,13 @@
97 :tag "Is it VMS?" 97 :tag "Is it VMS?"
98 :group 'viper-misc) 98 :group 'viper-misc)
99 99
100(defcustom viper-suppress-input-method-change-message nil
101 "If t, the message notifying about changes in the input method is not displayed.
102Normally, a message is displayed each time on enters the vi, insert or replace
103state."
104 :type 'boolean
105 :group 'viper-misc)
106
100(defcustom viper-force-faces nil 107(defcustom viper-force-faces nil
101 "If t, Viper will think that it is running on a display that supports faces. 108 "If t, Viper will think that it is running on a display that supports faces.
102This is provided as a temporary relief for users of graphics-capable terminals 109This is provided as a temporary relief for users of graphics-capable terminals
@@ -326,7 +333,8 @@ Use `M-x viper-set-expert-level' to change this.")
326 ;; turn off special input methods in vi-state 333 ;; turn off special input methods in vi-state
327 (if (eq viper-current-state 'vi-state) 334 (if (eq viper-current-state 'vi-state)
328 (viper-set-input-method nil)) 335 (viper-set-input-method nil))
329 (if (memq viper-current-state '(vi-state insert-state replace-state)) 336 (if (and (memq viper-current-state '(vi-state insert-state replace-state))
337 (not viper-suppress-input-method-change-message))
330 (message "Viper special input method%s: on" 338 (message "Viper special input method%s: on"
331 (if (or current-input-method default-input-method) 339 (if (or current-input-method default-input-method)
332 (format " %S" 340 (format " %S"
@@ -339,7 +347,8 @@ Use `M-x viper-set-expert-level' to change this.")
339 (if (null viper-mule-hook-flag) 347 (if (null viper-mule-hook-flag)
340 () 348 ()
341 (setq viper-special-input-method nil) 349 (setq viper-special-input-method nil)
342 (if (memq viper-current-state '(vi-state insert-state replace-state)) 350 (if (and (memq viper-current-state '(vi-state insert-state replace-state))
351 (not viper-suppress-input-method-change-message))
343 (message "Viper special input method%s: off" 352 (message "Viper special input method%s: off"
344 (if (or current-input-method default-input-method) 353 (if (or current-input-method default-input-method)
345 (format " %S" 354 (format " %S"
@@ -369,7 +378,7 @@ Use `M-x viper-set-expert-level' to change this.")
369;; Set quail-mode to ARG 378;; Set quail-mode to ARG
370(defun viper-set-input-method (arg) 379(defun viper-set-input-method (arg)
371 (setq viper-mule-hook-flag t) ; just a precaution 380 (setq viper-mule-hook-flag t) ; just a precaution
372 (let (viper-mule-hook-flag) ; temporarily inactivate viper mule hooks 381 (let (viper-mule-hook-flag) ; temporarily deactivate viper mule hooks
373 (cond ((and arg (> (prefix-numeric-value arg) 0) default-input-method) 382 (cond ((and arg (> (prefix-numeric-value arg) 0) default-input-method)
374 ;; activate input method 383 ;; activate input method
375 (viper-activate-input-method)) 384 (viper-activate-input-method))
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index 9dd78ce8aa1..1d158274198 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -339,8 +339,8 @@ If running in a terminal, [(escape)] is not understood, so must use \"\\e\"."
339(define-key viper-vi-basic-map "\C-m" 'viper-next-line-at-bol) 339(define-key viper-vi-basic-map "\C-m" 'viper-next-line-at-bol)
340(define-key viper-vi-basic-map "\C-u" 'viper-scroll-down) 340(define-key viper-vi-basic-map "\C-u" 'viper-scroll-down)
341(define-key viper-vi-basic-map "\C-y" 'viper-scroll-down-one) 341(define-key viper-vi-basic-map "\C-y" 'viper-scroll-down-one)
342(define-key viper-vi-basic-map "\C-s" 'viper-isearch-forward) 342;;(define-key viper-vi-basic-map "\C-s" 'viper-isearch-forward)
343(define-key viper-vi-basic-map "\C-r" 'viper-isearch-backward) 343;;(define-key viper-vi-basic-map "\C-r" 'viper-isearch-backward)
344(define-key viper-vi-basic-map "\C-c/" 'viper-toggle-search-style) 344(define-key viper-vi-basic-map "\C-c/" 'viper-toggle-search-style)
345(define-key viper-vi-basic-map "\C-c\C-g" 'viper-info-on-file) 345(define-key viper-vi-basic-map "\C-c\C-g" 'viper-info-on-file)
346 346
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 0419af5fedf..eef92106de2 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -168,7 +168,7 @@
168 168
169(defun viper-set-cursor-color-according-to-state (&optional frame) 169(defun viper-set-cursor-color-according-to-state (&optional frame)
170 (cond ((eq viper-current-state 'replace-state) 170 (cond ((eq viper-current-state 'replace-state)
171 (viper-change-cursor-color viper-replace-state-cursor-color frame)) 171 (viper-change-cursor-color viper-replace-overlay-cursor-color frame))
172 ((and (eq viper-current-state 'emacs-state) 172 ((and (eq viper-current-state 'emacs-state)
173 viper-emacs-state-cursor-color) 173 viper-emacs-state-cursor-color)
174 (viper-change-cursor-color viper-emacs-state-cursor-color frame)) 174 (viper-change-cursor-color viper-emacs-state-cursor-color frame))
@@ -889,9 +889,7 @@
889;; Sit for VAL milliseconds. XEmacs doesn't support the millisecond arg 889;; Sit for VAL milliseconds. XEmacs doesn't support the millisecond arg
890;; in sit-for, so this function smoothes out the differences. 890;; in sit-for, so this function smoothes out the differences.
891(defsubst viper-sit-for-short (val &optional nodisp) 891(defsubst viper-sit-for-short (val &optional nodisp)
892 (if viper-xemacs-p 892 (sit-for (/ val 1000.0) nodisp))
893 (sit-for (/ val 1000.0) nodisp)
894 (sit-for 0 val nodisp)))
895 893
896;; EVENT may be a single event of a sequence of events 894;; EVENT may be a single event of a sequence of events
897(defsubst viper-ESC-event-p (event) 895(defsubst viper-ESC-event-p (event)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 67ec3660c65..3cc8974248c 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -298,7 +298,6 @@
298;;; Code: 298;;; Code:
299 299
300(require 'advice) 300(require 'advice)
301(require 'cl)
302(require 'ring) 301(require 'ring)
303 302
304;; compiler pacifier 303;; compiler pacifier
@@ -457,6 +456,7 @@ unless it is coming up in a wrong Viper state."
457(defcustom viper-insert-state-mode-list 456(defcustom viper-insert-state-mode-list
458 '(internal-ange-ftp-mode 457 '(internal-ange-ftp-mode
459 comint-mode 458 comint-mode
459 gud-mode
460 inferior-emacs-lisp-mode 460 inferior-emacs-lisp-mode
461 erc-mode 461 erc-mode
462 eshell-mode 462 eshell-mode
@@ -481,6 +481,7 @@ unless it is coming up in a wrong Viper state."
481 '((help-mode emacs-state viper-slash-and-colon-map) 481 '((help-mode emacs-state viper-slash-and-colon-map)
482 (comint-mode insert-state viper-comint-mode-modifier-map) 482 (comint-mode insert-state viper-comint-mode-modifier-map)
483 (comint-mode vi-state viper-comint-mode-modifier-map) 483 (comint-mode vi-state viper-comint-mode-modifier-map)
484 (gud-mode insert-state viper-comint-mode-modifier-map)
484 (shell-mode insert-state viper-comint-mode-modifier-map) 485 (shell-mode insert-state viper-comint-mode-modifier-map)
485 (inferior-emacs-lisp-mode insert-state viper-comint-mode-modifier-map) 486 (inferior-emacs-lisp-mode insert-state viper-comint-mode-modifier-map)
486 (shell-mode vi-state viper-comint-mode-modifier-map) 487 (shell-mode vi-state viper-comint-mode-modifier-map)