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

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

bug#3466: [External] : Re: bug#3466: 23.0.94; have `d' in debugger treat


From: Drew Adams
Subject: bug#3466: [External] : Re: bug#3466: 23.0.94; have `d' in debugger treat macro expansion like `c' does
Date: Thu, 3 Jun 2021 15:01:04 +0000

> > In the Lisp debugger (the one for `debug-on-entry' etc.), if you're
> > going along doing `d, d, d...', and you get to a Lisp macro, such as
> > `dolist', you must switch to `c' instead of `d', if you don't want to
> > drill down into the steps of the macro expansion itself.
> >
> > It would be good to be able to optionally have `d' skip over macro
> > expansions (that is, expand all at once, like `c' does). A new user
> > option could control this.
> 
> I'm not quite sure I understand you here -- `c' evaluates (and skips)
> the entire expression, so you don't get to see what it's doing "inside"
> the macro.

You hit `d' once, to get into the macro, then `c' to get
the macro expansion (then d d d... to go on after the
expansion).

The point was only that at some point you need to hit `c'
if you don't want to do the macro expansion itself step
by step.

Here's an excerpt from a *Backtrace* that shows the macro
expansion: (let ((...))...).

Debugger entered--returning value: (let ((--dolist-tail-- (buffer-list)) b) ...
  #f(compiled-function (arg1 &rest rest) "Loop over a list.\nEvaluate BODY with 
...
* apply(#f(compiled-function (arg1 &rest rest) "Loop over a list.\nEvaluate 
BODY ...
* cl--wrap-in-nil-block(#f(compiled-function (arg1 &rest rest) "Loop over a 
list ...
* apply(cl--wrap-in-nil-block #f(compiled-function (arg1 &rest rest) "Loop over 
a ...
* #f(advice-wrapper :around #f(compiled-function (arg1 &rest rest) "Loop over a 
list...
* (dolist (b (buffer-list)) (message "Buf: %s" (buffer-name b)))
* (lambda nil (dolist (b (buffer-list)) (message "Buf: %s" (buffer-name b))))()
* apply((lambda nil (dolist (b (buffer-list)) (message "Buf: %s" (buffer-name 
b)))) nil)
* foo()

At least that's what I think this was about (the bug was
reported 12 years ago).





reply via email to

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