diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-06-03 22:56:56 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-06-03 22:56:56 +0000 |
commit | 2a1e0c92c318a2c0ba436b4435cd0fe2f7f75261 (patch) | |
tree | 44a888ac2a502fed24fa1c7c5b9c850b5f68943a | |
parent | 36b3ea1494659b5a0eb760025b506bec34ff219f (diff) | |
download | emacs-2a1e0c92c318a2c0ba436b4435cd0fe2f7f75261.tar.gz |
(line-move-1): If we did not move as far as desired, ensure that
point-left and point-entered hooks are called.
-rw-r--r-- | lisp/simple.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 118bb715ec8..8367ae9ba10 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4059,13 +4059,20 @@ Outline mode sets this." (= 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))))))) |