emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ELP bug with CL's labels


From: Oliver Scholz
Subject: Re: ELP bug with CL's labels
Date: Fri, 09 Mar 2007 17:36:41 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Richard Stallman <address@hidden> writes:

> Does that code work correctly when you do NOT debug it with edebug?

Yes, it does. (Otherwise I'd have mentioned it.) I suppose it is
nevertheless a bug and not just a missing feature, because: if edebug
encounters a macro about which it has no information, it normally just
jumps over the entire macro body while silently macroexpanding it. For
instance:

(defmacro my-do-vector (var vect &rest body)
  (let ((i (make-symbol "i"))
        (len (make-symbol "len"))
        (v (make-symbol "v")))
    `(let* ((,i 0)
            (,v ,vect)
            (,len (length ,vect)))
       (while (< ,i ,len)
         (setq ,var (aref ,v ,i)
               ,i (1+ ,i))
         ,@body))))

(defun my-test ()
  (my-do-vector e [alpha beta gamma]
    (print e)))
  
No error here, when edebugging `my-test'. Though, edebug does not step
through the loop in the `my-do-vector' expression, either.

IIRC, it is possible to advise `edebug' about what to do with such
macros. I suppose, the described bug with `labels' happens, because
edebug actually tries to DTRT, but fails.

I have not checked yet, whether this bug might be more general; for
instance, it could be a bug in said advice mechanism.


    Oliver
-- 
Oliver Scholz               19 Ventôse an 215 de la Révolution
Ostendstr. 61               Liberté, Egalité, Fraternité!
60314 Frankfurt a. M.       




reply via email to

[Prev in Thread] Current Thread [Next in Thread]