changeset 6590:2c66255e9469

(Fminibuffer_prompt, Fminibuffer_prompt_width): New funcs.
author Karl Heuer <kwzh@gnu.org>
date Wed, 30 Mar 1994 05:23:18 +0000
parents 764913e8463c
children 60f70854e73f
files src/minibuf.c
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Wed Mar 30 05:17:30 1994 +0000
+++ b/src/minibuf.c	Wed Mar 30 05:23:18 1994 +0000
@@ -1517,6 +1517,25 @@
   return make_number (minibuf_level);
 }
 
+DEFUN ("minibuffer-prompt", Fminibuffer_prompt, Sminibuffer_prompt, 0, 0, 0,
+  "Return the prompt string of the currently-active minibuffer.\n\
+If no minibuffer is active, return nil.")
+  ()
+{
+  if (!minibuf_prompt)
+    return Qnil;
+  return build_string (minibuf_prompt);
+}
+
+DEFUN ("minibuffer-prompt-width", Fminibuffer_prompt_width,
+  Sminibuffer_prompt_width, 0, 0, 0,
+  "Return the display width of the minibuffer prompt.")
+  ()
+{
+  Lisp_Object width;
+  XFASTINT (width) = minibuf_prompt_width;
+  return width;
+}
 
 init_minibuf_once ()
 {
@@ -1628,6 +1647,8 @@
   defsubr (&Sread_buffer);
   defsubr (&Sread_no_blanks_input);
   defsubr (&Sminibuffer_depth);
+  defsubr (&Sminibuffer_prompt);
+  defsubr (&Sminibuffer_prompt_width);
 
   defsubr (&Stry_completion);
   defsubr (&Sall_completions);