aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/cua-base.el24
-rw-r--r--lisp/emulation/cua-gmrk.el9
-rw-r--r--lisp/emulation/cua-rect.el2
-rw-r--r--lisp/emulation/pc-select.el6
-rw-r--r--lisp/emulation/vi.el2
-rw-r--r--lisp/emulation/vip.el2
-rw-r--r--lisp/emulation/viper-cmd.el6
-rw-r--r--lisp/emulation/viper-init.el42
-rw-r--r--lisp/emulation/viper-keym.el19
-rw-r--r--lisp/emulation/viper.el7
10 files changed, 67 insertions, 52 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 6ea6bfb7f3d..c6d479b173f 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -384,13 +384,13 @@ and after the region marked by the rectangle to search."
384 :type 'boolean 384 :type 'boolean
385 :group 'cua) 385 :group 'cua)
386 386
387(defface cua-rectangle-face 387(defface cua-rectangle
388 '((default :inherit region) 388 '((default :inherit region)
389 (((class color)) :foreground "white" :background "maroon")) 389 (((class color)) :foreground "white" :background "maroon"))
390 "*Font used by CUA for highlighting the rectangle." 390 "*Font used by CUA for highlighting the rectangle."
391 :group 'cua) 391 :group 'cua)
392 392
393(defface cua-rectangle-noselect-face 393(defface cua-rectangle-noselect
394 '((default :inherit region) 394 '((default :inherit region)
395 (((class color)) :foreground "white" :background "dimgray")) 395 (((class color)) :foreground "white" :background "dimgray"))
396 "*Font used by CUA for highlighting the non-selected rectangle lines." 396 "*Font used by CUA for highlighting the non-selected rectangle lines."
@@ -404,7 +404,7 @@ and after the region marked by the rectangle to search."
404 :type 'boolean 404 :type 'boolean
405 :group 'cua) 405 :group 'cua)
406 406
407(defface cua-global-mark-face 407(defface cua-global-mark
408 '((((min-colors 88)(class color)) :foreground "black" :background "yellow1") 408 '((((min-colors 88)(class color)) :foreground "black" :background "yellow1")
409 (((class color)) :foreground "black" :background "yellow") 409 (((class color)) :foreground "black" :background "yellow")
410 (t :bold t)) 410 (t :bold t))
@@ -447,13 +447,13 @@ a cons (TYPE . COLOR), then both properties are affected."
447 (choice :tag "Type" 447 (choice :tag "Type"
448 (const :tag "Filled box" box) 448 (const :tag "Filled box" box)
449 (const :tag "Vertical bar" bar) 449 (const :tag "Vertical bar" bar)
450 (const :tag "Horisontal bar" hbar) 450 (const :tag "Horizontal bar" hbar)
451 (const :tag "Hollow box" hollow)) 451 (const :tag "Hollow box" hollow))
452 (cons :tag "Color and Type" 452 (cons :tag "Color and Type"
453 (choice :tag "Type" 453 (choice :tag "Type"
454 (const :tag "Filled box" box) 454 (const :tag "Filled box" box)
455 (const :tag "Vertical bar" bar) 455 (const :tag "Vertical bar" bar)
456 (const :tag "Horisontal bar" hbar) 456 (const :tag "Horizontal bar" hbar)
457 (const :tag "Hollow box" hollow)) 457 (const :tag "Hollow box" hollow))
458 (color :tag "Color"))) 458 (color :tag "Color")))
459 :group 'cua) 459 :group 'cua)
@@ -471,13 +471,13 @@ a cons (TYPE . COLOR), then both properties are affected."
471 (choice :tag "Type" 471 (choice :tag "Type"
472 (const :tag "Filled box" box) 472 (const :tag "Filled box" box)
473 (const :tag "Vertical bar" bar) 473 (const :tag "Vertical bar" bar)
474 (const :tag "Horisontal bar" hbar) 474 (const :tag "Horizontal bar" hbar)
475 (const :tag "Hollow box" hollow)) 475 (const :tag "Hollow box" hollow))
476 (cons :tag "Color and Type" 476 (cons :tag "Color and Type"
477 (choice :tag "Type" 477 (choice :tag "Type"
478 (const :tag "Filled box" box) 478 (const :tag "Filled box" box)
479 (const :tag "Vertical bar" bar) 479 (const :tag "Vertical bar" bar)
480 (const :tag "Horisontal bar" hbar) 480 (const :tag "Horizontal bar" hbar)
481 (const :tag "Hollow box" hollow)) 481 (const :tag "Hollow box" hollow))
482 (color :tag "Color"))) 482 (color :tag "Color")))
483 :group 'cua) 483 :group 'cua)
@@ -495,13 +495,13 @@ a cons (TYPE . COLOR), then both properties are affected."
495 (choice :tag "Type" 495 (choice :tag "Type"
496 (const :tag "Filled box" box) 496 (const :tag "Filled box" box)
497 (const :tag "Vertical bar" bar) 497 (const :tag "Vertical bar" bar)
498 (const :tag "Horisontal bar" hbar) 498 (const :tag "Horizontal bar" hbar)
499 (const :tag "Hollow box" hollow)) 499 (const :tag "Hollow box" hollow))
500 (cons :tag "Color and Type" 500 (cons :tag "Color and Type"
501 (choice :tag "Type" 501 (choice :tag "Type"
502 (const :tag "Filled box" box) 502 (const :tag "Filled box" box)
503 (const :tag "Vertical bar" bar) 503 (const :tag "Vertical bar" bar)
504 (const :tag "Horisontal bar" hbar) 504 (const :tag "Horizontal bar" hbar)
505 (const :tag "Hollow box" hollow)) 505 (const :tag "Hollow box" hollow))
506 (color :tag "Color"))) 506 (color :tag "Color")))
507 :group 'cua) 507 :group 'cua)
@@ -520,13 +520,13 @@ a cons (TYPE . COLOR), then both properties are affected."
520 (choice :tag "Type" 520 (choice :tag "Type"
521 (const :tag "Filled box" box) 521 (const :tag "Filled box" box)
522 (const :tag "Vertical bar" bar) 522 (const :tag "Vertical bar" bar)
523 (const :tag "Horisontal bar" hbar) 523 (const :tag "Horizontal bar" hbar)
524 (const :tag "Hollow box" hollow)) 524 (const :tag "Hollow box" hollow))
525 (cons :tag "Color and Type" 525 (cons :tag "Color and Type"
526 (choice :tag "Type" 526 (choice :tag "Type"
527 (const :tag "Filled box" box) 527 (const :tag "Filled box" box)
528 (const :tag "Vertical bar" bar) 528 (const :tag "Vertical bar" bar)
529 (const :tag "Horisontal bar" hbar) 529 (const :tag "Horizontal bar" hbar)
530 (const :tag "Hollow box" hollow)) 530 (const :tag "Hollow box" hollow))
531 (color :tag "Color"))) 531 (color :tag "Color")))
532 :group 'cua) 532 :group 'cua)
@@ -1360,7 +1360,7 @@ paste (in addition to the normal emacs bindings)."
1360 1360
1361 (if (not cua-mode) 1361 (if (not cua-mode)
1362 (setq emulation-mode-map-alists (delq 'cua--keymap-alist emulation-mode-map-alists)) 1362 (setq emulation-mode-map-alists (delq 'cua--keymap-alist emulation-mode-map-alists))
1363 (add-to-list 'emulation-mode-map-alists 'cua--keymap-alist) 1363 (add-to-ordered-list 'emulation-mode-map-alists 'cua--keymap-alist 400)
1364 (cua--select-keymaps)) 1364 (cua--select-keymaps))
1365 1365
1366 (cond 1366 (cond
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el
index 8280691ae18..b8874df0f34 100644
--- a/lisp/emulation/cua-gmrk.el
+++ b/lisp/emulation/cua-gmrk.el
@@ -74,7 +74,7 @@
74 (move-overlay cua--global-mark-overlay (point) (1+ (point))) 74 (move-overlay cua--global-mark-overlay (point) (1+ (point)))
75 (setq cua--global-mark-overlay 75 (setq cua--global-mark-overlay
76 (make-overlay (point) (1+ (point)))) 76 (make-overlay (point) (1+ (point))))
77 (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face)) 77 (overlay-put cua--global-mark-overlay 'face 'cua-global-mark))
78 (if (and cua-global-mark-blink-cursor-interval 78 (if (and cua-global-mark-blink-cursor-interval
79 (not cua--orig-blink-cursor-interval)) 79 (not cua--orig-blink-cursor-interval))
80 (setq cua--orig-blink-cursor-interval blink-cursor-interval 80 (setq cua--orig-blink-cursor-interval blink-cursor-interval
@@ -218,7 +218,7 @@ With prefix argument, don't jump to global mark when cancelling it."
218 (let ((olist (overlays-at (marker-position cua--global-mark-marker))) 218 (let ((olist (overlays-at (marker-position cua--global-mark-marker)))
219 in-rect) 219 in-rect)
220 (while olist 220 (while olist
221 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle-face) 221 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle)
222 (setq in-rect t olist nil) 222 (setq in-rect t olist nil)
223 (setq olist (cdr olist)))) 223 (setq olist (cdr olist))))
224 (if in-rect 224 (if in-rect
@@ -358,11 +358,6 @@ With prefix argument, don't jump to global mark when cancelling it."
358;;; Initialization 358;;; Initialization
359 359
360(defun cua--init-global-mark () 360(defun cua--init-global-mark ()
361 (unless (face-background 'cua-global-mark-face)
362 (copy-face 'region 'cua-global-mark-face)
363 (set-face-foreground 'cua-global-mark-face "black")
364 (set-face-background 'cua-global-mark-face "cyan"))
365
366 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark) 361 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark)
367 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark) 362 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark)
368 (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark) 363 (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark)
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 932448079dd..72fd9195850 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -755,7 +755,7 @@ If command is repeated at same position, delete the rectangle."
755 (sit-for 0) ; make window top/bottom reliable 755 (sit-for 0) ; make window top/bottom reliable
756 (cua--rectangle-operation nil t nil nil nil ; do not tabify 756 (cua--rectangle-operation nil t nil nil nil ; do not tabify
757 '(lambda (s e l r v) 757 '(lambda (s e l r v)
758 (let ((rface (if v 'cua-rectangle-face 'cua-rectangle-noselect-face)) 758 (let ((rface (if v 'cua-rectangle 'cua-rectangle-noselect))
759 overlay bs ms as) 759 overlay bs ms as)
760 (when (cua--rectangle-virtual-edges) 760 (when (cua--rectangle-virtual-edges)
761 (let ((lb (line-beginning-position)) 761 (let ((lb (line-beginning-position))
diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el
index 1221fca5199..5231abb588a 100644
--- a/lisp/emulation/pc-select.el
+++ b/lisp/emulation/pc-select.el
@@ -99,7 +99,7 @@ errors are suppressed."
99(defcustom pc-select-selection-keys-only nil 99(defcustom pc-select-selection-keys-only nil
100 "*Non-nil means only bind the basic selection keys when started. 100 "*Non-nil means only bind the basic selection keys when started.
101Other keys that emulate pc-behavior will be untouched. 101Other keys that emulate pc-behavior will be untouched.
102This gives mostly Emacs-like behaviour with only the selection keys enabled." 102This gives mostly Emacs-like behavior with only the selection keys enabled."
103 :type 'boolean 103 :type 'boolean
104 :group 'pc-select) 104 :group 'pc-select)
105 105
@@ -825,7 +825,7 @@ If the value is non-nil, call the function MODE with an argument of
825 825
826;;;###autoload 826;;;###autoload
827(define-minor-mode pc-selection-mode 827(define-minor-mode pc-selection-mode
828 "Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style. 828 "Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style.
829 829
830This mode enables Delete Selection mode and Transient Mark mode. 830This mode enables Delete Selection mode and Transient Mark mode.
831 831
@@ -971,7 +971,7 @@ but before calling PC Selection mode):
971;;;###autoload 971;;;###autoload
972(defcustom pc-selection-mode nil 972(defcustom pc-selection-mode nil
973 "Toggle PC Selection mode. 973 "Toggle PC Selection mode.
974Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, 974Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style,
975and cursor movement commands. 975and cursor movement commands.
976This mode enables Delete Selection mode and Transient Mark mode. 976This mode enables Delete Selection mode and Transient Mark mode.
977Setting this variable directly does not take effect; 977Setting this variable directly does not take effect;
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el
index cd0092e5e87..d6b7c2728b2 100644
--- a/lisp/emulation/vi.el
+++ b/lisp/emulation/vi.el
@@ -520,7 +520,7 @@ set sw=n M-x set-variable vi-shift-width n "
520 "Go into insert state, the text entered will be repeated if REPETITION > 1. 520 "Go into insert state, the text entered will be repeated if REPETITION > 1.
521If PREFIX-CODE is given, do it before insertion begins if DO-IT-NOW-P is T. 521If PREFIX-CODE is given, do it before insertion begins if DO-IT-NOW-P is T.
522In any case, the prefix-code will be done before each 'redo-insert'. 522In any case, the prefix-code will be done before each 'redo-insert'.
523This function expects 'overwrite-mode' being set properly beforehand." 523This function expects `overwrite-mode' being set properly beforehand."
524 (if do-it-now-p (apply (car prefix-code) (cdr prefix-code))) 524 (if do-it-now-p (apply (car prefix-code) (cdr prefix-code)))
525 (setq vi-ins-point (point)) 525 (setq vi-ins-point (point))
526 (setq vi-ins-repetition repetition) 526 (setq vi-ins-repetition repetition)
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index 19f08d54989..dace12d4c8f 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -1342,7 +1342,7 @@ after search."
1342(defun vip-find-char-forward (arg) 1342(defun vip-find-char-forward (arg)
1343 "Find char on the line. If called interactively read the char to find 1343 "Find char on the line. If called interactively read the char to find
1344from the terminal, and if called from vip-repeat, the char last used is 1344from the terminal, and if called from vip-repeat, the char last used is
1345used. This behaviour is controlled by the sign of prefix numeric value." 1345used. This behavior is controlled by the sign of prefix numeric value."
1346 (interactive "P") 1346 (interactive "P")
1347 (let ((val (vip-p-val arg)) (com (vip-getcom arg))) 1347 (let ((val (vip-p-val arg)) (com (vip-getcom arg)))
1348 (if (> val 0) 1348 (if (> val 0)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 4593d84c6fc..3f9a425987e 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -3131,7 +3131,7 @@ On reaching beginning of line, stop and signal error."
3131(defun viper-find-char-forward (arg) 3131(defun viper-find-char-forward (arg)
3132 "Find char on the line. 3132 "Find char on the line.
3133If called interactively read the char to find from the terminal, and if 3133If called interactively read the char to find from the terminal, and if
3134called from viper-repeat, the char last used is used. This behaviour is 3134called from viper-repeat, the char last used is used. This behavior is
3135controlled by the sign of prefix numeric value." 3135controlled by the sign of prefix numeric value."
3136 (interactive "P") 3136 (interactive "P")
3137 (let ((val (viper-p-val arg)) 3137 (let ((val (viper-p-val arg))
@@ -3672,8 +3672,8 @@ If MAJOR-MODE is set, set the macros only in that major mode."
3672 (sit-for 2) 3672 (sit-for 2)
3673 (viper-unrecord-kbd-macro "///" 'vi-state))) 3673 (viper-unrecord-kbd-macro "///" 'vi-state)))
3674 )) 3674 ))
3675 3675
3676 3676
3677(defun viper-set-parsing-style-toggling-macro (unset) 3677(defun viper-set-parsing-style-toggling-macro (unset)
3678 "Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses. 3678 "Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses.
3679This is used in conjunction with the `%' command. 3679This is used in conjunction with the `%' command.
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 4f08f1b6cc1..ab9212cb95f 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -1,6 +1,6 @@
1;;; viper-init.el --- some common definitions for Viper 1;;; viper-init.el --- some common definitions for Viper
2 2
3;; Copyright (C) 1997, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
@@ -850,74 +850,84 @@ Related buffers can be cycled through via :R and :P commands."
850 :group 'viper) 850 :group 'viper)
851 851
852 852
853(defface viper-search-face 853(defface viper-search
854 '((((class color)) (:foreground "Black" :background "khaki")) 854 '((((class color)) (:foreground "Black" :background "khaki"))
855 (t (:underline t :stipple "gray3"))) 855 (t (:underline t :stipple "gray3")))
856 "*Face used to flash out the search pattern." 856 "*Face used to flash out the search pattern."
857 :group 'viper-highlighting) 857 :group 'viper-highlighting)
858;; backward-compatibility alias
859(put 'viper-search-face 'face-alias 'viper-search)
858;; An internal variable. Viper takes the face from here. 860;; An internal variable. Viper takes the face from here.
859(defvar viper-search-face 'viper-search-face 861(defvar viper-search-face 'viper-search
860 "Face used to flash out the search pattern. 862 "Face used to flash out the search pattern.
861DO NOT CHANGE this variable. Instead, use the customization widget 863DO NOT CHANGE this variable. Instead, use the customization widget
862to customize the actual face object `viper-search-face' 864to customize the actual face object `viper-search-face'
863this variable represents.") 865this variable represents.")
864(viper-hide-face 'viper-search-face) 866(viper-hide-face 'viper-search)
865 867
866 868
867(defface viper-replace-overlay-face 869(defface viper-replace-overlay
868 '((((class color)) (:foreground "Black" :background "darkseagreen2")) 870 '((((class color)) (:foreground "Black" :background "darkseagreen2"))
869 (t (:underline t :stipple "gray3"))) 871 (t (:underline t :stipple "gray3")))
870 "*Face for highlighting replace regions on a window display." 872 "*Face for highlighting replace regions on a window display."
871 :group 'viper-highlighting) 873 :group 'viper-highlighting)
874;; backward-compatibility alias
875(put 'viper-replace-overlay-face 'face-alias 'viper-replace-overlay)
872;; An internal variable. Viper takes the face from here. 876;; An internal variable. Viper takes the face from here.
873(defvar viper-replace-overlay-face 'viper-replace-overlay-face 877(defvar viper-replace-overlay-face 'viper-replace-overlay
874 "Face for highlighting replace regions on a window display. 878 "Face for highlighting replace regions on a window display.
875DO NOT CHANGE this variable. Instead, use the customization widget 879DO NOT CHANGE this variable. Instead, use the customization widget
876to customize the actual face object `viper-replace-overlay-face' 880to customize the actual face object `viper-replace-overlay-face'
877this variable represents.") 881this variable represents.")
878(viper-hide-face 'viper-replace-overlay-face) 882(viper-hide-face 'viper-replace-overlay)
879 883
880 884
881(defface viper-minibuffer-emacs-face 885(defface viper-minibuffer-emacs
882 '((((class color)) (:foreground "Black" :background "darkseagreen2")) 886 '((((class color)) (:foreground "Black" :background "darkseagreen2"))
883 (t (:weight bold))) 887 (t (:weight bold)))
884 "Face used in the Minibuffer when it is in Emacs state." 888 "Face used in the Minibuffer when it is in Emacs state."
885 :group 'viper-highlighting) 889 :group 'viper-highlighting)
890;; backward-compatibility alias
891(put 'viper-minibuffer-emacs-face 'face-alias 'viper-minibuffer-emacs)
886;; An internal variable. Viper takes the face from here. 892;; An internal variable. Viper takes the face from here.
887(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face 893(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs
888 "Face used in the Minibuffer when it is in Emacs state. 894 "Face used in the Minibuffer when it is in Emacs state.
889DO NOT CHANGE this variable. Instead, use the customization widget 895DO NOT CHANGE this variable. Instead, use the customization widget
890to customize the actual face object `viper-minibuffer-emacs-face' 896to customize the actual face object `viper-minibuffer-emacs-face'
891this variable represents.") 897this variable represents.")
892(viper-hide-face 'viper-minibuffer-emacs-face) 898(viper-hide-face 'viper-minibuffer-emacs)
893 899
894 900
895(defface viper-minibuffer-insert-face 901(defface viper-minibuffer-insert
896 '((((class color)) (:foreground "Black" :background "pink")) 902 '((((class color)) (:foreground "Black" :background "pink"))
897 (t (:slant italic))) 903 (t (:slant italic)))
898 "Face used in the Minibuffer when it is in Insert state." 904 "Face used in the Minibuffer when it is in Insert state."
899 :group 'viper-highlighting) 905 :group 'viper-highlighting)
906;; backward-compatibility alias
907(put 'viper-minibuffer-insert-face 'face-alias 'viper-minibuffer-insert)
900;; An internal variable. Viper takes the face from here. 908;; An internal variable. Viper takes the face from here.
901(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face 909(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert
902 "Face used in the Minibuffer when it is in Insert state. 910 "Face used in the Minibuffer when it is in Insert state.
903DO NOT CHANGE this variable. Instead, use the customization widget 911DO NOT CHANGE this variable. Instead, use the customization widget
904to customize the actual face object `viper-minibuffer-insert-face' 912to customize the actual face object `viper-minibuffer-insert-face'
905this variable represents.") 913this variable represents.")
906(viper-hide-face 'viper-minibuffer-insert-face) 914(viper-hide-face 'viper-minibuffer-insert)
907 915
908 916
909(defface viper-minibuffer-vi-face 917(defface viper-minibuffer-vi
910 '((((class color)) (:foreground "DarkGreen" :background "grey")) 918 '((((class color)) (:foreground "DarkGreen" :background "grey"))
911 (t (:inverse-video t))) 919 (t (:inverse-video t)))
912 "Face used in the Minibuffer when it is in Vi state." 920 "Face used in the Minibuffer when it is in Vi state."
913 :group 'viper-highlighting) 921 :group 'viper-highlighting)
922;; backward-compatibility alias
923(put 'viper-minibuffer-vi-face 'face-alias 'viper-minibuffer-vi)
914;; An internal variable. Viper takes the face from here. 924;; An internal variable. Viper takes the face from here.
915(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face 925(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi
916 "Face used in the Minibuffer when it is in Vi state. 926 "Face used in the Minibuffer when it is in Vi state.
917DO NOT CHANGE this variable. Instead, use the customization widget 927DO NOT CHANGE this variable. Instead, use the customization widget
918to customize the actual face object `viper-minibuffer-vi-face' 928to customize the actual face object `viper-minibuffer-vi-face'
919this variable represents.") 929this variable represents.")
920(viper-hide-face 'viper-minibuffer-vi-face) 930(viper-hide-face 'viper-minibuffer-vi)
921 931
922;; the current face to be used in the minibuffer 932;; the current face to be used in the minibuffer
923(viper-deflocalvar 933(viper-deflocalvar
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index a74ca05b3df..f14f67d94c8 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -50,16 +50,25 @@
50 50
51;;; Variables 51;;; Variables
52 52
53(defvar viper-toggle-key "\C-z" 53(defcustom viper-toggle-key "\C-z"
54 "The key used to change states from emacs to Vi and back. 54 "The key used to change states from emacs to Vi and back.
55In insert mode, this key also functions as Meta. 55In insert mode, this key also functions as Meta.
56Must be set in .viper file or prior to loading Viper. 56Must be set in .viper file or prior to loading Viper.
57This setting cannot be changed interactively.") 57This setting cannot be changed interactively."
58 :type 'string
59 :group 'viper)
60
61(defcustom viper-quoted-insert-key "\C-v"
62 "The key used to quote special characters when inserting them in Insert state."
63 :type 'string
64 :group 'viper)
58 65
59(defvar viper-ESC-key "\e" 66(defcustom viper-ESC-key "\e"
60 "Key used to ESC. 67 "Key used to ESC.
61Must be set in .viper file or prior to loading Viper. 68Must be set in .viper file or prior to loading Viper.
62This setting cannot be changed interactively.") 69This setting cannot be changed interactively."
70 :type 'string
71 :group 'viper)
63 72
64;;; Emacs keys in other states. 73;;; Emacs keys in other states.
65 74
@@ -242,7 +251,7 @@ viper-insert-basic-map. Not recommended, except for novice users.")
242(define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) 251(define-key viper-insert-basic-map "\C-t" 'viper-forward-indent)
243(define-key viper-insert-basic-map 252(define-key viper-insert-basic-map
244 (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab) 253 (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab)
245(define-key viper-insert-basic-map "\C-v" 'quoted-insert) 254(define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert)
246(define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) 255(define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert)
247(define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert) 256(define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert)
248(define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key) 257(define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index e3582f2165a..3fdbccc2957 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -990,12 +990,13 @@ remains buffer-local."
990 (setq global-mode-string 990 (setq global-mode-string
991 (append '("" viper-mode-string) (cdr global-mode-string)))) 991 (append '("" viper-mode-string) (cdr global-mode-string))))
992 992
993 (defadvice describe-key (before viper-read-keyseq-ad protect activate) 993 (defadvice describe-key (before viper-describe-key-ad protect activate)
994 "Force to read key via `viper-read-key-sequence'." 994 "Force to read key via `viper-read-key-sequence'."
995 (interactive (list (viper-read-key-sequence "Describe key: ")))) 995 (interactive (list (viper-read-key-sequence "Describe key: "))
996 ))
996 997
997 (defadvice describe-key-briefly 998 (defadvice describe-key-briefly
998 (before viper-read-keyseq-ad protect activate) 999 (before viper-describe-key-briefly-ad protect activate)
999 "Force to read key via `viper-read-key-sequence'." 1000 "Force to read key via `viper-read-key-sequence'."
1000 (interactive (list (viper-read-key-sequence "Describe key briefly: ")))) 1001 (interactive (list (viper-read-key-sequence "Describe key briefly: "))))
1001 1002