aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-06-03 22:56:56 +0000
committerChong Yidong2008-06-03 22:56:56 +0000
commit2a1e0c92c318a2c0ba436b4435cd0fe2f7f75261 (patch)
tree44a888ac2a502fed24fa1c7c5b9c850b5f68943a
parent36b3ea1494659b5a0eb760025b506bec34ff219f (diff)
downloademacs-2a1e0c92c318a2c0ba436b4435cd0fe2f7f75261.tar.gz
emacs-2a1e0c92c318a2c0ba436b4435cd0fe2f7f75261.zip
(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.el15
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."
4059 (= arg 0)) 4059 (= arg 0))
4060 4060
4061 (cond ((> arg 0) 4061 (cond ((> arg 0)
4062 ;; If we did not move down as far as desired, 4062 ;; If we did not move down as far as desired, at least go
4063 ;; at least go to end of line. 4063 ;; to end of line. Be sure to call point-entered and
4064 (end-of-line)) 4064 ;; point-left-hooks.
4065 (let* ((npoint (prog1 (line-end-position)
4066 (goto-char opoint)))
4067 (inhibit-point-motion-hooks nil))
4068 (goto-char npoint)))
4065 ((< arg 0) 4069 ((< arg 0)
4066 ;; If we did not move up as far as desired, 4070 ;; If we did not move up as far as desired,
4067 ;; at least go to beginning of line. 4071 ;; at least go to beginning of line.
4068 (beginning-of-line)) 4072 (let* ((npoint (prog1 (line-beginning-position)
4073 (goto-char opoint)))
4074 (inhibit-point-motion-hooks nil))
4075 (goto-char npoint)))
4069 (t 4076 (t
4070 (line-move-finish (or goal-column temporary-goal-column) 4077 (line-move-finish (or goal-column temporary-goal-column)
4071 opoint (> orig-arg 0))))))) 4078 opoint (> orig-arg 0)))))))