emacs-devel
[Top][All Lists]
Advanced

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

Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstr


From: Stefan Monnier
Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps.
Date: Sun, 02 Dec 2018 21:28:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> We don't need to invent a new property or rewrite every macro to make
> macros work on position-annotated ASTs, because we already have this
> feature.  It's (declare (debug ...)), aka Edebug specifications, and it
> is how Edebug gets exact source positions when stepping through code
> which contains macros.

This isn't quite right: e.g. relying only on the debug spec for the
`defun` macro would require to strip out the source-position annotation
from the function name, args, and docstring, which would prevent precise
position information for errors in those parts.  It's probably not
terribly important (we'd likely fallback on the position of the
open-paren that starts the `defun` which isn't too bad), but it's not as
good as what we could get by changing the macro to be annotation-aware.


        Stefan




reply via email to

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