User: michaelk
Date: 05/09/20 19:58:32
Modified: packages/xemacs-packages/viper viper.texi viper.el
viper-util.el viper-macs.el viper-init.el
viper-ex.el viper-cmd.el ChangeLog
Log:
* viper-cmd.el (viper-change-state): don't move over the field
boundaries in the minibuffer.
(viper-set-minibuffer-style): add viper-minibuffer-post-command-hook.
(viper-minibuffer-post-command-hook): new hook.
(viper-line): don't move cursor at bolp.
* viper-ex.el (ex-pwd, viper-info-on-file): fixed message
* viper-init.el: add alias to make-variable-buffer-local to avoid
compiler warnings.
* viper-macs.el (ex-map): better messages.
* viper-utils.el (viper-beginning-of-field): new function.
* viper.el: replace make-variable-buffer-local with
viper-make-variable-buffer-local everywhere, to avoid warnings.
Revision Changes Path
1.29 +3 -3 XEmacs/packages/xemacs-packages/viper/viper.texi
Index: viper.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper.texi,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- viper.texi 2005/08/06 17:05:10 1.28
+++ viper.texi 2005/09/20 17:58:30 1.29
@@ -7,12 +7,12 @@
@setfilename ../info/viper
@copying
-Copyright @copyright{} 1995, 1996, 1997, 2001, 2002 Free Software
-Foundation, Inc.
+Copyright @copyright{} 1995, 1996, 1997, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being ``A GNU
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
1.32 +5 -4 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.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- viper.el 2005/08/06 20:31:27 1.31
+++ viper.el 2005/09/20 17:58:30 1.32
@@ -9,7 +9,7 @@
;; Author: Michael Kifer <kifer(a)cs.stonybrook.edu>
;; Keywords: emulations
-(defconst viper-version "3.11.5 of August 6, 2005"
+(defconst viper-version "3.11.5 of September 19, 2005"
"The current version of Viper")
;; This file is part of GNU Emacs.
@@ -606,7 +606,7 @@ This startup message appears whenever yo
(viper-set-expert-level 'dont-change-unless)))
(if viper-xemacs-p
- (make-variable-buffer-local 'bar-cursor))
+ (viper-make-variable-buffer-local 'bar-cursor))
(if (eq major-mode 'viper-mode)
(setq major-mode 'fundamental-mode))
@@ -769,6 +769,7 @@ It also can't undo some Viper settings."
(remove-hook 'comint-mode-hook 'viper-comint-mode-hook)
(remove-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel)
(remove-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel)
+ (remove-hook 'post-command-hook 'viper-minibuffer-post-command-hook)
;; unbind Viper mouse bindings
(viper-unbind-mouse-search-key)
@@ -1008,7 +1009,7 @@ It also can't undo some Viper settings."
;; ***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))
- (make-variable-buffer-local 'minor-mode-map-alist))
+ (viper-make-variable-buffer-local 'minor-mode-map-alist))
;; Viper changes the default mode-line-buffer-identification
(setq-default mode-line-buffer-identification '(" %b"))
@@ -1017,7 +1018,7 @@ It also can't undo some Viper settings."
(setq next-line-add-newlines nil
require-final-newline t)
- (make-variable-buffer-local 'require-final-newline)
+ (viper-make-variable-buffer-local 'require-final-newline)
;; don't bark when mark is inactive
(if viper-emacs-p
1.24 +8 -0 XEmacs/packages/xemacs-packages/viper/viper-util.el
Index: viper-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-util.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- viper-util.el 2005/08/06 17:05:11 1.23
+++ viper-util.el 2005/09/20 17:58:30 1.24
@@ -1405,6 +1405,7 @@ This option is appropriate if you like E
viper-SEP-char-class
(or within-line "\n")
(if within-line (viper-line-pos 'end)))))
+
(defsubst viper-skip-all-separators-backward (&optional within-line)
(if (eq viper-syntax-preference 'strict-vi)
(if within-line
@@ -1433,6 +1434,7 @@ This option is appropriate if you like E
;; Emacs may consider some of these as words, but we don't want them
viper-non-word-characters
(viper-line-pos 'end))))
+
(defun viper-skip-nonalphasep-backward ()
(if (eq viper-syntax-preference 'strict-vi)
(skip-chars-backward
@@ -1501,6 +1503,12 @@ This option is appropriate if you like E
(setq total (+ total local)))
total
))
+
+;; tells when point is at the beginning of field
+(defun viper-beginning-of-field ()
+ (or (bobp)
+ (not (eq (get-char-property (point) 'field)
+ (get-char-property (1- (point)) 'field)))))
;; this is copied from cl-extra.el
1.11 +5 -5 XEmacs/packages/xemacs-packages/viper/viper-macs.el
Index: viper-macs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-macs.el,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- viper-macs.el 2005/08/06 17:05:11 1.10
+++ viper-macs.el 2005/09/20 17:58:30 1.11
@@ -118,7 +118,7 @@ a key is a symbol, e.g., `a', `\\1', `f2
(define-key viper-vi-intercept-map "\C-x)"
'viper-end-mapping-kbd-macro)
(define-key viper-insert-intercept-map "\C-x)"
'viper-end-mapping-kbd-macro)
(define-key viper-emacs-intercept-map "\C-x)"
'viper-end-mapping-kbd-macro)
- (message "Mapping %S in %s state. Hit `C-x )' to complete the
mapping"
+ (message "Mapping %S in %s state. Type macro definition followed by `C-x
)'"
(viper-display-macro macro-name)
(if ins "Insert" "Vi")))
))
@@ -170,7 +170,7 @@ a key is a symbol, e.g., `a', `\\1', `f2
((stringp macro-name)
(setq macro-name (vconcat macro-name)))
(t (setq macro-name (vconcat (prin1-to-string macro-name)))))
- (message ":map%s <Name>" variant)(sit-for 2)
+ (message ":map%s <Macro Name>" variant)(sit-for 2)
(while
(not (member key
'(?\C-m ?\n (control m) (control j) return linefeed)))
@@ -186,7 +186,7 @@ a key is a symbol, e.g., `a', `\\1', `f2
variant (if (> (length key-seq) 0)
(prin1-to-string (viper-display-macro key-seq))
"")))
- (message message)
+ (message "%s" message)
(setq event (viper-read-key))
;;(setq event (viper-read-event))
(setq key
@@ -263,7 +263,7 @@ a key is a symbol, e.g., `a', `\\1', `f2
(prin1-to-string
(viper-display-macro key-seq))
"")))
- (message message)
+ (message "%s" message)
(setq event (viper-read-key))
;;(setq event (viper-read-event))
(setq key
@@ -442,7 +442,7 @@ If SCOPE is nil, the user is asked to sp
scope)
viper-custom-file-name))
- (message msg)
+ (message "%s" msg)
))
(setq new-elt
1.19 +5 -0 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.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- viper-init.el 2005/08/06 17:05:12 1.18
+++ viper-init.el 2005/09/20 17:58:30 1.19
@@ -115,6 +115,11 @@ 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
1.24 +2 -2 XEmacs/packages/xemacs-packages/viper/viper-ex.el
Index: viper-ex.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-ex.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- viper-ex.el 2005/08/06 17:05:12 1.23
+++ viper-ex.el 2005/09/20 17:58:30 1.24
@@ -1590,7 +1590,7 @@ reversed."
;; Ex print working directory
(defun ex-pwd ()
- (message default-directory))
+ (message "%s" default-directory))
;; Ex quit command
(defun ex-quit ()
@@ -2230,7 +2230,7 @@ Type 'mak ' (including the space) to run
(if (buffer-modified-p) "[Modified]" "[Unchanged]")))
(if (< (+ 1 (length info) (length file))
(window-width (minibuffer-window)))
- (message (concat file " " info))
+ (message "%s" (concat file " " info))
(save-window-excursion
(with-output-to-temp-buffer " *viper-info*"
(princ (concat "\n" file "\n\n\t" info "\n\n")))
1.30 +9 -3 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.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- viper-cmd.el 2005/08/06 17:05:12 1.29
+++ viper-cmd.el 2005/09/20 17:58:30 1.30
@@ -358,7 +358,7 @@
'viper-insertion-ring))
(if viper-ESC-moves-cursor-back
- (or (bolp) (backward-char 1))))
+ (or (bolp) (viper-beginning-of-field) (backward-char 1))))
))
;; insert or replace
@@ -1996,7 +1996,8 @@ Undo previous insertion and inserts new.
;;; Minibuffer business
(defsubst viper-set-minibuffer-style ()
- (add-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel))
+ (add-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel)
+ (add-hook 'post-command-hook 'viper-minibuffer-post-command-hook))
(defun viper-minibuffer-setup-sentinel ()
@@ -2039,7 +2040,12 @@ Undo previous insertion and inserts new.
(minibuffer-prompt-end)
(point-min)))
+(defun viper-minibuffer-post-command-hook()
+ (when (active-minibuffer-window)
+ (when (< (point) (viper-minibuffer-real-start))
+ (goto-char (viper-minibuffer-real-start)))))
+
;; Interpret last event in the local map first; if fails, use exit-minibuffer.
;; Run viper-minibuffer-exit-hook before exiting.
(defun viper-exit-minibuffer ()
@@ -2570,7 +2576,7 @@ These keys are ESC, RET, and LineFeed"
;; last line of buffer when this line has no \n.
(viper-add-newline-at-eob-if-necessary)
(viper-execute-com 'viper-line val com))
- (if (and (eobp) (not (bobp))) (forward-line -1))
+ (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
)
(defun viper-yank-line (arg)
1.62 +20 -0 XEmacs/packages/xemacs-packages/viper/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/ChangeLog,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- ChangeLog 2005/08/08 18:43:08 1.61
+++ ChangeLog 2005/09/20 17:58:31 1.62
@@ -1,3 +1,23 @@
+2005-09-20 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * viper-cmd.el (viper-change-state): don't move over the field
+ boundaries in the minibuffer.
+ (viper-set-minibuffer-style): add viper-minibuffer-post-command-hook.
+ (viper-minibuffer-post-command-hook): new hook.
+ (viper-line): don't move cursor at bolp.
+
+ * viper-ex.el (ex-pwd, viper-info-on-file): fixed message
+
+ * viper-init.el: add alias to make-variable-buffer-local to avoid
+ compiler warnings.
+
+ * viper-macs.el (ex-map): better messages.
+
+ * viper-utils.el (viper-beginning-of-field): new function.
+
+ * viper.el: replace make-variable-buffer-local with
+ viper-make-variable-buffer-local everywhere, to avoid warnings.
+
2005-08-08 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.42 released.