emacs-devel
[Top][All Lists]
Advanced

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

Re: How to debug indentation


From: N. Raghavendra
Subject: Re: How to debug indentation
Date: Sat, 26 May 2018 07:56:10 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

At 2018-05-26T03:41:03+02:00, Michael Heerdegen wrote:

> AFAICT you just place into in the code, reevaluate, and it will print
> values into the trace buffer.  E.g.
>
> (defun fac (x)
>   (trace-values (cons 'x x))
>   (if (< x 2) 1 (* x (fac (1- x)))))
>
> Tracing `fac' and evaluating (fac 3) gives you a trace buffer like
>
> 1 -> (fac 3)
> 1 -> (trace-values (x . 3))
>   2 -> (fac 2)
>   2 -> (trace-values (x . 2))
>     3 -> (fac 1)
>     3 -> (trace-values (x . 1))
>     3 <- fac: 1
>   2 <- fac: 2
> 1 <- fac: 6
>
> Nothing more.

That's helpful.  I'll try that.

Thanks,
Raghu.

--
N. Raghavendra <address@hidden>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/



reply via email to

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