Function: beginning-of-visual-line

beginning-of-visual-line is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(beginning-of-visual-line &optional N)

Documentation

Move point to beginning of current visual line.

With argument N not nil or 1, move forward N - 1 visual lines first. If point reaches the beginning or end of buffer, it stops there.
(But if the buffer doesn't end in a newline, it stops at the
beginning of the last visual line.) To ignore intangibility, bind inhibit-point-motion-hooks to t.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun beginning-of-visual-line (&optional n)
  "Move point to beginning of current visual line.
With argument N not nil or 1, move forward N - 1 visual lines first.
If point reaches the beginning or end of buffer, it stops there.
\(But if the buffer doesn't end in a newline, it stops at the
beginning of the last visual line.)
To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
  (interactive "^p")
  (or n (setq n 1))
  (let ((opoint (point)))
    (if (/= n 1)
	(let ((line-move-visual t))
	  (line-move (1- n) t)))
    (vertical-motion 0)
    ;; Constrain to field boundaries, like `move-beginning-of-line'.
    (goto-char (constrain-to-field (point) opoint (/= n 1)))))