* Re: [Emacs-diffs] master 8867296 2/2: ; python.el: Replace `eval-when-compile` with `eval-and-compile`
[not found] ` <E1ZByYH-0002eD-O7@vcs.savannah.gnu.org>
@ 2015-07-06 13:47 ` Stefan Monnier
2015-07-06 23:23 ` Fabián Ezequiel Gallina
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2015-07-06 13:47 UTC (permalink / raw)
To: emacs-devel; +Cc: Fabián Ezequiel Gallina
> -(eval-when-compile
> +(eval-and-compile
> (defconst python-rx-constituents
Could you explain why it's needed both at run-time and compile-time?
> -(eval-when-compile
> +(eval-and-compile
> (defun python-syntax--context-compiler-macro (form type &optional syntax-ppss)
Why is this needed at run-time?
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] master 8867296 2/2: ; python.el: Replace `eval-when-compile` with `eval-and-compile`
2015-07-06 13:47 ` [Emacs-diffs] master 8867296 2/2: ; python.el: Replace `eval-when-compile` with `eval-and-compile` Stefan Monnier
@ 2015-07-06 23:23 ` Fabián Ezequiel Gallina
2015-07-07 1:21 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Fabián Ezequiel Gallina @ 2015-07-06 23:23 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> -(eval-when-compile
>> +(eval-and-compile
>> (defconst python-rx-constituents
>
> Could you explain why it's needed both at run-time and compile-time?
>
>> -(eval-when-compile
>> +(eval-and-compile
>> (defun python-syntax--context-compiler-macro (form type &optional syntax-ppss)
>
> Why is this needed at run-time?
>
Often I would instrument things when debugging and get errors related to
definitions not available at run-time, which is really annoying, and I
have to go and eval missing definitions by hand. This is mainly an
attempt to leave things in a development friendly state. Is there any
obvious harm in this change?
Thanks,
Fabián.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] master 8867296 2/2: ; python.el: Replace `eval-when-compile` with `eval-and-compile`
2015-07-06 23:23 ` Fabián Ezequiel Gallina
@ 2015-07-07 1:21 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2015-07-07 1:21 UTC (permalink / raw)
To: Fabián Ezequiel Gallina; +Cc: emacs-devel
> Often I would instrument things when debugging and get errors related to
> definitions not available at run-time, which is really annoying, and I
> have to go and eval missing definitions by hand. This is mainly an
> attempt to leave things in a development friendly state.
OK, that makes sense. You could leave a short note about it, but it's
probably not worth the trouble.
> Is there any obvious harm in this change?
No, it's just that eval-and-compile is internally a bit more tricky than
eval-when-compile, so I prefer to avoid it when possible (tho the
trickiness doesn't show up when used at top-level, so you're fine here).
And in this case it didn't seem to be needed, so I wondered if there was
some intricate business I was not aware of.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-07 1:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150706050244.10112.84425@vcs.savannah.gnu.org>
[not found] ` <E1ZByYH-0002eD-O7@vcs.savannah.gnu.org>
2015-07-06 13:47 ` [Emacs-diffs] master 8867296 2/2: ; python.el: Replace `eval-when-compile` with `eval-and-compile` Stefan Monnier
2015-07-06 23:23 ` Fabián Ezequiel Gallina
2015-07-07 1:21 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.