aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 428e82b216c..c4def1bf400 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1517,6 +1517,25 @@ DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0,
1517 return make_number (minibuf_level); 1517 return make_number (minibuf_level);
1518} 1518}
1519 1519
1520DEFUN ("minibuffer-prompt", Fminibuffer_prompt, Sminibuffer_prompt, 0, 0, 0,
1521 "Return the prompt string of the currently-active minibuffer.\n\
1522If no minibuffer is active, return nil.")
1523 ()
1524{
1525 if (!minibuf_prompt)
1526 return Qnil;
1527 return build_string (minibuf_prompt);
1528}
1529
1530DEFUN ("minibuffer-prompt-width", Fminibuffer_prompt_width,
1531 Sminibuffer_prompt_width, 0, 0, 0,
1532 "Return the display width of the minibuffer prompt.")
1533 ()
1534{
1535 Lisp_Object width;
1536 XFASTINT (width) = minibuf_prompt_width;
1537 return width;
1538}
1520 1539
1521init_minibuf_once () 1540init_minibuf_once ()
1522{ 1541{
@@ -1628,6 +1647,8 @@ Each minibuffer output is added with\n\
1628 defsubr (&Sread_buffer); 1647 defsubr (&Sread_buffer);
1629 defsubr (&Sread_no_blanks_input); 1648 defsubr (&Sread_no_blanks_input);
1630 defsubr (&Sminibuffer_depth); 1649 defsubr (&Sminibuffer_depth);
1650 defsubr (&Sminibuffer_prompt);
1651 defsubr (&Sminibuffer_prompt_width);
1631 1652
1632 defsubr (&Stry_completion); 1653 defsubr (&Stry_completion);
1633 defsubr (&Sall_completions); 1654 defsubr (&Sall_completions);