Mercurial > emacs
comparison src/print.c @ 26404:c3c9cc1c2379
Remove USE_TEXT_PROPERTIES.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 11 Nov 1999 11:45:06 +0000 |
parents | 759384838eae |
children | ea7e77758acd |
comparison
equal
deleted
inserted
replaced
26403:03830fdf5186 | 26404:c3c9cc1c2379 |
---|---|
29 #include "window.h" | 29 #include "window.h" |
30 #include "process.h" | 30 #include "process.h" |
31 #include "dispextern.h" | 31 #include "dispextern.h" |
32 #include "termchar.h" | 32 #include "termchar.h" |
33 #include "keyboard.h" | 33 #include "keyboard.h" |
34 | |
35 #ifdef USE_TEXT_PROPERTIES | |
36 #include "intervals.h" | 34 #include "intervals.h" |
37 #endif | |
38 | 35 |
39 Lisp_Object Vstandard_output, Qstandard_output; | 36 Lisp_Object Vstandard_output, Qstandard_output; |
40 | 37 |
41 Lisp_Object Qtemp_buffer_setup_hook; | 38 Lisp_Object Qtemp_buffer_setup_hook; |
42 | 39 |
667 } | 664 } |
668 | 665 |
669 | 666 |
670 static void print (); | 667 static void print (); |
671 static void print_preprocess (); | 668 static void print_preprocess (); |
672 #ifdef USE_TEXT_PROPERTIES | |
673 static void print_preprocess_string (); | 669 static void print_preprocess_string (); |
674 #endif /* USE_TEXT_PROPERTIES */ | |
675 static void print_object (); | 670 static void print_object (); |
676 | 671 |
677 DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, | 672 DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, |
678 "Output a newline to stream PRINTCHARFUN.\n\ | 673 "Output a newline to stream PRINTCHARFUN.\n\ |
679 If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used.") | 674 If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used.") |
1165 } | 1160 } |
1166 | 1161 |
1167 switch (XGCTYPE (obj)) | 1162 switch (XGCTYPE (obj)) |
1168 { | 1163 { |
1169 case Lisp_String: | 1164 case Lisp_String: |
1170 #ifdef USE_TEXT_PROPERTIES | |
1171 /* A string may have text properties, which can be circular. */ | 1165 /* A string may have text properties, which can be circular. */ |
1172 traverse_intervals (XSTRING (obj)->intervals, 0, 0, | 1166 traverse_intervals (XSTRING (obj)->intervals, 0, 0, |
1173 print_preprocess_string, Qnil); | 1167 print_preprocess_string, Qnil); |
1174 #endif /* USE_TEXT_PROPERTIES */ | |
1175 break; | 1168 break; |
1176 | 1169 |
1177 case Lisp_Cons: | 1170 case Lisp_Cons: |
1178 print_preprocess (XCAR (obj)); | 1171 print_preprocess (XCAR (obj)); |
1179 obj = XCDR (obj); | 1172 obj = XCDR (obj); |
1185 print_preprocess (XVECTOR (obj)->contents[i]); | 1178 print_preprocess (XVECTOR (obj)->contents[i]); |
1186 } | 1179 } |
1187 } | 1180 } |
1188 } | 1181 } |
1189 | 1182 |
1190 #ifdef USE_TEXT_PROPERTIES | |
1191 static void | 1183 static void |
1192 print_preprocess_string (interval, arg) | 1184 print_preprocess_string (interval, arg) |
1193 INTERVAL interval; | 1185 INTERVAL interval; |
1194 Lisp_Object arg; | 1186 Lisp_Object arg; |
1195 { | 1187 { |
1196 print_preprocess (interval->plist); | 1188 print_preprocess (interval->plist); |
1197 } | 1189 } |
1198 #endif /* USE_TEXT_PROPERTIES */ | |
1199 | 1190 |
1200 static void | 1191 static void |
1201 print_object (obj, printcharfun, escapeflag) | 1192 print_object (obj, printcharfun, escapeflag) |
1202 Lisp_Object obj; | 1193 Lisp_Object obj; |
1203 register Lisp_Object printcharfun; | 1194 register Lisp_Object printcharfun; |
1302 cannot be taken as part of a hex character escape. */ | 1293 cannot be taken as part of a hex character escape. */ |
1303 int need_nonhex = 0; | 1294 int need_nonhex = 0; |
1304 | 1295 |
1305 GCPRO1 (obj); | 1296 GCPRO1 (obj); |
1306 | 1297 |
1307 #ifdef USE_TEXT_PROPERTIES | |
1308 if (!NULL_INTERVAL_P (XSTRING (obj)->intervals)) | 1298 if (!NULL_INTERVAL_P (XSTRING (obj)->intervals)) |
1309 { | 1299 { |
1310 PRINTCHAR ('#'); | 1300 PRINTCHAR ('#'); |
1311 PRINTCHAR ('('); | 1301 PRINTCHAR ('('); |
1312 } | 1302 } |
1313 #endif | |
1314 | 1303 |
1315 PRINTCHAR ('\"'); | 1304 PRINTCHAR ('\"'); |
1316 str = XSTRING (obj)->data; | 1305 str = XSTRING (obj)->data; |
1317 size_byte = STRING_BYTES (XSTRING (obj)); | 1306 size_byte = STRING_BYTES (XSTRING (obj)); |
1318 | 1307 |
1386 PRINTCHAR (c); | 1375 PRINTCHAR (c); |
1387 } | 1376 } |
1388 } | 1377 } |
1389 PRINTCHAR ('\"'); | 1378 PRINTCHAR ('\"'); |
1390 | 1379 |
1391 #ifdef USE_TEXT_PROPERTIES | |
1392 if (!NULL_INTERVAL_P (XSTRING (obj)->intervals)) | 1380 if (!NULL_INTERVAL_P (XSTRING (obj)->intervals)) |
1393 { | 1381 { |
1394 traverse_intervals (XSTRING (obj)->intervals, | 1382 traverse_intervals (XSTRING (obj)->intervals, |
1395 0, 0, print_interval, printcharfun); | 1383 0, 0, print_interval, printcharfun); |
1396 PRINTCHAR (')'); | 1384 PRINTCHAR (')'); |
1397 } | 1385 } |
1398 #endif | |
1399 | 1386 |
1400 UNGCPRO; | 1387 UNGCPRO; |
1401 } | 1388 } |
1402 break; | 1389 break; |
1403 | 1390 |
1862 } | 1849 } |
1863 | 1850 |
1864 print_depth--; | 1851 print_depth--; |
1865 } | 1852 } |
1866 | 1853 |
1867 #ifdef USE_TEXT_PROPERTIES | |
1868 | 1854 |
1869 /* Print a description of INTERVAL using PRINTCHARFUN. | 1855 /* Print a description of INTERVAL using PRINTCHARFUN. |
1870 This is part of printing a string that has text properties. */ | 1856 This is part of printing a string that has text properties. */ |
1871 | 1857 |
1872 void | 1858 void |
1881 printcharfun, 1); | 1867 printcharfun, 1); |
1882 PRINTCHAR (' '); | 1868 PRINTCHAR (' '); |
1883 print_object (interval->plist, printcharfun, 1); | 1869 print_object (interval->plist, printcharfun, 1); |
1884 } | 1870 } |
1885 | 1871 |
1886 #endif /* USE_TEXT_PROPERTIES */ | |
1887 | 1872 |
1888 void | 1873 void |
1889 syms_of_print () | 1874 syms_of_print () |
1890 { | 1875 { |
1891 Qtemp_buffer_setup_hook = intern ("temp-buffer-setup-hook"); | 1876 Qtemp_buffer_setup_hook = intern ("temp-buffer-setup-hook"); |