all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#748: Elisp: lexical-let and cyclic structures
@ 2008-08-20 13:57 Michael Heerdegen
  2008-08-21  1:12 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2008-08-20 13:57 UTC (permalink / raw)
  To: emacs-pretest-bug

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






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-09 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-20 13:57 bug#748: Elisp: lexical-let and cyclic structures Michael Heerdegen
2008-08-21  1:12 ` Stefan Monnier
2011-07-09 17:51   ` Glenn Morris

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.