unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20639: 24.5; nesting cl-tagbody
@ 2015-05-24  3:56 Leo Liu
  2015-05-25 13:39 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Liu @ 2015-05-24  3:56 UTC (permalink / raw)
  To: 20639


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





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

* bug#20639: 24.5; nesting cl-tagbody
  2015-05-24  3:56 bug#20639: 24.5; nesting cl-tagbody Leo Liu
@ 2015-05-25 13:39 ` Stefan Monnier
  2015-05-26  4:54   ` Leo Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2015-05-25 13:39 UTC (permalink / raw)
  To: Leo Liu; +Cc: 20639-done

>   (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))





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

* bug#20639: 24.5; nesting cl-tagbody
  2015-05-25 13:39 ` Stefan Monnier
@ 2015-05-26  4:54   ` Leo Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Liu @ 2015-05-26  4:54 UTC (permalink / raw)
  To: 20639

> Yay!  Someone's using cl-tagbody!?
> I installed the patch below which should fix those problems,

Thanks for the fix. I used it in a macro (could easily be rewritten
without it) and was getting errors.

Leo





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

end of thread, other threads:[~2015-05-26  4:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-24  3:56 bug#20639: 24.5; nesting cl-tagbody Leo Liu
2015-05-25 13:39 ` Stefan Monnier
2015-05-26  4:54   ` Leo Liu

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).