* bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el
@ 2016-10-17 15:44 Gemini Lasswell
2017-02-04 11:22 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Gemini Lasswell @ 2016-10-17 15:44 UTC (permalink / raw)
To: 24717
To reproduce, start at the top of your Emacs source tree and:
1. emacs -Q
2. M-x edebug-all-defs RET
3. C-x C-f lisp/emacs-lisp/pcase.el
4. M-x eval-buffer RET
The reason this is happening is that in this line:
(def-edebug-spec pcase-MACRO pcase--edebug-match-macro)
pcase--edebug-match-macro does not have an Edebug specification, so the
Edebug specification for def-edebug-spec fails to match.
But when you aren't trying to debug pcase.el and are instead trying to
debug something that uses pcase, this Edebug specification works,
because internally to Edebug when it is trying to match an Edebug
specification, if it finds a symbol without a specification it assumes
it is one of Edebug's match functions and calls it. This is how Edebug
implements the behavior for the symbols used in Edebug specifications.
And pcase--edebug-match-macro works like one of Edebug's match
functions.
I think it's a rather poor idea for pcase.el to depend on internal
implementation details of Edebug. But since it does, replacing the line
of code above with:
(put 'pcase-MACRO 'edebug-form-spec 'pcase--edebug-match-macro)
would make it more obvious that it's using internal implementation
details of Edebug, as well as fixing the syntax error.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el
2016-10-17 15:44 bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el Gemini Lasswell
@ 2017-02-04 11:22 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2017-02-04 11:22 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: 24717-done
> From: Gemini Lasswell <gazally@runbox.com>
> Date: Mon, 17 Oct 2016 08:44:58 -0700
>
> To reproduce, start at the top of your Emacs source tree and:
> 1. emacs -Q
> 2. M-x edebug-all-defs RET
> 3. C-x C-f lisp/emacs-lisp/pcase.el
> 4. M-x eval-buffer RET
>
> The reason this is happening is that in this line:
>
> (def-edebug-spec pcase-MACRO pcase--edebug-match-macro)
>
> pcase--edebug-match-macro does not have an Edebug specification, so the
> Edebug specification for def-edebug-spec fails to match.
>
> But when you aren't trying to debug pcase.el and are instead trying to
> debug something that uses pcase, this Edebug specification works,
> because internally to Edebug when it is trying to match an Edebug
> specification, if it finds a symbol without a specification it assumes
> it is one of Edebug's match functions and calls it. This is how Edebug
> implements the behavior for the symbols used in Edebug specifications.
> And pcase--edebug-match-macro works like one of Edebug's match
> functions.
>
> I think it's a rather poor idea for pcase.el to depend on internal
> implementation details of Edebug. But since it does, replacing the line
> of code above with:
>
> (put 'pcase-MACRO 'edebug-form-spec 'pcase--edebug-match-macro)
>
> would make it more obvious that it's using internal implementation
> details of Edebug, as well as fixing the syntax error.
Thanks, I've pushed such a change.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-04 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 15:44 bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el Gemini Lasswell
2017-02-04 11:22 ` Eli Zaretskii
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).