Mercurial > emacs
comparison src/print.c @ 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 | 96cc5c0a7ada |
children | fdad41459fd6 |
comparison
equal
deleted
inserted
replaced
10300:323ad02feb1e | 10301:aa73a5c0d1f2 |
---|---|
921 strout (" on ", -1, printcharfun); | 921 strout (" on ", -1, printcharfun); |
922 print_string (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun); | 922 print_string (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun); |
923 } | 923 } |
924 PRINTCHAR ('>'); | 924 PRINTCHAR ('>'); |
925 } | 925 } |
926 else if (BUFFERP (obj)) | |
927 { | |
928 if (NILP (XBUFFER (obj)->name)) | |
929 strout ("#<killed buffer>", -1, printcharfun); | |
930 else if (escapeflag) | |
931 { | |
932 strout ("#<buffer ", -1, printcharfun); | |
933 print_string (XBUFFER (obj)->name, printcharfun); | |
934 PRINTCHAR ('>'); | |
935 } | |
936 else | |
937 print_string (XBUFFER (obj)->name, printcharfun); | |
938 } | |
926 else if (WINDOW_CONFIGURATIONP (obj)) | 939 else if (WINDOW_CONFIGURATIONP (obj)) |
927 { | 940 { |
928 strout ("#<window-configuration>", -1, printcharfun); | 941 strout ("#<window-configuration>", -1, printcharfun); |
929 } | 942 } |
930 #ifdef MULTI_FRAME | 943 #ifdef MULTI_FRAME |
963 PRINTCHAR (']'); | 976 PRINTCHAR (']'); |
964 } | 977 } |
965 break; | 978 break; |
966 | 979 |
967 #ifndef standalone | 980 #ifndef standalone |
968 case Lisp_Buffer: | |
969 if (NILP (XBUFFER (obj)->name)) | |
970 strout ("#<killed buffer>", -1, printcharfun); | |
971 else if (escapeflag) | |
972 { | |
973 strout ("#<buffer ", -1, printcharfun); | |
974 print_string (XBUFFER (obj)->name, printcharfun); | |
975 PRINTCHAR ('>'); | |
976 } | |
977 else | |
978 print_string (XBUFFER (obj)->name, printcharfun); | |
979 break; | |
980 | |
981 case Lisp_Misc: | 981 case Lisp_Misc: |
982 if (MARKERP (obj)) | 982 if (MARKERP (obj)) |
983 { | 983 { |
984 strout ("#<marker ", -1, printcharfun); | 984 strout ("#<marker ", -1, printcharfun); |
985 if (!(XMARKER (obj)->buffer)) | 985 if (!(XMARKER (obj)->buffer)) |
990 strout (buf, -1, printcharfun); | 990 strout (buf, -1, printcharfun); |
991 strout (" in ", -1, printcharfun); | 991 strout (" in ", -1, printcharfun); |
992 print_string (XMARKER (obj)->buffer->name, printcharfun); | 992 print_string (XMARKER (obj)->buffer->name, printcharfun); |
993 } | 993 } |
994 PRINTCHAR ('>'); | 994 PRINTCHAR ('>'); |
995 break; | |
995 } | 996 } |
996 else if (OVERLAYP (obj)) | 997 else if (OVERLAYP (obj)) |
997 { | 998 { |
998 strout ("#<overlay ", -1, printcharfun); | 999 strout ("#<overlay ", -1, printcharfun); |
999 if (!(XMARKER (OVERLAY_START (obj))->buffer)) | 1000 if (!(XMARKER (OVERLAY_START (obj))->buffer)) |
1006 strout (buf, -1, printcharfun); | 1007 strout (buf, -1, printcharfun); |
1007 print_string (XMARKER (OVERLAY_START (obj))->buffer->name, | 1008 print_string (XMARKER (OVERLAY_START (obj))->buffer->name, |
1008 printcharfun); | 1009 printcharfun); |
1009 } | 1010 } |
1010 PRINTCHAR ('>'); | 1011 PRINTCHAR ('>'); |
1011 } | 1012 break; |
1013 } | |
1014 /* Other cases fall through to get an error. */ | |
1012 #endif /* standalone */ | 1015 #endif /* standalone */ |
1013 | 1016 |
1014 default: | 1017 default: |
1015 { | 1018 { |
1016 /* We're in trouble if this happens! | 1019 /* We're in trouble if this happens! |