Function: beginning-of-buffer
beginning-of-buffer is an interactive and byte-compiled function
defined in simple.el.gz.
Signature
(beginning-of-buffer &optional ARG)
Documentation
Move point to the beginning of the buffer.
With numeric arg N, put point N/10 of the way from the beginning. If the buffer is narrowed, this command uses the beginning of the accessible part of the buffer.
Push mark at previous position, unless either a C-u (universal-argument) prefix
is supplied, or Transient Mark mode is enabled and the mark is active.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun beginning-of-buffer (&optional arg)
"Move point to the beginning of the buffer.
With numeric arg N, put point N/10 of the way from the beginning.
If the buffer is narrowed, this command uses the beginning of the
accessible part of the buffer.
Push mark at previous position, unless either a \\[universal-argument] prefix
is supplied, or Transient Mark mode is enabled and the mark is active."
(declare (interactive-only "use `(goto-char (point-min))' instead."))
(interactive "^P")
(or (consp arg)
(region-active-p)
(push-mark))
(let ((size (- (point-max) (point-min))))
(goto-char (if (and arg (not (consp arg)))
(+ (point-min) 1
(/ (* size (prefix-numeric-value arg)) 10))
(point-min))))
(if (and arg (not (consp arg))) (forward-line 1)))