Function: minibuffer-prompt-end

minibuffer-prompt-end is a function defined in minibuf.c.

Signature

(minibuffer-prompt-end)

Documentation

Return the buffer position of the end of the minibuffer prompt.

Return (point-min) if current buffer is not a minibuffer.

View in manual

Probably introduced at or before Emacs version 21.1.

Source Code

// Defined in /usr/src/emacs/src/minibuf.c
{
  /* This function is written to be most efficient when there's a prompt.  */
  Lisp_Object beg, end, tem;
  beg = make_fixnum (BEGV);

  tem = Fmemq (Fcurrent_buffer (), Vminibuffer_list);
  if (NILP (tem))
    return beg;

  end = Ffield_end (beg, Qnil, Qnil);

  if (XFIXNUM (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil)))
    return beg;
  else
    return end;
}