aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorMiles Bader2005-10-07 07:15:40 +0000
committerMiles Bader2005-10-07 07:15:40 +0000
commit00e18f33adde1d2f196fdf9cadf11235cc4fcc8f (patch)
tree8c553c9a361da158ba47f3d0ed0429da180d957f /lisp/emulation
parentba4c328314c2b01e6dcc3807a0666a644c3f3954 (diff)
parent9e1cb4bc96d36af6e8b893d467970a25afead03b (diff)
downloademacs-00e18f33adde1d2f196fdf9cadf11235cc4fcc8f.tar.gz
emacs-00e18f33adde1d2f196fdf9cadf11235cc4fcc8f.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-88
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 569-579) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 129-132) - Update from CVS - Merge from emacs--cvs-trunk--0
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/viper-cmd.el23
-rw-r--r--lisp/emulation/viper-init.el17
-rw-r--r--lisp/emulation/viper.el30
3 files changed, 28 insertions, 42 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 398c47d4784..08ebbbcc9d0 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -494,13 +494,20 @@
494 viper-empty-keymap)) 494 viper-empty-keymap))
495 )) 495 ))
496 496
497 ;; in emacs with emulation-mode-map-alists, nothing needs to be done 497 ;; This var is not local in Emacs, so we make it local. It must be local
498 ;; because although the stack of minor modes can be the same for all buffers,
499 ;; the associated *keymaps* can be different. In Viper,
500 ;; viper-vi-local-user-map, viper-insert-local-user-map, and others can have
501 ;; different keymaps for different buffers. Also, the keymaps associated
502 ;; with viper-vi/insert-state-modifier-minor-mode can be different.
503 ;; ***This is needed only in case emulation-mode-map-alists is not defined.
504 ;; In emacs with emulation-mode-map-alists, nothing needs to be done
498 (unless 505 (unless
499 (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) 506 (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists))
500 (setq minor-mode-map-alist 507 (set (make-local-variable 'minor-mode-map-alist)
501 (viper-append-filter-alist 508 (viper-append-filter-alist
502 (append viper--intercept-key-maps viper--key-maps) 509 (append viper--intercept-key-maps viper--key-maps)
503 minor-mode-map-alist))) 510 minor-mode-map-alist)))
504 ) 511 )
505 512
506 513
@@ -509,7 +516,7 @@
509 516
510;; Modifies mode-line-buffer-identification. 517;; Modifies mode-line-buffer-identification.
511(defun viper-refresh-mode-line () 518(defun viper-refresh-mode-line ()
512 (setq viper-mode-string 519 (set (make-local-variable 'viper-mode-string)
513 (cond ((eq viper-current-state 'emacs-state) viper-emacs-state-id) 520 (cond ((eq viper-current-state 'emacs-state) viper-emacs-state-id)
514 ((eq viper-current-state 'vi-state) viper-vi-state-id) 521 ((eq viper-current-state 'vi-state) viper-vi-state-id)
515 ((eq viper-current-state 'replace-state) viper-replace-state-id) 522 ((eq viper-current-state 'replace-state) viper-replace-state-id)
@@ -4781,7 +4788,7 @@ sensitive for VI-style look-and-feel."
4781 level-changed t) 4788 level-changed t)
4782 (insert " 4789 (insert "
4783Please specify your level of familiarity with the venomous VI PERil 4790Please specify your level of familiarity with the venomous VI PERil
4784(and the VI Plan for Emacs Rescue). 4791\(and the VI Plan for Emacs Rescue).
4785You can change it at any time by typing `M-x viper-set-expert-level RET' 4792You can change it at any time by typing `M-x viper-set-expert-level RET'
4786 4793
4787 1 -- BEGINNER: Almost all Emacs features are suppressed. 4794 1 -- BEGINNER: Almost all Emacs features are suppressed.
@@ -5000,5 +5007,5 @@ Mail anyway (y or n)? ")
5000 5007
5001 5008
5002 5009
5003;;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2 5010;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2
5004;;; viper-cmd.el ends here 5011;;; viper-cmd.el ends here
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 8aa7e4649d4..33713e8a869 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -115,11 +115,6 @@ In all likelihood, you don't need to bother with this setting."
115 115
116;;; Macros 116;;; Macros
117 117
118;; Fool the compiler to avoid warnings.
119;; Viper calls make-variable-buffer-local from within other functions, which
120;; triggers compiler warnings.
121(defalias 'viper-make-variable-buffer-local 'make-variable-buffer-local)
122
123(defmacro viper-deflocalvar (var default-value &optional documentation) 118(defmacro viper-deflocalvar (var default-value &optional documentation)
124 `(progn 119 `(progn
125 (defvar ,var ,default-value 120 (defvar ,var ,default-value
@@ -1019,19 +1014,19 @@ Should be set in `~/.viper' file."
1019(defun viper-restore-cursor-type () 1014(defun viper-restore-cursor-type ()
1020 (condition-case nil 1015 (condition-case nil
1021 (if viper-xemacs-p 1016 (if viper-xemacs-p
1022 (setq bar-cursor nil) 1017 (set (make-local-variable 'bar-cursor) nil)
1023 (setq cursor-type default-cursor-type)) 1018 (setq cursor-type default-cursor-type))
1024 (error nil))) 1019 (error nil)))
1025 1020
1026(defun viper-set-insert-cursor-type () 1021(defun viper-set-insert-cursor-type ()
1027 (if viper-xemacs-p 1022 (if viper-xemacs-p
1028 (setq bar-cursor 2) 1023 (set (make-local-variable 'bar-cursor) 2)
1029 (setq cursor-type '(bar . 2)))) 1024 (setq cursor-type '(bar . 2))))
1030 1025
1031 1026
1032;;; Local Variables: 1027;; Local Variables:
1033;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) 1028;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
1034;;; End: 1029;; End:
1035 1030
1036;;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250 1031;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250
1037;;; viper-init.el ends here 1032;;; viper-init.el ends here
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index b3fd6d139c0..a361469382e 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -9,7 +9,7 @@
9;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 9;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
10;; Keywords: emulations 10;; Keywords: emulations
11 11
12(defconst viper-version "3.11.5 of September 19, 2005" 12(defconst viper-version "3.11.5 of October 5, 2005"
13 "The current version of Viper") 13 "The current version of Viper")
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
@@ -605,8 +605,6 @@ This startup message appears whenever you load Viper, unless you type `y' now."
605 )) 605 ))
606 (viper-set-expert-level 'dont-change-unless))) 606 (viper-set-expert-level 'dont-change-unless)))
607 607
608 (if viper-xemacs-p
609 (viper-make-variable-buffer-local 'bar-cursor))
610 (if (eq major-mode 'viper-mode) 608 (if (eq major-mode 'viper-mode)
611 (setq major-mode 'fundamental-mode)) 609 (setq major-mode 'fundamental-mode))
612 610
@@ -627,8 +625,8 @@ This startup message appears whenever you load Viper, unless you type `y' now."
627 625
628;; This hook designed to enable Vi-style editing in comint-based modes." 626;; This hook designed to enable Vi-style editing in comint-based modes."
629(defun viper-comint-mode-hook () 627(defun viper-comint-mode-hook ()
630 (setq require-final-newline nil 628 (set (make-local-variable 'require-final-newline) nil)
631 viper-ex-style-editing nil 629 (setq viper-ex-style-editing nil
632 viper-ex-style-motion nil) 630 viper-ex-style-motion nil)
633 (viper-change-state-to-insert)) 631 (viper-change-state-to-insert))
634 632
@@ -1000,17 +998,6 @@ It also can't undo some Viper settings."
1000;; these are primarily advices and Vi-ish variable settings 998;; these are primarily advices and Vi-ish variable settings
1001(defun viper-non-hook-settings () 999(defun viper-non-hook-settings ()
1002 1000
1003 ;; This var is not local in Emacs, so we make it local. It must be local
1004 ;; because although the stack of minor modes can be the same for all buffers,
1005 ;; the associated *keymaps* can be different. In Viper,
1006 ;; viper-vi-local-user-map, viper-insert-local-user-map, and others can have
1007 ;; different keymaps for different buffers. Also, the keymaps associated
1008 ;; with viper-vi/insert-state-modifier-minor-mode can be different.
1009 ;; ***This is needed only in case emulation-mode-map-alists is not defined
1010 (unless
1011 (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists))
1012 (viper-make-variable-buffer-local 'minor-mode-map-alist))
1013
1014 ;; Viper changes the default mode-line-buffer-identification 1001 ;; Viper changes the default mode-line-buffer-identification
1015 (setq-default mode-line-buffer-identification '(" %b")) 1002 (setq-default mode-line-buffer-identification '(" %b"))
1016 1003
@@ -1018,8 +1005,6 @@ It also can't undo some Viper settings."
1018 (setq next-line-add-newlines nil 1005 (setq next-line-add-newlines nil
1019 require-final-newline t) 1006 require-final-newline t)
1020 1007
1021 (viper-make-variable-buffer-local 'require-final-newline)
1022
1023 ;; don't bark when mark is inactive 1008 ;; don't bark when mark is inactive
1024 (if viper-emacs-p 1009 (if viper-emacs-p
1025 (setq mark-even-if-inactive t)) 1010 (setq mark-even-if-inactive t))
@@ -1027,7 +1012,6 @@ It also can't undo some Viper settings."
1027 (setq scroll-step 1) 1012 (setq scroll-step 1)
1028 1013
1029 ;; Variable displaying the current Viper state in the mode line. 1014 ;; Variable displaying the current Viper state in the mode line.
1030 (viper-deflocalvar viper-mode-string viper-emacs-state-id)
1031 (or (memq 'viper-mode-string global-mode-string) 1015 (or (memq 'viper-mode-string global-mode-string)
1032 (setq global-mode-string 1016 (setq global-mode-string
1033 (append '("" viper-mode-string) (cdr global-mode-string)))) 1017 (append '("" viper-mode-string) (cdr global-mode-string))))
@@ -1336,9 +1320,9 @@ These two lines must come in the order given.
1336(provide 'viper) 1320(provide 'viper)
1337 1321
1338 1322
1339;;; Local Variables: 1323;; Local Variables:
1340;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) 1324;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
1341;;; End: 1325;; End:
1342 1326
1343;;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79 1327;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79
1344;;; viper.el ends here 1328;;; viper.el ends here