changeset 22284:7c92be9aea04

(viper-skip-syntax): Bug fix for eob/bob cases.
author Karl Heuer <kwzh@gnu.org>
date Sat, 30 May 1998 14:29:25 +0000
parents 3649674ebf29
children 2e952bf93040
files lisp/emulation/viper-util.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/viper-util.el	Sat May 30 14:28:56 1998 +0000
+++ b/lisp/emulation/viper-util.el	Sat May 30 14:29:25 1998 +0000
@@ -1295,7 +1295,10 @@
 		(t nil)))
     (if (memq ?^ syntax) (setq negated-syntax t))
 
-    (while (and (not (= local 0)) (not (eobp)))
+    (while (and (not (= local 0)) 
+		(cond ((eq direction 'forward) 
+		       (not (eobp)))
+		      (t (not (bobp)))))
       (setq char-looked-at (viper-char-at-pos direction)
 	    ;; if outside the range, set to nil
 	    syntax-of-char-looked-at (if char-looked-at