]> code.delx.au - gnu-emacs/blobdiff - src/alloc.c
Merged from miles@gnu.org--gnu-2005 (patch 307-312)
[gnu-emacs] / src / alloc.c
index 43db28e08a00ebe3fab4ebd1684ea4993f8b4c88..35ce8a5cfa1e1d51b96540eaf5db300cea77144e 100644 (file)
@@ -535,6 +535,12 @@ memory_full ()
     Fsignal (Qnil, Vmemory_signal_data);
 }
 
+DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0,
+       doc: /* t if memory is nearly full, nil otherwise.  */)
+  ()
+{
+  return (spare_memory ? Qnil : Qt);
+}
 
 /* Called if we can't allocate relocatable space for a buffer.  */
 
@@ -6080,6 +6086,7 @@ The time is in seconds as a floating point value.  */);
   DEFVAR_INT ("gcs-done", &gcs_done,
              doc: /* Accumulated number of garbage collections done.  */);
 
+  defsubr (&Smemory_full_p);
   defsubr (&Scons);
   defsubr (&Slist);
   defsubr (&Svector);