changeset 14909:7ff1df13b124

*** empty log message ***
author Michael Kifer <kifer@cs.stonybrook.edu>
date Fri, 29 Mar 1996 01:02:28 +0000
parents 4b99e1ffa095
children c06d2c905090
files lisp/emulation/viper-ex.el lisp/emulation/viper-keym.el lisp/emulation/viper-macs.el lisp/emulation/viper-mous.el lisp/emulation/viper-util.el lisp/emulation/viper.el
diffstat 6 files changed, 101 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/viper-ex.el	Thu Mar 28 21:21:18 1996 +0000
+++ b/lisp/emulation/viper-ex.el	Fri Mar 29 01:02:28 1996 +0000
@@ -1,6 +1,6 @@
 ;;; viper-ex.el --- functions implementing the Ex commands for Viper
 
-;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -19,8 +19,15 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+
+;; Code
+
 (require 'viper-util)
 
+;; Compiler pacifier
+(defvar read-file-name-map)
+;; end compiler pacifier
+
 ;;; Variables
 
 (defconst vip-ex-work-buf-name " *ex-working-space*")
@@ -1340,7 +1347,7 @@
 	    (setq l (cdr l))))
       (if find-alt-file (car l)
 	(progn
-	  (if (car l)
+	  (if (and (car l) (get-file-buffer (car l)))
 	      (let* ((w (if cycle-other-window
 			    (get-lru-window) (selected-window)))
 		     (b (window-buffer w)))
--- a/lisp/emulation/viper-keym.el	Thu Mar 28 21:21:18 1996 +0000
+++ b/lisp/emulation/viper-keym.el	Fri Mar 29 01:02:28 1996 +0000
@@ -1,6 +1,6 @@
 ;;; viper-keym.el --- Viper keymaps
 
-;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -19,6 +19,8 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;; Code
+
 (require 'viper-util)
 
 ;;; Variables
--- a/lisp/emulation/viper-macs.el	Thu Mar 28 21:21:18 1996 +0000
+++ b/lisp/emulation/viper-macs.el	Fri Mar 29 01:02:28 1996 +0000
@@ -1,6 +1,6 @@
 ;;; viper-macs.el --- functions implementing keyboard macros for Viper
 
-;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -19,7 +19,11 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;; Code
+
 (require 'viper-util)
+(require 'viper-keym)
+
 
 ;;; Variables
 
--- a/lisp/emulation/viper-mous.el	Thu Mar 28 21:21:18 1996 +0000
+++ b/lisp/emulation/viper-mous.el	Fri Mar 29 01:02:28 1996 +0000
@@ -1,6 +1,6 @@
 ;;; viper-mous.el --- mouse support for Viper
 
-;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -19,8 +19,15 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;; Code
+
 (require 'viper-util)
 
+;; compiler pacifier
+(defvar double-click-time)
+(defvar mouse-track-multi-click-time)
+;; end compiler pacifier
+
 
 ;;; Variables
   
--- a/lisp/emulation/viper-util.el	Thu Mar 28 21:21:18 1996 +0000
+++ b/lisp/emulation/viper-util.el	Fri Mar 29 01:02:28 1996 +0000
@@ -1,6 +1,6 @@
 ;;; viper-util.el --- Utilities used by viper.el
 
-;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -19,11 +19,34 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+
+;; Code
+
 (require 'ring)
 
-;; Whether it is XEmacs or not
+;; Compiler pacifier
+(defvar vip-overriding-map)
+(defvar pm-color-alist)
+(defvar zmacs-region-stays)
+(defvar vip-search-face)
+(defvar vip-minibuffer-current-face)
+(defvar vip-minibuffer-insert-face)
+(defvar vip-minibuffer-vi-face)
+(defvar vip-minibuffer-emacs-face)
+(defvar vip-replace-overlay-face)
+(defvar vip-minibuffer-overlay)
+(defvar vip-replace-overlay)
+(defvar vip-search-overlay)
+(defvar vip-replace-overlay-cursor-color)
+(defvar vip-intermediate-command)
+(defvar vip-use-replace-region-delimiters)
+(defvar vip-fast-keyseq-timeout)
+(defvar vip-related-files-and-buffers-ring)
+;; end compiler pacifier
+
+;; Is it XEmacs?
 (defconst vip-xemacs-p (string-match "\\(Lucid\\|XEmacs\\)" emacs-version))
-;; Whether it is Emacs or not
+;; Is it Emacs?
 (defconst vip-emacs-p (not vip-xemacs-p))
 ;; Tell whether we are running as a window application or on a TTY
 (defsubst vip-device-type ()
@@ -165,6 +188,9 @@
   (if vip-emacs-p
       (x-display-color-p)
     (eq (device-class (selected-device)) 'color)))
+   
+(defsubst vip-get-cursor-color ()
+  (cdr (assoc 'cursor-color (frame-parameters))))
   
 ;; OS/2
 (cond ((eq (vip-device-type) 'pm)
@@ -205,9 +231,6 @@
 (defsubst vip-restore-cursor-color ()
   (vip-change-cursor-color
    (vip-overlay-get vip-replace-overlay 'vip-cursor-color)))
-   
-(defsubst vip-get-cursor-color ()
-  (cdr (assoc 'cursor-color (frame-parameters))))
 	 
 
 ;; Check the current version against the major and minor version numbers
@@ -574,10 +597,16 @@
 
 ;; Replace state
 
+(defsubst vip-move-replace-overlay (beg end)
+  (vip-move-overlay vip-replace-overlay beg end))
+  
 (defun vip-set-replace-overlay (beg end)
   (if (vip-overlay-p vip-replace-overlay)
       (vip-move-replace-overlay beg end)
     (setq vip-replace-overlay (vip-make-overlay beg end (current-buffer)))
+    ;; never detach
+    (vip-overlay-put
+     vip-replace-overlay (if vip-emacs-p 'evaporate 'detachable) nil)
     (vip-overlay-put 
      vip-replace-overlay 'priority vip-replace-overlay-priority)) 
   (if (vip-has-face-support-p)
@@ -586,12 +615,6 @@
   (vip-change-cursor-color vip-replace-overlay-cursor-color)
   )
   
-  
-(defsubst vip-hide-replace-overlay ()
-  (vip-set-replace-overlay-glyphs nil nil)
-  (vip-restore-cursor-color)
-  (if (vip-has-face-support-p)
-      (vip-overlay-put vip-replace-overlay 'face nil)))
       
 (defsubst vip-set-replace-overlay-glyphs (before-glyph after-glyph)
   (if (or (not (vip-has-face-support-p))
@@ -600,16 +623,18 @@
 	    (after-name (if vip-xemacs-p 'end-glyph 'after-string)))
 	(vip-overlay-put vip-replace-overlay before-name before-glyph)
 	(vip-overlay-put vip-replace-overlay after-name after-glyph))))
+  
+(defsubst vip-hide-replace-overlay ()
+  (vip-set-replace-overlay-glyphs nil nil)
+  (vip-restore-cursor-color)
+  (if (vip-has-face-support-p)
+      (vip-overlay-put vip-replace-overlay 'face nil)))
 
     
 (defsubst vip-replace-start ()
   (vip-overlay-start vip-replace-overlay))
 (defsubst vip-replace-end ()
   (vip-overlay-end vip-replace-overlay))
-  
-(defsubst vip-move-replace-overlay (beg end)
-  (vip-move-overlay vip-replace-overlay beg end)
-  )
  
 
 ;; Minibuffer
@@ -622,13 +647,15 @@
 	 vip-minibuffer-overlay 'face vip-minibuffer-current-face)
 	(vip-overlay-put 
 	 vip-minibuffer-overlay 'priority vip-minibuffer-overlay-priority)
-	;; prevent detachment and make vip-minibuffer-overlay open-ended
+	;; never detach
+	(vip-overlay-put
+	 vip-minibuffer-overlay (if vip-emacs-p 'evaporate 'detachable) nil)
+	;; make vip-minibuffer-overlay open-ended
 	;; In emacs, it is made open ended at creation time
-	(if vip-emacs-p
-	    (vip-overlay-put vip-minibuffer-overlay 'evaporate nil)
-	  (vip-overlay-put vip-minibuffer-overlay 'detachable nil)
-	  (vip-overlay-put vip-minibuffer-overlay 'start-open nil) 
-	  (vip-overlay-put vip-minibuffer-overlay 'end-open nil))
+	(if vip-xemacs-p
+	    (progn
+	      (vip-overlay-put vip-minibuffer-overlay 'start-open nil)
+	      (vip-overlay-put vip-minibuffer-overlay 'end-open nil)))
 	)))
        
 (defun vip-check-minibuffer-overlay ()
@@ -636,8 +663,9 @@
       (setq vip-minibuffer-overlay
 	    (if vip-xemacs-p
 		(vip-make-overlay 1 (1+ (buffer-size)) (current-buffer))
-	      ;; don't move front, move rear
-	      (vip-make-overlay 1 (1+ (buffer-size)) (current-buffer) nil t)))
+	      ;; make overlay open-ended
+	      (vip-make-overlay
+	       1 (1+ (buffer-size)) (current-buffer) nil 'rear-advance)))
       ))
 
 
@@ -667,16 +695,17 @@
 	(key (vip-event-key event)))
     (member key ESC-keys)))
 	
+  
+(defsubst vip-mark-marker ()
+  (if vip-xemacs-p
+      (mark-marker t)
+    (mark-marker)))
+
 ;; like (set-mark-command nil) but doesn't push twice, if (car mark-ring)
 ;; is the same as (mark t).
 (defsubst vip-set-mark-if-necessary ()
   (setq mark-ring (delete (vip-mark-marker) mark-ring))
   (set-mark-command nil))
-  
-(defsubst vip-mark-marker ()
-  (if vip-xemacs-p
-      (mark-marker t)
-    (mark-marker)))
        
 ;; In transient mark mode (zmacs mode), it is annoying when regions become
 ;; highlighted due to Viper's pushing marks. So, we deactivate marks, unless
--- a/lisp/emulation/viper.el	Thu Mar 28 21:21:18 1996 +0000
+++ b/lisp/emulation/viper.el	Fri Mar 29 01:02:28 1996 +0000
@@ -6,11 +6,11 @@
 ;;  Keywords: emulations
 ;;  Author: Michael Kifer <kifer@cs.sunysb.edu>
 
-(defconst viper-version "2.85 of February 14, 1996"
+;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+
+(defconst viper-version "2.86 of March 14, 1996"
   "The current version of Viper")
 
-;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
@@ -293,6 +293,7 @@
 ;;    much easier.
 ;;
 
+;; Code
 
 (require 'advice)
 (require 'cl)
@@ -300,6 +301,15 @@
 
 (require 'viper-util)
 
+;; Compiler pacifier
+(defvar vip-minibuffer-current-face)
+(defvar vip-minibuffer-insert-face)
+(defvar vip-minibuffer-vi-face)
+(defvar vip-minibuffer-emacs-face)
+(defvar iso-accents-mode)
+(defvar zmacs-region-stays)
+;; end pacifier
+
 
 ;;; Variables
 	      
@@ -2417,11 +2427,11 @@
       (end-of-line)
       ;; make sure all lines end with newline, unless in the minibuffer or
       ;; when requested otherwise (require-final-newline is nil)
-      (if (and
-	   (eobp)
-	   (not (bolp))
-	   require-final-newline
-	   (not (vip-is-in-minibuffer)))
+      (if (and (eobp)
+	       (not (bolp))
+	       require-final-newline
+	       (not (vip-is-in-minibuffer))
+	       (not buffer-read-only))
 	  (insert "\n"))))
 
 (defun vip-yank-defun ()