diff lisp/emulation/viper-cmd.el @ 91367:c70e45a7acfd

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
author Miles Bader <miles@gnu.org>
date Wed, 30 Jan 2008 07:57:28 +0000
parents 606f2d163a64 f2c8fd594360
children
line wrap: on
line diff
--- a/lisp/emulation/viper-cmd.el	Wed Jan 30 06:40:42 2008 +0000
+++ b/lisp/emulation/viper-cmd.el	Wed Jan 30 07:57:28 2008 +0000
@@ -47,6 +47,9 @@
 (defvar initial)
 (defvar undo-beg-posn)
 (defvar undo-end-posn)
+
+(eval-and-compile
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  r))))
 ;; end pacifier
 
 
@@ -2773,7 +2776,9 @@
 (defun viper-next-line-carefully (arg)
   (condition-case nil
       ;; do not use forward-line! need to keep column
-      (with-no-warnings (next-line arg))
+      (if (featurep 'emacs)
+	  (with-no-warnings (next-line arg))
+	(next-line arg))
     (error nil)))
 
 
@@ -3073,7 +3078,9 @@
 	(com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
     ;; do not use forward-line! need to keep column
-    (with-no-warnings (next-line val))
+    (if (featurep 'emacs)
+	(with-no-warnings (next-line val))
+      (next-line val))
     (if viper-ex-style-motion
 	(if (and (eolp) (not (bolp))) (backward-char 1)))
     (setq this-command 'next-line)
@@ -3120,7 +3127,9 @@
 	(com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
     ;; do not use forward-line! need to keep column
-    (with-no-warnings (previous-line val))
+    (if (featurep 'emacs)
+	(with-no-warnings (previous-line val))
+      (previous-line val))
     (if viper-ex-style-motion
 	(if (and (eolp) (not (bolp))) (backward-char 1)))
     (setq this-command 'previous-line)