Mercurial > emacs
changeset 95526:437d3830a398
(line-move-1): If we did not move as far as desired, ensure that
point-left and point-entered hooks are called.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 03 Jun 2008 22:56:56 +0000 |
parents | 680cb50d70c0 |
children | 0f9689c194e6 |
files | lisp/simple.el |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Tue Jun 03 22:56:16 2008 +0000 +++ b/lisp/simple.el Tue Jun 03 22:56:56 2008 +0000 @@ -4059,13 +4059,20 @@ (= arg 0)) (cond ((> arg 0) - ;; If we did not move down as far as desired, - ;; at least go to end of line. - (end-of-line)) + ;; If we did not move down as far as desired, at least go + ;; to end of line. Be sure to call point-entered and + ;; point-left-hooks. + (let* ((npoint (prog1 (line-end-position) + (goto-char opoint))) + (inhibit-point-motion-hooks nil)) + (goto-char npoint))) ((< arg 0) ;; If we did not move up as far as desired, ;; at least go to beginning of line. - (beginning-of-line)) + (let* ((npoint (prog1 (line-beginning-position) + (goto-char opoint))) + (inhibit-point-motion-hooks nil)) + (goto-char npoint))) (t (line-move-finish (or goal-column temporary-goal-column) opoint (> orig-arg 0)))))))