[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-region may cause error against expressions including (set-buffe
From: |
Richard M. Stallman |
Subject: |
Re: eval-region may cause error against expressions including (set-buffer ...) |
Date: |
Wed, 28 Dec 2005 12:01:29 -0500 |
Does this patch fix the bug? (Please forgive the delay in my
response.)
*** lread.c 08 Dec 2005 12:39:17 -0500 1.344
--- lread.c 27 Dec 2005 22:42:48 -0500
***************
*** 1344,1353 ****
--- 1344,1363 ----
if (b != 0 && NILP (b->name))
error ("Reading from killed buffer");
+
if (!NILP (start))
{
+ /* Switch to the buffer we are reading from. */
record_unwind_protect (save_excursion_restore, save_excursion_save
());
+ set_buffer_internal (b);
+
+ /* Save point in it. */
+ record_unwind_protect (save_excursion_restore, save_excursion_save
());
+ /* Save ZV in it. */
record_unwind_protect (save_restriction_restore,
save_restriction_save ());
+ /* Those get unbound after we read one expression. */
+
+ /* Set point and ZV around stuff to be read. */
Fgoto_char (start);
Fnarrow_to_region (make_number (BEGV), end);
}
- Re: eval-region may cause error against expressions including (set-buffer ...),
Richard M. Stallman <=