Index: simple.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v retrieving revision 1.786 diff -c -p -r1.786 simple.el *** simple.el 23 Jan 2006 04:05:59 -0000 1.786 --- simple.el 26 Jan 2006 02:52:52 -0000 *************** and `current-column' to be able to ignor *** 3691,3705 **** (defun move-end-of-line (arg) "Move point to end of current line as displayed. ! \(If there's an image in the line, this disregards newlines ! which are part of the text that the image rests on.) With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. ! To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (interactive "p") (or arg (setq arg 1)) ! (let (done) (while (not done) (let ((newpos (save-excursion --- 3691,3712 ---- (defun move-end-of-line (arg) "Move point to end of current line as displayed. ! \(This disregards invisible newlines such as those ! which are part of the text that an image rests on.) With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. ! To ignore intangibility, bind `inhibit-point-motion-hooks' to t. ! ! This function does not move point across a field boundary unless that ! would move point to a different line than the original, unconstrained ! result. If N is nil or 1, and a rear-sticky field ends at point, ! the point does not move. To ignore field boundaries bind ! `inhibit-field-text-motion' to t." (interactive "p") (or arg (setq arg 1)) ! (let ((orig (point)) ! done) (while (not done) (let ((newpos (save-excursion *************** To ignore intangibility, bind `inhibit-p *** 3721,3749 **** ;; and now we're not really at eol, ;; keep going. (setq arg 1) ! (setq done t))))))) (defun move-beginning-of-line (arg) "Move point to beginning of current line as displayed. ! \(If there's an image in the line, this disregards newlines ! which are part of the text that the image rests on.) With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. ! To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (interactive "p") (or arg (setq arg 1)) (if (/= arg 1) (line-move (1- arg) t)) - - ;; Move to beginning-of-line, ignoring fields and invisibles. - (skip-chars-backward "^\n") - (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) - (goto-char (previous-char-property-change (1- (point)))) - (skip-chars-backward "^\n")) (let ((orig (point))) (vertical-motion 0) (if (/= orig (point)) (goto-char (constrain-to-field (point) orig (/= arg 1) t nil))))) --- 3728,3764 ---- ;; and now we're not really at eol, ;; keep going. (setq arg 1) ! (setq done t))))) ! (if (/= orig (point)) ! (goto-char (constrain-to-field (point) orig (/= arg 1) t nil))))) (defun move-beginning-of-line (arg) "Move point to beginning of current line as displayed. ! \(This disregards invisible newlines such as those ! which are part of the text that an image rests on.) With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. ! To ignore intangibility, bind `inhibit-point-motion-hooks' to t. ! ! This function does not move point across a field boundary unless that ! would move point to a different line than the original, unconstrained ! result. If N is nil or 1, and a front-sticky field starts at point, ! the point does not move. To ignore field boundaries bind ! `inhibit-field-text-motion' to t." (interactive "p") (or arg (setq arg 1)) (if (/= arg 1) (line-move (1- arg) t)) (let ((orig (point))) + ;; Move to beginning-of-line, ignoring fields and invisibles. + (skip-chars-backward "^\n") + (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) + (goto-char (previous-char-property-change (point))) + (skip-chars-backward "^\n")) (vertical-motion 0) (if (/= orig (point)) (goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))))