Function: minibuffer-beginning-of-buffer
minibuffer-beginning-of-buffer is an interactive and byte-compiled
function defined in minibuffer.el.gz.
Signature
(minibuffer-beginning-of-buffer &optional ARG)
Documentation
Move to the logical beginning of the minibuffer.
This command behaves like beginning-of-buffer, but if point is
after the end of the prompt, move to the end of the prompt.
Otherwise move to the start of the buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun minibuffer-beginning-of-buffer (&optional arg)
"Move to the logical beginning of the minibuffer.
This command behaves like `beginning-of-buffer', but if point is
after the end of the prompt, move to the end of the prompt.
Otherwise move to the start of the buffer."
(declare (interactive-only "use `(goto-char (point-min))' instead."))
(interactive "^P")
(when (or (consp arg)
(region-active-p))
(push-mark))
(goto-char (cond
;; We want to go N/10th of the way from the beginning.
((and arg (not (consp arg)))
(+ (point-min) 1
(/ (* (- (point-max) (point-min))
(prefix-numeric-value arg))
10)))
;; Go to the start of the buffer.
((or (null minibuffer-beginning-of-buffer-movement)
(<= (point) (minibuffer-prompt-end)))
(point-min))
;; Go to the end of the minibuffer.
(t
(minibuffer-prompt-end))))
(when (and arg (not (consp arg)))
(forward-line 1)))