aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorMiles Bader2006-08-16 14:08:49 +0000
committerMiles Bader2006-08-16 14:08:49 +0000
commitde20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65 (patch)
tree80243ce02b52cbf7945c614bd213dd63142b861a /lisp/simple.el
parent7a5c2a42040b12b037940a067aee6ac6fde01680 (diff)
parent5ebdc2990a95cc38b21f772eea4de3ceee149e54 (diff)
downloademacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.tar.gz
emacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 382-398) - Update from CVS - Update from erc--emacs--22 - Fix ERC bug introduced in last patch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 123-125) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el30
1 files changed, 24 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 204684a3d5b..86b3af702e4 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3697,7 +3697,10 @@ because what we really need is for `move-to-column'
3697and `current-column' to be able to ignore invisible text." 3697and `current-column' to be able to ignore invisible text."
3698 (if (zerop col) 3698 (if (zerop col)
3699 (beginning-of-line) 3699 (beginning-of-line)
3700 (move-to-column col)) 3700 (let ((opoint (point)))
3701 (move-to-column col)
3702 ;; move-to-column doesn't respect field boundaries.
3703 (goto-char (constrain-to-field (point) opoint))))
3701 3704
3702 (when (and line-move-ignore-invisible 3705 (when (and line-move-ignore-invisible
3703 (not (bolp)) (line-move-invisible-p (1- (point)))) 3706 (not (bolp)) (line-move-invisible-p (1- (point))))
@@ -3767,7 +3770,8 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
3767 (interactive "p") 3770 (interactive "p")
3768 (or arg (setq arg 1)) 3771 (or arg (setq arg 1))
3769 3772
3770 (let ((orig (point))) 3773 (let ((orig (point))
3774 start first-vis first-vis-field-value)
3771 3775
3772 ;; Move by lines, if ARG is not 1 (the default). 3776 ;; Move by lines, if ARG is not 1 (the default).
3773 (if (/= arg 1) 3777 (if (/= arg 1)
@@ -3778,10 +3782,24 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
3778 (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) 3782 (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
3779 (goto-char (previous-char-property-change (point))) 3783 (goto-char (previous-char-property-change (point)))
3780 (skip-chars-backward "^\n")) 3784 (skip-chars-backward "^\n"))
3781 3785 (setq start (point))
3782 ;; Take care of fields. 3786
3783 (goto-char (constrain-to-field (point) orig 3787 ;; Now find first visible char in the line
3784 (/= arg 1) t nil)))) 3788 (while (and (not (eobp)) (line-move-invisible-p (point)))
3789 (goto-char (next-char-property-change (point))))
3790 (setq first-vis (point))
3791
3792 ;; See if fields would stop us from reaching FIRST-VIS.
3793 (setq first-vis-field-value
3794 (constrain-to-field first-vis orig (/= arg 1) t nil))
3795
3796 (goto-char (if (/= first-vis-field-value first-vis)
3797 ;; If yes, obey them.
3798 first-vis-field-value
3799 ;; Otherwise, move to START with attention to fields.
3800 ;; (It is possible that fields never matter in this case.)
3801 (constrain-to-field (point) orig
3802 (/= arg 1) t nil)))))
3785 3803
3786 3804
3787;;; Many people have said they rarely use this feature, and often type 3805;;; Many people have said they rarely use this feature, and often type