all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: emacs-pretest-bug@gnu.org
Subject: bug#748: Elisp: lexical-let and cyclic structures
Date: Wed, 20 Aug 2008 15:57:16 +0200	[thread overview]
Message-ID: <1219240636.0@debian> (raw)

When using the reader constructs `#N=' and `#N#' for cyclic
structures, lexical-let sometimes produces errors which don't occur
with let.

Example: Eval the following:

(defun f (start)
  (lexical-let (start start)         ;; return a closure
    #1=(lambda (x) (if (= x start) x
		     (+ x (#1# (1- x)))))))

Then evaluating f ends with an error:

   (f 3)

    "Variable binding depth exceeds max-specpdl-size"


The problem also occurs without lambdas. Examples:

   (let         () '#1=(#1#))               ;; ==> (#0)
   (lexical-let () '#1=(#1#))               ;;  Error
   (let ((x '#1=(#1#))) (lexical-let () x)) ;; ==> (#0)
   `#1=(#1#)                                ;;  Error






             reply	other threads:[~2008-08-20 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 13:57 Michael Heerdegen [this message]
2008-08-21  1:12 ` bug#748: Elisp: lexical-let and cyclic structures Stefan Monnier
2011-07-09 17:51   ` Glenn Morris

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=1219240636.0@debian \
    --to=michael_heerdegen@web.de \
    --cc=748@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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.