From: Stefan Monnier Date: Mon, 20 Jan 2014 19:15:10 +0000 (-0500) Subject: * lisp/simple.el (move-beginning-of-line): Make sure we don't move forward. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~324 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6cc750eec443c58c48b0fbf0ee65f2de8052cccf;p=emacs.git * lisp/simple.el (move-beginning-of-line): Make sure we don't move forward. Fixes: debbugs:16497 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3a838762a1b..98df632bf89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-01-20 Stefan Monnier + + * simple.el (move-beginning-of-line): Make sure we don't move forward + (bug#16497). + 2014-01-20 Juri Linkov * saveplace.el (toggle-save-place, save-place-to-alist) diff --git a/lisp/simple.el b/lisp/simple.el index ef965aa6fe5..8e23b0804ca 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5534,9 +5534,9 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (goto-char (previous-char-property-change (point))) (skip-chars-backward "^\n")) - ;; Now find first visible char in the line - (while (and (not (eobp)) (invisible-p (point))) - (goto-char (next-char-property-change (point)))) + ;; Now find first visible char in the line. + (while (and (< (point) orig) (invisible-p (point))) + (goto-char (next-char-property-change (point) orig))) (setq first-vis (point)) ;; See if fields would stop us from reaching FIRST-VIS.