* Re: master 42950e9: Fix a few Edebug specifications where code is wrapped in lambdas.
[not found] ` <20210517081337.02F1021128@vcs0.savannah.gnu.org>
@ 2021-05-22 17:31 ` Stefan Monnier
2021-05-22 21:24 ` Emanuel Berg via Emacs development discussions.
2021-05-23 10:22 ` Philipp
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Monnier @ 2021-05-22 17:31 UTC (permalink / raw)
To: Philipp Stephani; +Cc: emacs-devel
> Fix a few Edebug specifications where code is wrapped in lambdas.
>
> As the Info node `(elisp) Specification List' explains, it is not
> correct to use `body' or t for a piece of code that the macro wraps in
> a `lambda' form. These should use `def-body' instead.
There is a slight misunderstanding here: if the end behavior is the same
as what could happen without a lambda, then there's no need to use
`def-body`.
The use `def-body` is only needed if it's possible to enter this code
from non-instrumented code (e.g. when the lambda is passed to
`run-with-timer`).
In the case of `displaying-byte-compile-warnings`, for example, there is
no need for `def-body`.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 42950e9: Fix a few Edebug specifications where code is wrapped in lambdas.
2021-05-22 17:31 ` master 42950e9: Fix a few Edebug specifications where code is wrapped in lambdas Stefan Monnier
@ 2021-05-22 21:24 ` Emanuel Berg via Emacs development discussions.
2021-05-23 10:22 ` Philipp
1 sibling, 0 replies; 3+ messages in thread
From: Emanuel Berg via Emacs development discussions. @ 2021-05-22 21:24 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier wrote:
> The use `def-body` is only needed if it's possible to enter
> this code from non-instrumented code (e.g. when the lambda
> is passed to `run-with-timer`).
OK, that an example or the definition if I may?
'non-instrumented code', sounds cool anyway...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 42950e9: Fix a few Edebug specifications where code is wrapped in lambdas.
2021-05-22 17:31 ` master 42950e9: Fix a few Edebug specifications where code is wrapped in lambdas Stefan Monnier
2021-05-22 21:24 ` Emanuel Berg via Emacs development discussions.
@ 2021-05-23 10:22 ` Philipp
1 sibling, 0 replies; 3+ messages in thread
From: Philipp @ 2021-05-23 10:22 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Philipp Stephani, emacs-devel
> Am 22.05.2021 um 19:31 schrieb Stefan Monnier <monnier@iro.umontreal.ca>:
>
>> Fix a few Edebug specifications where code is wrapped in lambdas.
>>
>> As the Info node `(elisp) Specification List' explains, it is not
>> correct to use `body' or t for a piece of code that the macro wraps in
>> a `lambda' form. These should use `def-body' instead.
>
> There is a slight misunderstanding here: if the end behavior is the same
> as what could happen without a lambda, then there's no need to use
> `def-body`.
>
> The use `def-body` is only needed if it's possible to enter this code
> from non-instrumented code (e.g. when the lambda is passed to
> `run-with-timer`).
>
> In the case of `displaying-byte-compile-warnings`, for example, there is
> no need for `def-body`.
Could you please clarify the manual then? Right now it says:
If your
macro wraps the expression with ‘lambda’ before it is evaluated,
use ‘def-form’ instead.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-23 10:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210517081335.25338.24020@vcs0.savannah.gnu.org>
[not found] ` <20210517081337.02F1021128@vcs0.savannah.gnu.org>
2021-05-22 17:31 ` master 42950e9: Fix a few Edebug specifications where code is wrapped in lambdas Stefan Monnier
2021-05-22 21:24 ` Emanuel Berg via Emacs development discussions.
2021-05-23 10:22 ` Philipp
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).