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

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

Re: eval-last-sexp narrows buffer on error


From: Nikolaj Schumacher
Subject: Re: eval-last-sexp narrows buffer on error
Date: Sun, 29 Apr 2007 22:29:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

martin rudalics <address@hidden> writes:

> It's a problem with `save-restriction'.  Take:
>
> (with-current-buffer (get-buffer-create "*foo*")
>   (delete-region (point-min) (point-max))
>   (insert "foo\nbar\nfoo\n")
>   (save-restriction
>     (narrow-to-region (line-beginning-position -1) (line-end-position -1))
>     (error "????")))
>
> It will leave the buffer narrowed although the doc-string of
> `save-restriction' says:
>
> AFAICT Emacs 20 DTRT here, Emacs 21 and 22 don't.  Could you try to
> debug it?

I've tried.  From what I can tell `specpdl' isn't being wound back
afterwards, so `save_restriction_restore' is never called.

In fact, this apparently is the case after any error (unless caught by
`condition-case'), so `specpdl' grows bigger and bigger.  Is that
supposed to happen??

The functions called by `error' are
* signal
** find_handler_clause
*** call_debuger
**** debug
***** recursive-edit
****** command_loop
******* internal_catch
******** command_loop_2
from which it never returns.


regards,
Nikolaj Schumacher




reply via email to

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