[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs crashes with eval-region and marker

From: Kim F. Storm
Subject: Re: emacs crashes with eval-region and marker
Date: Fri, 08 Apr 2005 16:23:23 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Lute Kamstra <address@hidden> writes:

> address@hidden (Kim F. Storm) writes:
> [...]
>> That's the analysis -- I'm not sure how to fix the problem.
> Shouldn't Fprint (and other functions that accept a marker as output
> stream) just check if the marker is within the accessible part of the
> buffer and signal an error otherwise?

It would be ok for Fprint to do that in general.

But I don't think that this relates to the present code --
i.e. I don't think it is an error in the first place!

The _user_ didn't narrow to the region -- that is something
done internally by eval-region -- so IMO, the user code
should be fully legal.

The narrowing should be inhibited somehow -- that's the
part I'm not sure how to fix (without breaking other code).

One possible fix could be to specify the END position as an arg to
readevalloop.  Then it can do the narrowing itself while
parsing, but undo it while printing.

BTW, the doc string for eval-region says:

     This function does not move point.

But the code reads:

  if (NILP (printflag))
    record_unwind_protect (save_excursion_restore, save_excursion_save ());
  Fgoto_char (start);

So if PRINTFLAG arg is non-nil, it seems to move point anyway.  Why?

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]