* bug#24381: 25.0.95; eval-after-load for features
@ 2016-09-06 15:11 Roland Winkler
2016-09-06 15:20 ` Clément Pit--Claudel
0 siblings, 1 reply; 3+ messages in thread
From: Roland Winkler @ 2016-09-06 15:11 UTC (permalink / raw)
To: 24381
cat > foo.el <<EOF
(eval-after-load 'foo
(message "feature foo loaded: %s" (featurep 'foo)))
EOF
emacs -Q -l foo.el
According to the doc string of eval-after-load:
Alternatively, FILE can be a feature (i.e. a symbol), in which case FORM
is evaluated at the end of any file that ‘provide’s this feature.
So I would expect that the above form is not run because the file
foo.el does not provide the feature foo. Yet the algorithm
underlying eval-after-load compares the symbol foo with the string
"foo.el" and this is sufficient to evaluate the form.
I think that the behavior described in the docstring would be
useful: my init.el is broken into smaller files which have the same
names as the features they refer to. So I suggest to change the
behavior of eval-after-load instead of fixing its docstring. But
there might also be other issues that I am not aware of.
In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
of 2016-07-15 built on lukas
Windowing system distributor 'The X.Org Foundation', version 11.0.11600000
System Description: Ubuntu 14.04.5 LTS
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#24381: 25.0.95; eval-after-load for features
2016-09-06 15:11 bug#24381: 25.0.95; eval-after-load for features Roland Winkler
@ 2016-09-06 15:20 ` Clément Pit--Claudel
2016-09-06 15:39 ` Roland Winkler
0 siblings, 1 reply; 3+ messages in thread
From: Clément Pit--Claudel @ 2016-09-06 15:20 UTC (permalink / raw)
To: Roland Winkler, 24381
[-- Attachment #1.1: Type: text/plain, Size: 1359 bytes --]
Did you mean to use with-eval-after-load? eval-after-load takes a quoted form IIRC.
Clément.
On 2016-09-06 11:11, Roland Winkler wrote:
>
> cat > foo.el <<EOF
> (eval-after-load 'foo
> (message "feature foo loaded: %s" (featurep 'foo)))
> EOF
>
> emacs -Q -l foo.el
>
> According to the doc string of eval-after-load:
>
> Alternatively, FILE can be a feature (i.e. a symbol), in which case FORM
> is evaluated at the end of any file that ‘provide’s this feature.
>
> So I would expect that the above form is not run because the file
> foo.el does not provide the feature foo. Yet the algorithm
> underlying eval-after-load compares the symbol foo with the string
> "foo.el" and this is sufficient to evaluate the form.
>
> I think that the behavior described in the docstring would be
> useful: my init.el is broken into smaller files which have the same
> names as the features they refer to. So I suggest to change the
> behavior of eval-after-load instead of fixing its docstring. But
> there might also be other issues that I am not aware of.
>
>
>
>
> In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
> of 2016-07-15 built on lukas
> Windowing system distributor 'The X.Org Foundation', version 11.0.11600000
> System Description: Ubuntu 14.04.5 LTS
>
>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#24381: 25.0.95; eval-after-load for features
2016-09-06 15:20 ` Clément Pit--Claudel
@ 2016-09-06 15:39 ` Roland Winkler
0 siblings, 0 replies; 3+ messages in thread
From: Roland Winkler @ 2016-09-06 15:39 UTC (permalink / raw)
To: Clément Pit--Claudel; +Cc: 24381-done
On Tue Sep 6 2016 Clément Pit--Claudel wrote:
> Did you mean to use with-eval-after-load? eval-after-load takes a
> quoted form IIRC.
You are right, it must have been too early in the morning for me.
I am sorry for the noise.
Closing.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-06 15:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 15:11 bug#24381: 25.0.95; eval-after-load for features Roland Winkler
2016-09-06 15:20 ` Clément Pit--Claudel
2016-09-06 15:39 ` Roland Winkler
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.