aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorMichael Kifer1996-02-16 04:27:19 +0000
committerMichael Kifer1996-02-16 04:27:19 +0000
commit39f002d2de20bcd51bd6b802d8563e9985a33a82 (patch)
tree6bd353ccc661b984c89a11c3c01d4b11a2bf5379 /lisp/emulation
parente79016aa9acf416538fd18cc50a582553030eca2 (diff)
downloademacs-39f002d2de20bcd51bd6b802d8563e9985a33a82.tar.gz
emacs-39f002d2de20bcd51bd6b802d8563e9985a33a82.zip
*** empty log message ***
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/viper.el68
1 files changed, 39 insertions, 29 deletions
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 6209391fed4..34702cc331f 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -6,7 +6,7 @@
6;; Keywords: emulations 6;; Keywords: emulations
7;; Author: Michael Kifer <kifer@cs.sunysb.edu> 7;; Author: Michael Kifer <kifer@cs.sunysb.edu>
8 8
9(defconst viper-version "2.85 of January 24, 1996" 9(defconst viper-version "2.85 of February 14, 1996"
10 "The current version of Viper") 10 "The current version of Viper")
11 11
12;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. 12;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
@@ -467,7 +467,7 @@ it better fits your working style.")
467(vip-deflocalvar vip-replace-overlay nil "") 467(vip-deflocalvar vip-replace-overlay nil "")
468(put 'vip-replace-overlay 'permanent-local t) 468(put 'vip-replace-overlay 'permanent-local t)
469 469
470(if (vip-window-display-p) 470(if (vip-has-face-support-p)
471 (progn 471 (progn
472 (make-face 'vip-replace-overlay-face) 472 (make-face 'vip-replace-overlay-face)
473 (vip-hide-face 'vip-replace-overlay-face) 473 (vip-hide-face 'vip-replace-overlay-face)
@@ -493,7 +493,7 @@ is non-nil.")
493It is used only with TTYs or if `vip-use-replace-region-delimiters' 493It is used only with TTYs or if `vip-use-replace-region-delimiters'
494is non-nil.") 494is non-nil.")
495(defvar vip-use-replace-region-delimiters 495(defvar vip-use-replace-region-delimiters
496 (or (not (vip-window-display-p)) (not (vip-color-display-p))) 496 (or (not (vip-has-face-support-p)) (not (vip-color-display-p)))
497 "*If non-nil, Viper will always use `vip-replace-region-end-delimiter' and 497 "*If non-nil, Viper will always use `vip-replace-region-end-delimiter' and
498`vip-replace-region-start-delimiter' to delimit replacement regions, even on 498`vip-replace-region-start-delimiter' to delimit replacement regions, even on
499color displays. By default, the delimiters are used only on TTYs or 499color displays. By default, the delimiters are used only on TTYs or
@@ -1379,7 +1379,7 @@ This startup message appears whenever you load Viper, unless you type `y' now."
1379 )) 1379 ))
1380 1380
1381 ;; minibuffer faces 1381 ;; minibuffer faces
1382 (if (vip-window-display-p) 1382 (if (vip-has-face-support-p)
1383 (setq vip-minibuffer-current-face 1383 (setq vip-minibuffer-current-face
1384 (cond ((eq state 'emacs-state) vip-minibuffer-emacs-face) 1384 (cond ((eq state 'emacs-state) vip-minibuffer-emacs-face)
1385 ((eq state 'vi-state) vip-minibuffer-vi-face) 1385 ((eq state 'vi-state) vip-minibuffer-vi-face)
@@ -1832,7 +1832,9 @@ behaves as in Emacs, any number of multiple escapes is allowed."
1832 (if (atom com) 1832 (if (atom com)
1833 ;; com is a single char, so we construct prefix-arg 1833 ;; com is a single char, so we construct prefix-arg
1834 ;; and if char is ?, describe prefix arg, otherwise exit by 1834 ;; and if char is ?, describe prefix arg, otherwise exit by
1835 ;; pushing the char back 1835 ;; pushing the char back into vip-set-unread-command-events
1836 ;; Since char is a command, the command will execute with the prefix
1837 ;; argument that we just constructed.
1836 (progn 1838 (progn
1837 (setq prefix-arg (cons value com)) 1839 (setq prefix-arg (cons value com))
1838 (while (= char ?U) 1840 (while (= char ?U)
@@ -2518,27 +2520,26 @@ Undo previous insertion and inserts new."
2518 2520
2519 2521
2520(defun vip-set-search-face () 2522(defun vip-set-search-face ()
2521 (if (not (vip-window-display-p)) 2523 (if (vip-has-face-support-p)
2522 () 2524 (defvar vip-search-face
2523 (defvar vip-search-face 2525 (progn
2524 (progn 2526 (make-face 'vip-search-face)
2525 (make-face 'vip-search-face) 2527 (vip-hide-face 'vip-search-face)
2526 (vip-hide-face 'vip-search-face) 2528 (or (face-differs-from-default-p 'vip-search-face)
2527 (or (face-differs-from-default-p 'vip-search-face) 2529 ;; face wasn't set in .vip or .Xdefaults
2528 ;; face wasn't set in .vip or .Xdefaults 2530 (if (vip-can-use-colors "Black" "khaki")
2529 (if (vip-can-use-colors "Black" "khaki") 2531 (progn
2530 (progn 2532 (set-face-background 'vip-search-face "khaki")
2531 (set-face-background 'vip-search-face "khaki") 2533 (set-face-foreground 'vip-search-face "Black"))
2532 (set-face-foreground 'vip-search-face "Black")) 2534 (copy-face 'italic 'vip-search-face)
2533 (copy-face 'italic 'vip-search-face) 2535 (set-face-underline-p 'vip-search-face t)))
2534 (set-face-underline-p 'vip-search-face t))) 2536 'vip-search-face)
2535 'vip-search-face)
2536 "*Face used to flash out the search pattern.") 2537 "*Face used to flash out the search pattern.")
2537 )) 2538 ))
2538 2539
2539 2540
2540(defun vip-set-minibuffer-faces () 2541(defun vip-set-minibuffer-faces ()
2541 (if (not (vip-window-display-p)) 2542 (if (not (vip-has-face-support-p))
2542 () 2543 ()
2543 (defvar vip-minibuffer-emacs-face 2544 (defvar vip-minibuffer-emacs-face
2544 (progn 2545 (progn
@@ -2554,7 +2555,7 @@ Undo previous insertion and inserts new."
2554 'vip-minibuffer-emacs-face "darkseagreen2") 2555 'vip-minibuffer-emacs-face "darkseagreen2")
2555 (set-face-foreground 2556 (set-face-foreground
2556 'vip-minibuffer-emacs-face "Black")) 2557 'vip-minibuffer-emacs-face "Black"))
2557 (copy-face 'highlight 'vip-minibuffer-emacs-face)) 2558 (copy-face 'modeline 'vip-minibuffer-emacs-face))
2558 ;; emacs state is the main state in the minibuffer 2559 ;; emacs state is the main state in the minibuffer
2559 (if (vip-can-use-colors "Black" "pink") 2560 (if (vip-can-use-colors "Black" "pink")
2560 (progn 2561 (progn
@@ -2585,7 +2586,7 @@ Undo previous insertion and inserts new."
2585 'vip-minibuffer-insert-face "darkseagreen2") 2586 'vip-minibuffer-insert-face "darkseagreen2")
2586 (set-face-foreground 2587 (set-face-foreground
2587 'vip-minibuffer-insert-face "Black")) 2588 'vip-minibuffer-insert-face "Black"))
2588 (copy-face 'highlight 'vip-minibuffer-insert-face)) 2589 (copy-face 'modeline 'vip-minibuffer-insert-face))
2589 (vip-italicize-face 'vip-minibuffer-insert-face))) 2590 (vip-italicize-face 'vip-minibuffer-insert-face)))
2590 'vip-minibuffer-insert-face) 2591 'vip-minibuffer-insert-face)
2591 "Face used in the Minibuffer when it is in Insert state.") 2592 "Face used in the Minibuffer when it is in Insert state.")
@@ -3826,7 +3827,10 @@ controlled by the sign of prefix numeric value."
3826 (com (vip-getCom arg))) 3827 (com (vip-getCom arg)))
3827 (if com (vip-move-marker-locally 'vip-com-point (point))) 3828 (if com (vip-move-marker-locally 'vip-com-point (point)))
3828 (forward-paragraph val) 3829 (forward-paragraph val)
3829 (if com (vip-execute-com 'vip-forward-paragraph nil com)))) 3830 (if com
3831 (progn
3832 (backward-char 1)
3833 (vip-execute-com 'vip-forward-paragraph nil com)))))
3830 3834
3831(defun vip-backward-paragraph (arg) 3835(defun vip-backward-paragraph (arg)
3832 "Backward paragraph." 3836 "Backward paragraph."
@@ -3836,7 +3840,11 @@ controlled by the sign of prefix numeric value."
3836 (com (vip-getCom arg))) 3840 (com (vip-getCom arg)))
3837 (if com (vip-move-marker-locally 'vip-com-point (point))) 3841 (if com (vip-move-marker-locally 'vip-com-point (point)))
3838 (backward-paragraph val) 3842 (backward-paragraph val)
3839 (if com (vip-execute-com 'vip-backward-paragraph nil com)))) 3843 (if com
3844 (progn
3845 (forward-char 1)
3846 (vip-execute-com 'vip-backward-paragraph nil com)
3847 (backward-char 1)))))
3840 3848
3841;; should be mode-specific etc. 3849;; should be mode-specific etc.
3842 3850
@@ -4831,7 +4839,8 @@ One can use `` and '' to temporarily jump 1 step back."
4831 ((vip-valid-register reg '(letter)) 4839 ((vip-valid-register reg '(letter))
4832 (let* ((val (get-register (1+ (- reg ?a)))) 4840 (let* ((val (get-register (1+ (- reg ?a))))
4833 (buf (if (not val) 4841 (buf (if (not val)
4834 (error vip-EmptyTextmarker reg) 4842 (error
4843 (format vip-EmptyTextmarker reg))
4835 (marker-buffer val))) 4844 (marker-buffer val)))
4836 (pos (marker-position val)) 4845 (pos (marker-position val))
4837 line-no text (s pos) (e pos)) 4846 line-no text (s pos) (e pos))
@@ -5147,13 +5156,13 @@ Please, specify your level now: ")
5147 (setq color-display-p (if (vip-window-display-p) 5156 (setq color-display-p (if (vip-window-display-p)
5148 (vip-color-display-p) 5157 (vip-color-display-p)
5149 'non-x) 5158 'non-x)
5150 minibuffer-vi-face (if (vip-window-display-p) 5159 minibuffer-vi-face (if (vip-has-face-support-p)
5151 (vip-get-face vip-minibuffer-vi-face) 5160 (vip-get-face vip-minibuffer-vi-face)
5152 'non-x) 5161 'non-x)
5153 minibuffer-insert-face (if (vip-window-display-p) 5162 minibuffer-insert-face (if (vip-has-face-support-p)
5154 (vip-get-face vip-minibuffer-insert-face) 5163 (vip-get-face vip-minibuffer-insert-face)
5155 'non-x) 5164 'non-x)
5156 minibuffer-emacs-face (if (vip-window-display-p) 5165 minibuffer-emacs-face (if (vip-has-face-support-p)
5157 (vip-get-face vip-minibuffer-emacs-face) 5166 (vip-get-face vip-minibuffer-emacs-face)
5158 'non-x) 5167 'non-x)
5159 frame-parameters (if (fboundp 'frame-parameters) 5168 frame-parameters (if (fboundp 'frame-parameters)
@@ -5401,6 +5410,7 @@ Mail anyway (y or n)? ")
5401 (add-hook 'compilation-mode-hook 'viper-mode) 5410 (add-hook 'compilation-mode-hook 'viper-mode)
5402 5411
5403 (add-hook 'perl-mode-hook 'viper-mode) 5412 (add-hook 'perl-mode-hook 'viper-mode)
5413 (add-hook 'tcl-mode-hook 'viper-mode)
5404 5414
5405 (defvar emerge-startup-hook nil) 5415 (defvar emerge-startup-hook nil)
5406 (add-hook 'emerge-startup-hook 'vip-change-state-to-emacs) 5416 (add-hook 'emerge-startup-hook 'vip-change-state-to-emacs)