diff options
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/cua-base.el | 2 | ||||
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 23 | ||||
| -rw-r--r-- | lisp/emulation/viper-init.el | 17 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 30 |
4 files changed, 29 insertions, 43 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 07c14879fb9..a7f5b4d7aa3 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -548,7 +548,7 @@ a cons (TYPE . COLOR), then both properties are affected." | |||
| 548 | 548 | ||
| 549 | ;;; Global Mark support is in cua-gmrk.el | 549 | ;;; Global Mark support is in cua-gmrk.el |
| 550 | 550 | ||
| 551 | (autoload 'cua-toggle-global-mark "cua-gmrk.el" nil t nil) | 551 | (autoload 'cua-toggle-global-mark "cua-gmrk" nil t nil) |
| 552 | 552 | ||
| 553 | ;; Stub definitions until cua-gmrk.el is loaded | 553 | ;; Stub definitions until cua-gmrk.el is loaded |
| 554 | 554 | ||
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 " |
| 4783 | Please specify your level of familiarity with the venomous VI PERil | 4790 | Please 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). |
| 4785 | You can change it at any time by typing `M-x viper-set-expert-level RET' | 4792 | You 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 |