changeset 1854:5a18c36181fa

(Finsert_buffer_substring): Proper error for non-ex buffer. (Fcompare_buffer_substrings): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Thu, 11 Feb 1993 23:21:01 +0000
parents 8866e36c0ed5
children 80c1064620a8
files src/editfns.c
diffstat 1 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Thu Feb 11 06:00:51 1993 +0000
+++ b/src/editfns.c	Thu Feb 11 23:21:01 1993 +0000
@@ -763,9 +763,12 @@
 {
   register int beg, end, temp, len, opoint, start;
   register struct buffer *bp;
+  Lisp_Object buffer;
 
-  buf = Fget_buffer (buf);
-  bp = XBUFFER (buf);
+  buffer = Fget_buffer (buf);
+  if (NILP (buffer))
+    nsberror (buf);
+  bp = XBUFFER (buffer);
 
   if (NILP (b))
     beg = BUF_BEGV (bp);
@@ -842,8 +845,11 @@
     bp1 = current_buffer;
   else
     {
-      buffer1 = Fget_buffer (buffer1);
-      bp1 = XBUFFER (buffer1);
+      Lisp_Object buf1;
+      buf1 = Fget_buffer (buffer1);
+      if (NILP (buf1))
+	nsberror (buffer1);
+      bp1 = XBUFFER (buf1);
     }
 
   if (NILP (start1))
@@ -875,7 +881,10 @@
     bp2 = current_buffer;
   else
     {
-      buffer2 = Fget_buffer (buffer2);
+      Lisp_Object buf2;
+      buf2 = Fget_buffer (buffer2);
+      if (NILP (buf2))
+	nsberror (buffer2);
       bp2 = XBUFFER (buffer2);
     }