comparison src/editfns.c @ 161:28f395d8dc7a r20-3b7

Import from CVS: tag r20-3b7
author cvs
date Mon, 13 Aug 2007 09:42:26 +0200
parents 25f70ba0133c
children 0132846995bd
comparison
equal deleted inserted replaced
160:1c55655d6702 161:28f395d8dc7a
485 /* This function can GC */ 485 /* This function can GC */
486 int speccount = specpdl_depth (); 486 int speccount = specpdl_depth ();
487 487
488 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 488 record_unwind_protect (save_excursion_restore, save_excursion_save ());
489 489
490 return unbind_to (speccount, Fprogn (args));
491 }
492
493 Lisp_Object
494 save_current_buffer_restore(Lisp_Object buffer)
495 {
496 struct buffer *buf = XBUFFER (buffer);
497 if (!BUFFER_LIVE_P (buf))
498 return Qnil;
499 set_buffer_internal (buf);
500 return Qnil;
501 }
502
503 DEFUN ("save-current-buffer", Fsave_current_buffer, 0, UNEVALLED, 0, /*
504 Save the current buffer; execute BODY; restore the current buffer.
505 Executes BODY just like `progn'.
506 */
507 (args))
508 {
509 /* This function can GC */
510 int speccount = specpdl_depth ();
511
512 record_unwind_protect (save_current_buffer_restore, Fcurrent_buffer ());
513
490 return unbind_to (speccount, Fprogn (args)); 514 return unbind_to (speccount, Fprogn (args));
491 } 515 }
492 516
493 DEFUN ("buffer-size", Fbufsize, 0, 1, 0, /* 517 DEFUN ("buffer-size", Fbufsize, 0, 1, 0, /*
494 Return the number of characters in BUFFER. 518 Return the number of characters in BUFFER.
2098 DEFSUBR (Fmark_marker); 2122 DEFSUBR (Fmark_marker);
2099 DEFSUBR (Fpoint); 2123 DEFSUBR (Fpoint);
2100 DEFSUBR (Fregion_beginning); 2124 DEFSUBR (Fregion_beginning);
2101 DEFSUBR (Fregion_end); 2125 DEFSUBR (Fregion_end);
2102 DEFSUBR (Fsave_excursion); 2126 DEFSUBR (Fsave_excursion);
2127 DEFSUBR (Fsave_current_buffer);
2103 2128
2104 DEFSUBR (Fbufsize); 2129 DEFSUBR (Fbufsize);
2105 DEFSUBR (Fpoint_max); 2130 DEFSUBR (Fpoint_max);
2106 DEFSUBR (Fpoint_min); 2131 DEFSUBR (Fpoint_min);
2107 DEFSUBR (Fpoint_min_marker); 2132 DEFSUBR (Fpoint_min_marker);