CVS update by michaelk packages/xemacs-packages/viper, viper-mous.el, viper-init.el ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Fri Nov 2 02:16:35 EDT 2007


  User: michaelk
  Date: 07/11/02 07:16:35

  Modified:    packages/xemacs-packages/viper viper.el viper-util.el
                        viper-mous.el viper-macs.el viper-keym.el
                        viper-init.el viper-ex.el viper-cmd.el ChangeLog
Log:
	* viper-ex.el (viper-ex): do not ignore the region.

	* viper-cmd.el (viper-prev-destructive-command)
	(viper-insert-prev-from-insertion-ring): use ring-copy instead of
	copy-sequence.

Revision  Changes    Path
1.46      +2 -2      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.45
retrieving revision 1.46
diff -u -p -r1.45 -r1.46
--- viper.el	2007/08/19 13:52:37	1.45
+++ viper.el	2007/11/02 06:16:32	1.46
@@ -16,7 +16,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -799,7 +799,7 @@ It also can't undo some Viper settings."
 
 ;; set appropriate Viper state in buffers that changed major mode
 (defun set-viper-state-in-major-mode ()
-  (mapcar
+  (mapc
    (lambda (buf)
      (if (viper-buffer-live-p buf)
 	 (with-current-buffer buf



1.30      +4 -4      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.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- viper-util.el	2007/06/12 19:28:28	1.29
+++ viper-util.el	2007/11/02 06:16:32	1.30
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -1260,9 +1260,9 @@ Arguments become related buffers.  This 
 the `Local variables' section of a file."
   (setq viper-related-files-and-buffers-ring
 	(make-ring (1+ (length other-files-or-buffers))))
-  (mapcar '(lambda (elt)
-	     (viper-ring-insert viper-related-files-and-buffers-ring elt))
-	  other-files-or-buffers)
+  (mapc '(lambda (elt)
+	  (viper-ring-insert viper-related-files-and-buffers-ring elt))
+	other-files-or-buffers)
   (viper-ring-insert viper-related-files-and-buffers-ring (buffer-name))
   )
 



1.12      +1 -1      XEmacs/packages/xemacs-packages/viper/viper-mous.el

Index: viper-mous.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-mous.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- viper-mous.el	2007/01/23 21:03:12	1.11
+++ viper-mous.el	2007/11/02 06:16:32	1.12
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,



1.14      +6 -6      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.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- viper-macs.el	2007/01/23 21:03:12	1.13
+++ viper-macs.el	2007/11/02 06:16:33	1.14
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -466,7 +466,7 @@ If SCOPE is nil, the user is asked to sp
 				   (viper-array-to-string macro-name)))
 	    (setq lis2 (cons (car lis) lis2))
 	    (setq lis (cdr lis)))
-	  
+
 	  (setq lis2 (reverse lis2))
 	  (set macro-alist-var (append lis2 (cons new-elt lis)))
 	  (setq old-elt new-elt)))
@@ -658,9 +658,9 @@ name from there."
   (interactive)
   (with-output-to-temp-buffer " *viper-info*"
     (princ "Macros in Vi state:\n===================\n")
-    (mapcar 'viper-describe-one-macro viper-vi-kbd-macro-alist)
+    (mapc 'viper-describe-one-macro viper-vi-kbd-macro-alist)
     (princ "\n\nMacros in Insert and Replace states:\n====================================\n")
-    (mapcar 'viper-describe-one-macro viper-insert-kbd-macro-alist)
+    (mapc 'viper-describe-one-macro viper-insert-kbd-macro-alist)
     (princ "\n\nMacros in Emacs state:\n======================\n")
     (mapcar 'viper-describe-one-macro viper-emacs-kbd-macro-alist)
     ))
@@ -670,11 +670,11 @@ name from there."
 		 (viper-display-macro (car macro))))
   (princ "   ** Buffer-specific:")
   (if (viper-kbd-buf-alist macro)
-      (mapcar 'viper-describe-one-macro-elt (viper-kbd-buf-alist macro))
+      (mapc 'viper-describe-one-macro-elt (viper-kbd-buf-alist macro))
     (princ "  none\n"))
   (princ "\n   ** Mode-specific:")
   (if (viper-kbd-mode-alist macro)
-      (mapcar 'viper-describe-one-macro-elt (viper-kbd-mode-alist macro))
+      (mapc 'viper-describe-one-macro-elt (viper-kbd-mode-alist macro))
     (princ "  none\n"))
   (princ "\n   ** Global:")
   (if (viper-kbd-global-definition macro)



1.18      +3 -3      XEmacs/packages/xemacs-packages/viper/viper-keym.el

Index: viper-keym.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-keym.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- viper-keym.el	2007/06/12 19:28:28	1.17
+++ viper-keym.el	2007/11/02 06:16:33	1.18
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -170,7 +170,7 @@ Enter as a sexp.  Examples: \"\\C-z\", [
 	 (let ((old-value (if (boundp 'viper-toggle-key)
 			      viper-toggle-key
 			    [(control ?z)])))
-	   (mapcar
+	   (mapc
 	    (lambda (buf)
 	      (save-excursion
 		(set-buffer buf)
@@ -210,7 +210,7 @@ If running in a terminal, [(escape)] is 
 	 (let ((old-value (if (boundp 'viper-ESC-key)
 			      viper-ESC-key
 			    [(escape)])))
-	   (mapcar
+	   (mapc
 	    (lambda (buf)
 	      (save-excursion
 		(set-buffer buf)



1.26      +3 -3      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.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- viper-init.el	2007/06/12 19:28:28	1.25
+++ viper-init.el	2007/11/02 06:16:33	1.26
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -50,7 +50,7 @@
   (message "Viper version is %s" viper-version))
 
 ;; Is it XEmacs?
-(defconst viper-xemacs-p (string-match "XEmacs" emacs-version))
+(defconst viper-xemacs-p (featurep 'xemacs))
 ;; Is it Emacs?
 (defconst viper-emacs-p (not viper-xemacs-p))
 ;; Tell whether we are running as a window application or on a TTY
@@ -61,7 +61,7 @@
 ;; compiler at hand.
 ;; Suggested by rms.
 (defmacro viper-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form)
-  (if (string-match "XEmacs" emacs-version)
+  (if (featurep 'xemacs)
       xemacs-form emacs-form))
 
 



1.30      +14 -12    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.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- viper-ex.el	2007/08/19 13:52:37	1.29
+++ viper-ex.el	2007/11/02 06:16:33	1.30
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -651,17 +651,19 @@ reversed."
 	(setq initial-str (format "%d,%d" reg-beg-line reg-end-line)))
 
     (setq com-str
-	  (or string (viper-read-string-with-history
-		      ":"
-		      initial-str
-		      'viper-ex-history
-		      ;; no default when working on region
-		      (if initial-str
-			  nil
-			(car viper-ex-history))
-		      map
-		      (if initial-str
-			  " [Type command to execute on current region]"))))
+	  (if string
+	      (concat initial-str string)
+	    (viper-read-string-with-history
+	     ":"
+	     initial-str
+	     'viper-ex-history
+	     ;; no default when working on region
+	     (if initial-str
+		 nil
+	       (car viper-ex-history))
+	     map
+	     (if initial-str
+		 " [Type command to execute on current region]"))))
     (save-window-excursion
       ;; just a precaution
       (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name))



1.41      +6 -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.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- viper-cmd.el	2007/08/19 13:52:37	1.40
+++ viper-cmd.el	2007/11/02 06:16:33	1.41
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -1902,7 +1902,7 @@ With prefix argument, find next destruct
 	(setq viper-intermediate-command
 	      'repeating-display-destructive-command)
       ;; first search through command history--set temp ring
-      (setq viper-temp-command-ring (copy-sequence viper-command-ring)))
+      (setq viper-temp-command-ring (ring-copy viper-command-ring)))
     (setq cmd (if next
 		  (viper-special-ring-rotate1 viper-temp-command-ring 1)
 		(viper-special-ring-rotate1 viper-temp-command-ring -1)))
@@ -1936,7 +1936,7 @@ to in the global map, instead of cycling
 		 (length viper-last-inserted-string-from-insertion-ring))))
 	  )
       ;;first search through insertion history
-      (setq viper-temp-insertion-ring (copy-sequence viper-insertion-ring)))
+      (setq viper-temp-insertion-ring (ring-copy viper-insertion-ring)))
     (setq this-command 'viper-insert-from-insertion-ring)
     ;; so that things will be undone properly
     (setq buffer-undo-list (cons nil buffer-undo-list))
@@ -2790,6 +2790,7 @@ On reaching beginning of line, stop and 
 
 (defun viper-next-line-carefully (arg)
   (condition-case nil
+      ;; do not use forward-line! need to keep column
       (next-line arg)
     (error nil)))
 
@@ -3089,6 +3090,7 @@ On reaching beginning of line, stop and 
   (let ((val (viper-p-val arg))
 	(com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
+    ;; do not use forward-line! need to keep column
     (next-line val)
     (if viper-ex-style-motion
 	(if (and (eolp) (not (bolp))) (backward-char 1)))
@@ -3132,6 +3134,7 @@ If point is on a widget or a button, sim
   (let ((val (viper-p-val arg))
 	(com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
+    ;; do not use forward-line! need to keep column
     (previous-line val)
     (if viper-ex-style-motion
 	(if (and (eolp) (not (bolp))) (backward-char 1)))



1.94      +8 -0      XEmacs/packages/xemacs-packages/viper/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/ChangeLog,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -p -r1.93 -r1.94
--- ChangeLog	2007/08/19 18:53:42	1.93
+++ ChangeLog	2007/11/02 06:16:33	1.94
@@ -1,3 +1,11 @@
+2007-11-02  Michael Kifer  <kifer at cs.stonybrook.edu>
+	
+	* viper-ex.el (viper-ex): do not ignore the region.
+	
+	* viper-cmd.el (viper-prev-destructive-command)
+	(viper-insert-prev-from-insertion-ring): use ring-copy instead of
+	copy-sequence.
+	
 2007-08-19  Norbert Koch  <viteno at xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.58 released.





More information about the XEmacs-CVS mailing list