comparison src/lread.c @ 672:f81a3cf6ec22

*** empty log message ***
author Joseph Arceneaux <jla@gnu.org>
date Tue, 02 Jun 1992 04:15:32 +0000
parents 40b255f55df3
children 6217fa6e2cab
comparison
equal deleted inserted replaced
671:21d23fa6fa2a 672:f81a3cf6ec22
498 unbind_to (count, Qnil); 498 unbind_to (count, Qnil);
499 } 499 }
500 500
501 #ifndef standalone 501 #ifndef standalone
502 502
503 DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 2, "bBuffer: ",
504 "Execute BUFFER as Lisp code. If BUFFER is nil, use the current buffer.\n\
505 Programs can pass argument PRINTFLAG which controls printing of output:\n\
506 nil means discard it; anything else is stream for print.\n\
507 \n\
508 If there is no error, point does not move. If there is an error,\n\
509 point remains at the end of the last character read from the buffer.")
510 (bufname, printflag)
511 Lisp_Object bufname, printflag;
512 {
513 int count = specpdl_ptr - specpdl;
514 Lisp_Object tem, buf;
515
516 if (NIL_P (bufname))
517 buf = Fcurrent_buffer ();
518 else
519 buf = Fget_buffer (bufname);
520 if (NIL_P (buf))
521 error ("No such buffer.");
522
523 if (NIL_P (printflag))
524 tem = Qsymbolp;
525 else
526 tem = printflag;
527 specbind (Qstandard_output, tem);
528 record_unwind_protect (save_excursion_restore, save_excursion_save ());
529 BUF_SET_PT (XBUFFER (buf), BUF_BEGV (XBUFFER (buf)));
530 readevalloop (buf, 0, Feval, !NIL_P (printflag));
531 unbind_to (count);
532
533 return Qnil;
534 }
535
536 #if 0
503 DEFUN ("eval-current-buffer", Feval_current_buffer, Seval_current_buffer, 0, 1, "", 537 DEFUN ("eval-current-buffer", Feval_current_buffer, Seval_current_buffer, 0, 1, "",
504 "Execute the current buffer as Lisp code.\n\ 538 "Execute the current buffer as Lisp code.\n\
505 Programs can pass argument PRINTFLAG which controls printing of output:\n\ 539 Programs can pass argument PRINTFLAG which controls printing of output:\n\
506 nil means discard it; anything else is stream for print.\n\ 540 nil means discard it; anything else is stream for print.\n\
507 \n\ 541 \n\
521 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 555 record_unwind_protect (save_excursion_restore, save_excursion_save ());
522 SET_PT (BEGV); 556 SET_PT (BEGV);
523 readevalloop (Fcurrent_buffer (), 0, Feval, !NILP (printflag)); 557 readevalloop (Fcurrent_buffer (), 0, Feval, !NILP (printflag));
524 return unbind_to (count, Qnil); 558 return unbind_to (count, Qnil);
525 } 559 }
560 #endif
526 561
527 DEFUN ("eval-region", Feval_region, Seval_region, 2, 3, "r", 562 DEFUN ("eval-region", Feval_region, Seval_region, 2, 3, "r",
528 "Execute the region as Lisp code.\n\ 563 "Execute the region as Lisp code.\n\
529 When called from programs, expects two arguments,\n\ 564 When called from programs, expects two arguments,\n\
530 giving starting and ending indices in the current buffer\n\ 565 giving starting and ending indices in the current buffer\n\
1497 defsubr (&Sread); 1532 defsubr (&Sread);
1498 defsubr (&Sread_from_string); 1533 defsubr (&Sread_from_string);
1499 defsubr (&Sintern); 1534 defsubr (&Sintern);
1500 defsubr (&Sintern_soft); 1535 defsubr (&Sintern_soft);
1501 defsubr (&Sload); 1536 defsubr (&Sload);
1502 defsubr (&Seval_current_buffer); 1537 defsubr (&Seval_buffer);
1503 defsubr (&Seval_region); 1538 defsubr (&Seval_region);
1504 defsubr (&Sread_char); 1539 defsubr (&Sread_char);
1505 defsubr (&Sread_char_exclusive); 1540 defsubr (&Sread_char_exclusive);
1506 #ifdef HAVE_X_WINDOWS 1541 #ifdef HAVE_X_WINDOWS
1507 defsubr (&Sread_event); 1542 defsubr (&Sread_event);