(Ferase_buffer): Don't erase the minibuffer prompt.
[bpt/emacs.git] / src / buffer.c
index d4c60f9..69bf172 100644 (file)
@@ -1705,7 +1705,12 @@ so the buffer is truly empty after this.")
   ()
 {
   Fwiden ();
-  del_range (BEG, Z);
+  
+  if (INTEGERP (current_buffer->minibuffer_prompt_length))
+    del_range (XINT (current_buffer->minibuffer_prompt_length), Z);
+  else
+    del_range (BEG, Z);
+
   current_buffer->last_window_start = 1;
   /* Prevent warnings, or suspension of auto saving, that would happen
      if future size is less than past size.  Use of erase-buffer