Mercurial > hg > xemacs-beta
comparison src/buffer.c @ 219:262b8bb4a523 r20-4b8
Import from CVS: tag r20-4b8
| author | cvs |
|---|---|
| date | Mon, 13 Aug 2007 10:09:35 +0200 |
| parents | d44af0c54775 |
| children | 41f2f0e326e9 |
comparison
equal
deleted
inserted
replaced
| 218:c9f226976f56 | 219:262b8bb4a523 |
|---|---|
| 487 } | 487 } |
| 488 filename = fn; | 488 filename = fn; |
| 489 NUNGCPRO; | 489 NUNGCPRO; |
| 490 } | 490 } |
| 491 | 491 |
| 492 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) | 492 LIST_LOOP (tail, Vbuffer_alist) |
| 493 { | 493 { |
| 494 buf = Fcdr (XCAR (tail)); | 494 buf = Fcdr (XCAR (tail)); |
| 495 if (!BUFFERP (buf)) continue; | 495 if (!BUFFERP (buf)) continue; |
| 496 if (!STRINGP (XBUFFER (buf)->filename)) continue; | 496 if (!STRINGP (XBUFFER (buf)->filename)) continue; |
| 497 tem = Fstring_equal (filename, | 497 tem = Fstring_equal (filename, |
| 1203 | 1203 |
| 1204 /* Or the echo area. */ | 1204 /* Or the echo area. */ |
| 1205 if (EQ (buf, Vecho_area_buffer)) | 1205 if (EQ (buf, Vecho_area_buffer)) |
| 1206 return Qnil; | 1206 return Qnil; |
| 1207 | 1207 |
| 1208 /* Or the special invisible internal prin1 buffer. */ | |
| 1209 if (EQ (buf, Vprin1_to_string_buffer)) | |
| 1210 return Qnil; | |
| 1211 | |
| 1212 /* Query if the buffer is still modified. */ | 1208 /* Query if the buffer is still modified. */ |
| 1213 if (INTERACTIVE && !NILP (b->filename) | 1209 if (INTERACTIVE && !NILP (b->filename) |
| 1214 && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) | 1210 && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) |
| 1215 { | 1211 { |
| 1216 Lisp_Object killp; | 1212 Lisp_Object killp; |
| 1239 record_unwind_protect (save_excursion_restore, save_excursion_save ()); | 1235 record_unwind_protect (save_excursion_restore, save_excursion_save ()); |
| 1240 Fset_buffer (buf); | 1236 Fset_buffer (buf); |
| 1241 | 1237 |
| 1242 /* First run the query functions; if any query is answered no, | 1238 /* First run the query functions; if any query is answered no, |
| 1243 don't kill the buffer. */ | 1239 don't kill the buffer. */ |
| 1244 for (tail = Vkill_buffer_query_functions; | 1240 EXTERNAL_LIST_LOOP (tail, Vkill_buffer_query_functions) |
| 1245 !NILP (tail); | |
| 1246 tail = Fcdr (tail)) | |
| 1247 { | 1241 { |
| 1248 if (NILP (call0 (Fcar (tail)))) | 1242 if (NILP (call0 (Fcar (tail)))) |
| 1249 { | 1243 { |
| 1250 UNGCPRO; | 1244 UNGCPRO; |
| 1251 return unbind_to (speccount, Qnil); | 1245 return unbind_to (speccount, Qnil); |
| 2757 != !(NILP (XBUFFER (Vbuffer_local_symbols)->slot))) \ | 2751 != !(NILP (XBUFFER (Vbuffer_local_symbols)->slot))) \ |
| 2758 abort () | 2752 abort () |
| 2759 #include "bufslots.h" | 2753 #include "bufslots.h" |
| 2760 #undef MARKED_SLOT | 2754 #undef MARKED_SLOT |
| 2761 | 2755 |
| 2762 Vprin1_to_string_buffer | |
| 2763 = Fget_buffer_create (Fpurecopy (build_string (" prin1"))); | |
| 2764 /* Reset Vbuffer_alist again so that the above buf is magically | |
| 2765 invisible */ | |
| 2766 Vbuffer_alist = Qnil; | |
| 2767 /* Want no undo records for prin1_to_string_buffer */ | |
| 2768 Fbuffer_disable_undo (Vprin1_to_string_buffer); | |
| 2769 | |
| 2770 { | 2756 { |
| 2771 Lisp_Object scratch = | 2757 Lisp_Object scratch = |
| 2772 Fset_buffer (Fget_buffer_create (QSscratch)); | 2758 Fset_buffer (Fget_buffer_create (QSscratch)); |
| 2773 /* Want no undo records for *scratch* until after Emacs is dumped */ | 2759 /* Want no undo records for *scratch* until after Emacs is dumped */ |
| 2774 Fbuffer_disable_undo (scratch); | 2760 Fbuffer_disable_undo (scratch); |
