comparison lisp/simple.el @ 83268:7ea3d7198adc

Merged from miles@gnu.org--gnu-2005 (patch 160-161) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-160 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-161 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-308
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 16 Mar 2005 16:03:44 +0000
parents c7d2b6ee3a80 47a57ff1da21
children 48ba3f89c89f
comparison
equal deleted inserted replaced
83267:c7d2b6ee3a80 83268:7ea3d7198adc
3519 ;; and now we're not really at eol, 3519 ;; and now we're not really at eol,
3520 ;; keep going. 3520 ;; keep going.
3521 (setq arg 1) 3521 (setq arg 1)
3522 (setq done t))))))) 3522 (setq done t)))))))
3523 3523
3524 (defun move-beginning-of-line (arg)
3525 "Move point to beginning of current display line.
3526 With argument ARG not nil or 1, move forward ARG - 1 lines first.
3527 If point reaches the beginning or end of buffer, it stops there.
3528 To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
3529
3530 This command does not move point across a field boundary unless doing so
3531 would move beyond there to a different line; if ARG is nil or 1, and
3532 point starts at a field boundary, point does not move. To ignore field
3533 boundaries bind `inhibit-field-text-motion' to t."
3534 (interactive "p")
3535 (or arg (setq arg 1))
3536 (if (/= arg 1)
3537 (line-move (1- arg) t))
3538 (let (done pos)
3539 (while (not done)
3540 (beginning-of-line 1)
3541 ;; (not bolp) means that it stopped at a field boundary.
3542 (if (or (bobp) (not (bolp)))
3543 (setq done t)
3544 (sit-for 0)
3545 (if (and (consp (setq pos (pos-visible-in-window-p (point) nil t)))
3546 (= (car pos) 0))
3547 (setq done t)
3548 (backward-char 1))))))
3549
3550
3524 ;;; Many people have said they rarely use this feature, and often type 3551 ;;; Many people have said they rarely use this feature, and often type
3525 ;;; it by accident. Maybe it shouldn't even be on a key. 3552 ;;; it by accident. Maybe it shouldn't even be on a key.
3526 (put 'set-goal-column 'disabled t) 3553 (put 'set-goal-column 'disabled t)
3527 3554
3528 (defun set-goal-column (arg) 3555 (defun set-goal-column (arg)