GNU bug report logs -
#24381
25.0.95; eval-after-load for features
Previous Next
Reported by: "Roland Winkler" <winkler <at> gnu.org>
Date: Tue, 6 Sep 2016 15:13:01 UTC
Severity: normal
Found in version 25.0.95
Done: "Roland Winkler" <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24381 in the body.
You can then email your comments to 24381 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24381
; Package
emacs
.
(Tue, 06 Sep 2016 15:13:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Roland Winkler" <winkler <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 06 Sep 2016 15:13:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24381
; Package
emacs
.
(Tue, 06 Sep 2016 15:21:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24381 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
>
>
>
>
[signature.asc (application/pgp-signature, attachment)]
Reply sent
to
"Roland Winkler" <winkler <at> gnu.org>
:
You have taken responsibility.
(Tue, 06 Sep 2016 15:41:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Roland Winkler" <winkler <at> gnu.org>
:
bug acknowledged by developer.
(Tue, 06 Sep 2016 15:41:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 24381-done <at> debbugs.gnu.org (full text, mbox):
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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 05 Oct 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.