Convert consecutive FSF copyright years to ranges.
[bpt/emacs.git] / lisp / emulation / viper.el
index c6194c6..0da3345 100644 (file)
@@ -3,11 +3,11 @@
 ;;              and a venomous VI PERil.
 ;;              Viper Is also a Package for Emacs Rebels.
 
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2011 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Keywords: emulations
+;; Version: 3.14.1
 
 ;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this
 ;; file on 20/3/2008, and the maintainer agreed that when a bug is
@@ -866,25 +866,17 @@ It also can't undo some Viper settings."
               ))
 
   ;; Tell vc-diff to put *vc* in Vi mode
-  (if (featurep 'vc)
-      (defadvice vc-diff (after viper-vc-ad activate)
-       "Force Vi state in VC diff buffer."
-       (viper-change-state-to-vi))
-    (eval-after-load
-     "vc"
-     '(defadvice vc-diff (after viper-vc-ad activate)
-       "Force Vi state in VC diff buffer."
-       (viper-change-state-to-vi))))
+  (eval-after-load
+      "vc"
+    '(defadvice vc-diff (after viper-vc-ad activate)
+       "Force Vi state in VC diff buffer."
+       (viper-change-state-to-vi)))
 
   (eval-after-load
    "emerge"
    '(defadvice emerge-quit (after viper-emerge-advice activate)
       "Run `viper-change-state-to-vi' after quitting emerge."
       (viper-change-state-to-vi)))
-  ;; In case Emerge was loaded before Viper.
-  (defadvice emerge-quit (after viper-emerge-advice activate)
-    "Run `viper-change-state-to-vi' after quitting emerge."
-    (viper-change-state-to-vi))
 
   ;; passwd.el sets up its own buffer, which turns up in Vi mode,
   ;; thus overriding the local map.  We don't need Vi mode here.
@@ -897,7 +889,10 @@ It also can't undo some Viper settings."
   (defadvice self-insert-command (around viper-self-insert-ad activate)
     "Ignore all self-inserting keys in the vi-state."
     (if (and (eq viper-current-state 'vi-state)
-            (called-interactively-p 'interactive))
+            ;; Do not use called-interactively-p here. XEmacs does not have it
+            ;; and interactive-p is just fine.
+            ;; (called-interactively-p 'interactive))
+            (interactive-p))
        (beep 1)
       ad-do-it
       ))
@@ -943,10 +938,6 @@ It also can't undo some Viper settings."
    '(defadvice rmail-cease-edit (after viper-rmail-advice activate)
       "Switch to Emacs state when done editing message."
       (viper-change-state-to-emacs)))
-  ;; In case RMAIL was loaded before Viper.
-  (defadvice rmail-cease-edit (after viper-rmail-advice activate)
-    "Switch to emacs state when done editing message."
-    (viper-change-state-to-emacs))
 
   ;; ISO accents
   ;; Need to do it after loading iso-acc, or else this loading will wipe out
@@ -1383,5 +1374,4 @@ These two lines must come in the order given.
 ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
 ;; End:
 
-;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79
 ;;; viper.el ends here