From: Richard M. Stallman Date: Fri, 24 Jun 2005 21:12:07 +0000 (+0000) Subject: (line-move-1): Fix previous change. X-Git-Tag: emacs-pretest-22.0.90~8658 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=19cfc561f4ab393dcc5372b7e97d252009bec14e;p=emacs.git (line-move-1): Fix previous change. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f15073167a2..f1552757440 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-24 Richard M. Stallman + + * simple.el (line-move-1): Fix previous change. + 2005-06-24 Juanma Barranquero * replace.el (occur-1): Set `buffer-read-only' and the diff --git a/lisp/simple.el b/lisp/simple.el index 9f99f2d2b60..b8dc0a7df9d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3442,18 +3442,14 @@ Outline mode sets this." (when (and (not done) (not (integerp selective-display)) (not (line-move-invisible-p (point)))) - ;; We avoid vertical-motion when possible - ;; because that has to fontify. - (forward-line 1) - ;; If there are overlays in and around - ;; the text we moved over, we need to be - ;; sophisticated. (unless (overlays-in (max (1- pos-before) (point-min)) (min (1+ (point)) (point-max))) + ;; We avoid vertical-motion when possible + ;; because that has to fontify. + (forward-line 1) (setq line-done t))) - ;; Otherwise move a more sophisticated way. - ;; (What's the logic behind this code?) (and (not done) (not line-done) + ;; Otherwise move a more sophisticated way. (zerop (vertical-motion 1)) (if (not noerror) (signal 'end-of-buffer nil) @@ -3473,9 +3469,9 @@ Outline mode sets this." (when (and (not done) (not (integerp selective-display)) (not (line-move-invisible-p (1- (point))))) - (forward-line -1) (unless (overlays-in (max (1- (point)) (point-min)) (min (1+ pos-before) (point-max))) + (forward-line -1) (setq line-done t))) (and (not done) (not line-done) (zerop (vertical-motion -1))