From 3f39f99678a85583ed5217ddc236afaae54d4357 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 10 Jul 2005 17:02:49 +0000 Subject: [PATCH] (Qeval_buffer_list, Veval_buffer_list): New vars. (syms_of_lread): Set up eval-buffer-list. (Feval_buffer, Feval_region): Bind eval-buffer-list. --- src/lread.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lread.c b/src/lread.c index 03bea849b82..7fae8b7cf1b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -85,6 +85,7 @@ Lisp_Object Qvariable_documentation, Vvalues, Vstandard_input, Vafter_load_alist Lisp_Object Qascii_character, Qload, Qload_file_name; Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; Lisp_Object Qinhibit_file_name_operation; +Lisp_Object Qeval_buffer_list, Veval_buffer_list; extern Lisp_Object Qevent_symbol_element_mask; extern Lisp_Object Qfile_exists_p; @@ -1452,6 +1453,7 @@ This function preserves the position of point. */) if (NILP (filename)) filename = XBUFFER (buf)->filename; + specbind (Qeval_buffer_list, Fcons (buf, Veval_buffer_list)); specbind (Qstandard_output, tem); record_unwind_protect (save_excursion_restore, save_excursion_save ()); BUF_SET_PT (XBUFFER (buf), BUF_BEGV (XBUFFER (buf))); @@ -1487,6 +1489,7 @@ This function does not move point. */) else tem = printflag; specbind (Qstandard_output, tem); + specbind (Qeval_buffer_list, Fcons (cbuf, Veval_buffer_list)); /* readevalloop calls functions which check the type of start and end. */ readevalloop (cbuf, 0, XBUFFER (cbuf)->filename, Feval, @@ -3961,6 +3964,10 @@ to load. See also `load-dangerous-libraries'. */); Vbytecomp_version_regexp = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); + DEFVAR_LISP ("eval-buffer-list", &Veval_buffer_list, + doc: /* List of buffers being read from by calls to `eval-buffer' and `eval-region'. */); + Veval_buffer_list = Qnil; + /* Vsource_directory was initialized in init_lread. */ load_descriptor_list = Qnil; @@ -4002,6 +4009,9 @@ to load. See also `load-dangerous-libraries'. */); Qload_file_name = intern ("load-file-name"); staticpro (&Qload_file_name); + Qeval_buffer_list = intern ("eval-buffer-list"); + staticpro (&Qeval_buffer_list); + staticpro (&dump_path); staticpro (&read_objects); -- 2.39.2