User: michaelk
Date: 05/10/06 02:22:02
Modified: packages/xemacs-packages/viper viper.el viper-init.el
viper-cmd.el ChangeLog
Log:
* viper-cmd.el (viper-normalize-minor-mode-map-alist,
viper-refresh-mode-line): use make-local-variable to localize some vars
instead of make-variable-buffer-local. Suggested by Stefan Monnier.
* viper-init.el (viper-make-variable-buffer-local): delete alias.
(viper-restore-cursor-type,viper-set-insert-cursor-type): use
make-local-variable instead of make-variable-buffer-local. Suggested by
Stefan Monnier.
* viper.el (viper-mode): don't use viper-make-variable-buffer-local.
(viper-comint-mode-hook): use make-local-variable on
require-final-newline.
(viper-non-hook-settings): don't use make-variable-buffer-local.
Revision Changes Path
1.33 +7 -23 XEmacs/packages/xemacs-packages/viper/viper.el
Index: viper.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- viper.el 2005/09/20 17:58:30 1.32
+++ viper.el 2005/10/06 00:22:01 1.33
@@ -9,7 +9,7 @@
;; Author: Michael Kifer <kifer(a)cs.stonybrook.edu>
;; Keywords: emulations
-(defconst viper-version "3.11.5 of September 19, 2005"
+(defconst viper-version "3.11.5 of October 5, 2005"
"The current version of Viper")
;; This file is part of GNU Emacs.
@@ -605,8 +605,6 @@ This startup message appears whenever yo
))
(viper-set-expert-level 'dont-change-unless)))
- (if viper-xemacs-p
- (viper-make-variable-buffer-local 'bar-cursor))
(if (eq major-mode 'viper-mode)
(setq major-mode 'fundamental-mode))
@@ -627,8 +625,8 @@ This startup message appears whenever yo
;; This hook designed to enable Vi-style editing in comint-based modes."
(defun viper-comint-mode-hook ()
- (setq require-final-newline nil
- viper-ex-style-editing nil
+ (set (make-local-variable 'require-final-newline) nil)
+ (setq viper-ex-style-editing nil
viper-ex-style-motion nil)
(viper-change-state-to-insert))
@@ -1000,17 +998,6 @@ It also can't undo some Viper settings."
;; these are primarily advices and Vi-ish variable settings
(defun viper-non-hook-settings ()
- ;; This var is not local in Emacs, so we make it local. It must be local
- ;; because although the stack of minor modes can be the same for all buffers,
- ;; the associated *keymaps* can be different. In Viper,
- ;; viper-vi-local-user-map, viper-insert-local-user-map, and others can have
- ;; different keymaps for different buffers. Also, the keymaps associated
- ;; with viper-vi/insert-state-modifier-minor-mode can be different.
- ;; ***This is needed only in case emulation-mode-map-alists is not defined
- (unless
- (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists))
- (viper-make-variable-buffer-local 'minor-mode-map-alist))
-
;; Viper changes the default mode-line-buffer-identification
(setq-default mode-line-buffer-identification '(" %b"))
@@ -1018,8 +1005,6 @@ It also can't undo some Viper settings."
(setq next-line-add-newlines nil
require-final-newline t)
- (viper-make-variable-buffer-local 'require-final-newline)
-
;; don't bark when mark is inactive
(if viper-emacs-p
(setq mark-even-if-inactive t))
@@ -1027,7 +1012,6 @@ It also can't undo some Viper settings."
(setq scroll-step 1)
;; Variable displaying the current Viper state in the mode line.
- (viper-deflocalvar viper-mode-string viper-emacs-state-id)
(or (memq 'viper-mode-string global-mode-string)
(setq global-mode-string
(append '("" viper-mode-string) (cdr global-mode-string))))
@@ -1336,9 +1320,9 @@ These two lines must come in the order g
(provide 'viper)
-;;; Local Variables:
-;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;;; End:
+;; Local Variables:
+;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
+;; End:
-;;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79
+;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79
;;; viper.el ends here
1.20 +6 -11 XEmacs/packages/xemacs-packages/viper/viper-init.el
Index: viper-init.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-init.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- viper-init.el 2005/09/20 17:58:30 1.19
+++ viper-init.el 2005/10/06 00:22:01 1.20
@@ -115,11 +115,6 @@ In all likelihood, you don't need to bot
;;; Macros
-;; Fool the compiler to avoid warnings.
-;; Viper calls make-variable-buffer-local from within other functions, which
-;; triggers compiler warnings.
-(defalias 'viper-make-variable-buffer-local 'make-variable-buffer-local)
-
(defmacro viper-deflocalvar (var default-value &optional documentation)
`(progn
(defvar ,var ,default-value
@@ -1019,19 +1014,19 @@ Should be set in `~/.viper' file."
(defun viper-restore-cursor-type ()
(condition-case nil
(if viper-xemacs-p
- (setq bar-cursor nil)
+ (set (make-local-variable 'bar-cursor) nil)
(setq cursor-type default-cursor-type))
(error nil)))
(defun viper-set-insert-cursor-type ()
(if viper-xemacs-p
- (setq bar-cursor 2)
+ (set (make-local-variable 'bar-cursor) 2)
(setq cursor-type '(bar . 2))))
-;;; Local Variables:
-;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;;; End:
+;; Local Variables:
+;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
+;; End:
-;;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250
+;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250
;;; viper-init.el ends here
1.31 +16 -9 XEmacs/packages/xemacs-packages/viper/viper-cmd.el
Index: viper-cmd.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-cmd.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- viper-cmd.el 2005/09/20 17:58:30 1.30
+++ viper-cmd.el 2005/10/06 00:22:01 1.31
@@ -494,13 +494,20 @@
viper-empty-keymap))
))
- ;; in emacs with emulation-mode-map-alists, nothing needs to be done
+ ;; This var is not local in Emacs, so we make it local. It must be local
+ ;; because although the stack of minor modes can be the same for all buffers,
+ ;; the associated *keymaps* can be different. In Viper,
+ ;; viper-vi-local-user-map, viper-insert-local-user-map, and others can have
+ ;; different keymaps for different buffers. Also, the keymaps associated
+ ;; with viper-vi/insert-state-modifier-minor-mode can be different.
+ ;; ***This is needed only in case emulation-mode-map-alists is not defined.
+ ;; In emacs with emulation-mode-map-alists, nothing needs to be done
(unless
(and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists))
- (setq minor-mode-map-alist
- (viper-append-filter-alist
- (append viper--intercept-key-maps viper--key-maps)
- minor-mode-map-alist)))
+ (set (make-local-variable 'minor-mode-map-alist)
+ (viper-append-filter-alist
+ (append viper--intercept-key-maps viper--key-maps)
+ minor-mode-map-alist)))
)
@@ -509,7 +516,7 @@
;; Modifies mode-line-buffer-identification.
(defun viper-refresh-mode-line ()
- (setq viper-mode-string
+ (set (make-local-variable 'viper-mode-string)
(cond ((eq viper-current-state 'emacs-state) viper-emacs-state-id)
((eq viper-current-state 'vi-state) viper-vi-state-id)
((eq viper-current-state 'replace-state) viper-replace-state-id)
@@ -2160,7 +2167,7 @@ problems."
(setq keymap (or keymap minibuffer-local-map)
initial (or initial "")
temp-msg (if default
- (format "(default: %s) " default)
+ (format "(default %s) " default)
""))
(setq viper-incomplete-ex-cmd nil)
@@ -4781,7 +4788,7 @@ sensitive for VI-style look-and-feel."
level-changed t)
(insert "
Please specify your level of familiarity with the venomous VI PERil
-(and the VI Plan for Emacs Rescue).
+\(and the VI Plan for Emacs Rescue).
You can change it at any time by typing `M-x viper-set-expert-level RET'
1 -- BEGINNER: Almost all Emacs features are suppressed.
@@ -5000,5 +5007,5 @@ Mail anyway (y or n)? ")
-;;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2
+;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2
;;; viper-cmd.el ends here
1.64 +16 -0 XEmacs/packages/xemacs-packages/viper/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/ChangeLog,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -r1.63 -r1.64
--- ChangeLog 2005/09/21 07:16:16 1.63
+++ ChangeLog 2005/10/06 00:22:01 1.64
@@ -1,3 +1,19 @@
+2005-10-05 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * viper-cmd.el (viper-normalize-minor-mode-map-alist,
+ viper-refresh-mode-line): use make-local-variable to localize some vars
+ instead of make-variable-buffer-local. Suggested by Stefan Monnier.
+
+ * viper-init.el (viper-make-variable-buffer-local): delete alias.
+ (viper-restore-cursor-type,viper-set-insert-cursor-type): use
+ make-local-variable instead of make-variable-buffer-local. Suggested by
+ Stefan Monnier.
+
+ * viper.el (viper-mode): don't use viper-make-variable-buffer-local.
+ (viper-comint-mode-hook): use make-local-variable on
+ require-final-newline.
+ (viper-non-hook-settings): don't use make-variable-buffer-local.
+
2005-09-21 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.43 released.