changeset 10301:aa73a5c0d1f2

(print): Don't drop thru to error for markers and overlays. (print): Make buffer case a branch of the Lisp_Vectorlike case.
author Richard M. Stallman <rms@gnu.org>
date Mon, 02 Jan 1995 06:28:29 +0000
parents 323ad02feb1e
children 34556316a48a
files src/print.c
diffstat 1 files changed, 16 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/print.c	Mon Jan 02 06:26:46 1995 +0000
+++ b/src/print.c	Mon Jan 02 06:28:29 1995 +0000
@@ -923,6 +923,19 @@
 	    }
 	  PRINTCHAR ('>');
 	}
+      else if (BUFFERP (obj))
+	{
+	  if (NILP (XBUFFER (obj)->name))
+	    strout ("#<killed buffer>", -1, printcharfun);
+	  else if (escapeflag)
+	    {
+	      strout ("#<buffer ", -1, printcharfun);
+	      print_string (XBUFFER (obj)->name, printcharfun);
+	      PRINTCHAR ('>');
+	    }
+	  else
+	    print_string (XBUFFER (obj)->name, printcharfun);
+	}
       else if (WINDOW_CONFIGURATIONP (obj))
 	{
 	  strout ("#<window-configuration>", -1, printcharfun);
@@ -965,19 +978,6 @@
       break;
 
 #ifndef standalone
-    case Lisp_Buffer:
-      if (NILP (XBUFFER (obj)->name))
-	strout ("#<killed buffer>", -1, printcharfun);
-      else if (escapeflag)
-	{
-	  strout ("#<buffer ", -1, printcharfun);
-	  print_string (XBUFFER (obj)->name, printcharfun);
-	  PRINTCHAR ('>');
-	}
-      else
-	print_string (XBUFFER (obj)->name, printcharfun);
-      break;
-
     case Lisp_Misc:
       if (MARKERP (obj))
 	{
@@ -992,6 +992,7 @@
 	      print_string (XMARKER (obj)->buffer->name, printcharfun);
 	    }
 	  PRINTCHAR ('>');
+	  break;
 	}
       else if (OVERLAYP (obj))
 	{
@@ -1008,7 +1009,9 @@
 			    printcharfun);
 	    }
 	  PRINTCHAR ('>');
+	  break;
 	}
+      /* Other cases fall through to get an error.  */
 #endif /* standalone */
 
     default: