comparison src/editfns.c @ 169:15872534500d r20-3b11

Import from CVS: tag r20-3b11
author cvs
date Mon, 13 Aug 2007 09:46:53 +0200
parents 0132846995bd
children 6075d714658b
comparison
equal deleted inserted replaced
168:9851d5c6556e 169:15872534500d
489 489
490 return unbind_to (speccount, Fprogn (args)); 490 return unbind_to (speccount, Fprogn (args));
491 } 491 }
492 492
493 Lisp_Object 493 Lisp_Object
494 save_current_buffer_restore(Lisp_Object buffer) 494 save_current_buffer_restore (Lisp_Object buffer)
495 { 495 {
496 struct buffer *buf = XBUFFER (buffer); 496 struct buffer *buf = XBUFFER (buffer);
497 if (!BUFFER_LIVE_P (buf)) 497 if (!BUFFER_LIVE_P (buf))
498 return Qnil; 498 return Qnil;
499 set_buffer_internal (buf); 499 set_buffer_internal (buf);
502 502
503 DEFUN ("save-current-buffer", Fsave_current_buffer, 0, UNEVALLED, 0, /* 503 DEFUN ("save-current-buffer", Fsave_current_buffer, 0, UNEVALLED, 0, /*
504 Save the current buffer; execute BODY; restore the current buffer. 504 Save the current buffer; execute BODY; restore the current buffer.
505 Executes BODY just like `progn'. 505 Executes BODY just like `progn'.
506 */ 506 */
507 (args)) 507 (args))
508 { 508 {
509 /* This function can GC */ 509 /* This function can GC */
510 int speccount = specpdl_depth (); 510 int speccount = specpdl_depth ();
511 511
512 record_unwind_protect (save_current_buffer_restore, Fcurrent_buffer ()); 512 record_unwind_protect (save_current_buffer_restore, Fcurrent_buffer ());