]> code.delx.au - gnu-emacs/blobdiff - src/buffer.c
Move window resize code from window.c to window.el.
[gnu-emacs] / src / buffer.c
index 05bd129976fd905e33a4fb29cf40c72fe66879f6..0862de9baf7f1ced0a795d4bfae426521fc1281a 100644 (file)
@@ -328,7 +328,7 @@ even if it is dead.  The return value is never nil.  */)
   alloc_buffer_text (b, BUF_GAP_SIZE (b) + 1);
   UNBLOCK_INPUT;
   if (! BUF_BEG_ADDR (b))
-    buffer_memory_full ();
+    buffer_memory_full (BUF_GAP_SIZE (b) + 1);
 
   b->pt = BEG;
   b->begv = BEG;
@@ -1938,6 +1938,8 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,
   return Qnil;
 }
 
+extern Lisp_Object Qdelete_window;
+
 DEFUN ("bury-buffer", Fbury_buffer, Sbury_buffer, 0, 1, "",
        doc: /* Put BUFFER-OR-NAME at the end of the list of all buffers.
 There it is the least likely candidate for `other-buffer' to return;
@@ -1969,7 +1971,7 @@ its frame, iconify that frame.  */)
          else if (NILP (XWINDOW (selected_window)->parent))
            Ficonify_frame (Fwindow_frame (selected_window));
          else
-           Fdelete_window (selected_window);
+           call1 (Qdelete_window, selected_window);
        }
     }
   else
@@ -4892,7 +4894,7 @@ alloc_buffer_text (struct buffer *b, size_t nbytes)
   if (p == NULL)
     {
       UNBLOCK_INPUT;
-      memory_full ();
+      memory_full (nbytes);
     }
 
   b->text->beg = (unsigned char *) p;
@@ -4920,7 +4922,7 @@ enlarge_buffer_text (struct buffer *b, EMACS_INT delta)
   if (p == NULL)
     {
       UNBLOCK_INPUT;
-      memory_full ();
+      memory_full (nbytes);
     }
 
   BUF_BEG_ADDR (b) = (unsigned char *) p;