# HG changeset patch # User Juanma Barranquero # Date 1053826477 0 # Node ID b86109f9a82914fddd99c6f94d523b7d5e4cd2d8 # Parent 815164749c9a1b06a9c79a20c4d51b37bbf2ce3e (forward-visible-line): Fix negative arguments. diff -r 815164749c9a -r b86109f9a829 lisp/simple.el --- a/lisp/simple.el Sun May 25 01:31:48 2003 +0000 +++ b/lisp/simple.el Sun May 25 01:34:37 2003 +0000 @@ -2265,8 +2265,8 @@ (unless (bolp) (goto-char opoint)))) (let ((first t)) - (while (or first (< arg 0)) - (if (zerop arg) + (while (or first (<= arg 0)) + (if first (beginning-of-line) (or (zerop (forward-line -1)) (signal 'beginning-of-buffer nil))) @@ -2275,13 +2275,12 @@ (unless (bobp) (let ((prop (get-char-property (1- (point)) 'invisible))) - (if (if (eq buffer-invisibility-spec t) - prop - (or (memq prop buffer-invisibility-spec) - (assq prop buffer-invisibility-spec))) - (setq arg (1+ arg))))) - (setq first nil) - (setq arg (1+ arg))) + (unless (if (eq buffer-invisibility-spec t) + prop + (or (memq prop buffer-invisibility-spec) + (assq prop buffer-invisibility-spec))) + (setq arg (1+ arg))))) + (setq first nil)) ;; If invisible text follows, and it is a number of complete lines, ;; skip it. (let ((opoint (point)))