changeset 18937:ddb91108a9d2

(Fcurrent_message): New function. (syms_of_editfns): defsubr it.
author Richard M. Stallman <rms@gnu.org>
date Thu, 24 Jul 1997 06:09:23 +0000
parents 5aa5fcdc25c1
children 444939f3c18f
files src/editfns.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Thu Jul 24 06:04:06 1997 +0000
+++ b/src/editfns.c	Thu Jul 24 06:09:23 1997 +0000
@@ -2131,6 +2131,15 @@
   return Fmessage (nargs, args);
 }
 
+DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0,
+  "Return the string currently displayed in the echo area, or nil if none.")
+  ()
+{
+  return (echo_area_glyphs
+	  ? make_string (echo_area_glyphs, echo_area_glyphs_length)
+	  : Qnil);
+}
+
 DEFUN ("format", Fformat, Sformat, 1, MANY, 0,
   "Format a string out of a control-string and arguments.\n\
 The first argument is a control string.\n\
@@ -2787,6 +2796,7 @@
   defsubr (&Smessage);
   defsubr (&Smessage_box);
   defsubr (&Smessage_or_box);
+  defsubr (&Scurrent_message);
   defsubr (&Sformat);
 
   defsubr (&Sinsert_buffer_substring);