Commit 908b0ae5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(print): Don't drop thru to error for markers and overlays.

(print): Make buffer case a branch of the Lisp_Vectorlike case.
parent ad9cdce4
...@@ -923,6 +923,19 @@ print (obj, printcharfun, escapeflag) ...@@ -923,6 +923,19 @@ print (obj, printcharfun, escapeflag)
} }
PRINTCHAR ('>'); 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)) else if (WINDOW_CONFIGURATIONP (obj))
{ {
strout ("#<window-configuration>", -1, printcharfun); strout ("#<window-configuration>", -1, printcharfun);
...@@ -965,19 +978,6 @@ print (obj, printcharfun, escapeflag) ...@@ -965,19 +978,6 @@ print (obj, printcharfun, escapeflag)
break; break;
#ifndef standalone #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: case Lisp_Misc:
if (MARKERP (obj)) if (MARKERP (obj))
{ {
...@@ -992,6 +992,7 @@ print (obj, printcharfun, escapeflag) ...@@ -992,6 +992,7 @@ print (obj, printcharfun, escapeflag)
print_string (XMARKER (obj)->buffer->name, printcharfun); print_string (XMARKER (obj)->buffer->name, printcharfun);
} }
PRINTCHAR ('>'); PRINTCHAR ('>');
break;
} }
else if (OVERLAYP (obj)) else if (OVERLAYP (obj))
{ {
...@@ -1008,7 +1009,9 @@ print (obj, printcharfun, escapeflag) ...@@ -1008,7 +1009,9 @@ print (obj, printcharfun, escapeflag)
printcharfun); printcharfun);
} }
PRINTCHAR ('>'); PRINTCHAR ('>');
break;
} }
/* Other cases fall through to get an error. */
#endif /* standalone */ #endif /* standalone */
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment