--- Begin Message ---
Subject: |
24.5; nesting cl-tagbody |
Date: |
Sun, 24 May 2015 11:56:30 +0800 |
1. eval the following
(let ((c 10))
(cl-tagbody :next
(cl-tagbody :next
(print c)
(cl-decf c)
(when (zerop (mod c 2))
(go :next)))
(unless (<= c 0)
(go :next))))
2. if: No catch for tag: #:cl--tagbody-tag, :next
Additionally eval the following
(let ((c 10))
(cl-tagbody :next1
(cl-tagbody :next2
(print c)
(cl-decf c)
(when (zerop (mod c 2))
(go :next2)))
(unless (<= c 0)
(go :next1))))
Error: cond: No catch for tag: #:cl--tagbody-tag, cl--exit
Leo
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#20639: 24.5; nesting cl-tagbody |
Date: |
Mon, 25 May 2015 09:39:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> (cl-tagbody :next
> (cl-tagbody :next
Yay! Someone's using cl-tagbody!?
I installed the patch below which should fix those problems,
Stefan
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 27d3da3..636c543 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1786,7 +1786,8 @@ Labels have lexical scope and dynamic extent."
(unless (eq 'go (car-safe (car-safe block)))
(push `(go cl--exit) block))
(push (nreverse block) blocks))
- (let ((catch-tag (make-symbol "cl--tagbody-tag")))
+ (let ((catch-tag (make-symbol "cl--tagbody-tag"))
+ (cl--tagbody-alist cl--tagbody-alist))
(push (cons 'cl--exit catch-tag) cl--tagbody-alist)
(dolist (block blocks)
(push (cons (car block) catch-tag) cl--tagbody-alist))
--- End Message ---