all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dan Davison <davison@stats.ox.ac.uk>
Cc: 5662@debbugs.gnu.org
Subject: bug#5662: flet not undone on lisp nesting error
Date: Fri, 05 Mar 2010 15:30:45 -0500	[thread overview]
Message-ID: <jwvocj2344g.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87fx4k4vty.fsf@stats.ox.ac.uk> (Dan Davison's message of "Sun, 28 Feb 2010 21:30:49 -0500")

> If I trigger a lisp nesting error with an infinite recursion inside a
> let and an flet binding, then the effects of the flet are not undone,
> resulting in a change of binding at the top-level.

> (defun g () 'g-orig)
> (setq a 'a-orig)

> (defun h ()
>   (let ((a 'a-new))
>     (flet ((g () 'g-new))
>       (h))))
> (h)   ;; <-- Lisp nesting exceeds `max-lisp-eval-depth'
> (g)   ;; g-new ! 
> a     ;; a-orig 

I can indeed reproduce it.  I'm not sure yet what's going on, but it
might be due to the "Lisp nesting exceeds `max-lisp-eval-depth'" error
happening in the unwind-protect code (i.e. while undoing the `g'
binding).  The explanation can't be quite so simple, but my gut feeling
tells me it's got to do with it.


        Stefan






  reply	other threads:[~2010-03-05 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01  2:30 bug#5662: flet not undone on lisp nesting error Dan Davison
2010-03-05 20:30 ` Stefan Monnier [this message]
2014-11-11  2:16   ` Jinseop Kim
2014-11-11 15:50     ` Stefan Monnier
2016-06-02  1:15 ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvocj2344g.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=5662@debbugs.gnu.org \
    --cc=davison@stats.ox.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.