]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/viper-cmd.el
Fix byte-compiler warnings about looking-back.
[gnu-emacs] / lisp / emulation / viper-cmd.el
index bd03a870fdb3f811e8ca479df19d2ddc5375cc56..5c91df9016687226dcbc4db59794820bfdd7a9dd 100644 (file)
@@ -4533,7 +4533,7 @@ One can use `` and '' to temporarily jump 1 step back."
   (interactive)
   (if viper-cted
       (let ((p (point)) (c (current-column)) bol (indent t))
-       (if (looking-back "[0^]")
+       (if (looking-back "[0^]" (1- (point)))
            (progn
              (if (eq ?^ (preceding-char))
                  (setq viper-preserve-indent t))
@@ -4545,7 +4545,7 @@ One can use `` and '' to temporarily jump 1 step back."
        (delete-region (point) p)
        (if indent
            (indent-to (- c viper-shift-width)))
-       (if (or (bolp) (looking-back "[^ \t]"))
+       (if (or (bolp) (looking-back "[^ \t]" (1- (point))))
            (setq viper-cted nil)))))
 
 ;; do smart indent