Function: beginning-of-line-text

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

Signature

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

Documentation

Move to the beginning of the text on this line.

With optional argument N, move forward N-1 lines first.

From the beginning of the line, moves past the left-margin indentation, the fill-prefix, and any indentation used for centering or right-justifying the line, but does not move past any whitespace that was explicitly inserted (such as a tab used to indent the first line of a paragraph).

Probably introduced at or before Emacs version 19.29.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/indent.el.gz
(defun beginning-of-line-text (&optional n)
  "Move to the beginning of the text on this line.

With optional argument N, move forward N-1 lines first.

From the beginning of the line, moves past the `left-margin'
indentation, the `fill-prefix', and any indentation used for
centering or right-justifying the line, but does not move past
any whitespace that was explicitly inserted (such as a tab used
to indent the first line of a paragraph)."
  (interactive "^p")
  (beginning-of-line n)
  (skip-chars-forward " \t")
  ;; Skip over fill-prefix.
  (if (and fill-prefix
	   (not (string-equal fill-prefix "")))
      (if (equal fill-prefix
		 (buffer-substring
		  (point) (min (point-max) (+ (length fill-prefix) (point)))))
	  (forward-char (length fill-prefix)))
    (if (and adaptive-fill-mode adaptive-fill-regexp
	     (looking-at adaptive-fill-regexp))
	(goto-char (match-end 0))))
  ;; Skip centering or flushright indentation
  (if (memq (current-justification) '(center right))
      (skip-chars-forward " \t")))