comparison lisp/simple.el @ 72254:42b0c9d6a376

* simple.el (line-move-to-column): Constrain move-to-column to current field.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 03 Aug 2006 14:26:27 +0000
parents 205070e11ae3
children b11613448626
comparison
equal deleted inserted replaced
72253:27bf187aaf90 72254:42b0c9d6a376
3695 This function works only in certain cases, 3695 This function works only in certain cases,
3696 because what we really need is for `move-to-column' 3696 because what we really need is for `move-to-column'
3697 and `current-column' to be able to ignore invisible text." 3697 and `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))))
3704 (let ((normal-location (point)) 3707 (let ((normal-location (point))
3705 (normal-column (current-column))) 3708 (normal-column (current-column)))