emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: eval-last-sexp -> syntax error -> deletes rest of buffer!


From: Luc Teirlinck
Subject: Re: eval-last-sexp -> syntax error -> deletes rest of buffer!
Date: Fri, 3 Jun 2005 19:27:14 -0500 (CDT)

David Reitter wrote:

   But why is the buffer narrowed "temporarily" just when I have this  
   kind of syntax error, but not when there's other kinds?

Because the error occurred while the buffer was narrowed.  That only
applies to a minority of errors.  The narrowing was inside a
`save-excursion', which widens again _after_ an error.  But in the CVS
version of Emacs, an error enters the debugger, which enters a
recursive edit at the place the error occurred.  It shows you the
state of the buffer at the time the error occurred, and in your
example, that state is narrowed.  After you do C-], the save-excursion
takes effect and the buffer widens again.

Sincerely,

Luc.




reply via email to

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