[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (require 'filename) doesn't find the file
From: |
tomas |
Subject: |
Re: (require 'filename) doesn't find the file |
Date: |
Fri, 10 Mar 2017 10:37:49 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Mar 10, 2017 at 10:17:37AM +0100, hector wrote:
> The file called BASENAME.el that I want to (require) is in the load-path.
> If I add to it the line
>
> (provide 'basename)
>
> it works.
>
> But if I remove the line when I try to compile it says:
>
> syntax.el:26:1:Error: Required feature `basename' was not provided
>
> The part that I think isn't working:
> If FEATURE is not a member of the list `features', then the feature
> is not loaded; so load the file FILENAME.
>
> Why doesn't it find the file even if it does not contain a (provide)?
It finds the file. But the file doesn't keep its promise of "providing"
the feature.
See it this way: a "require"d file might find out that something is
broken. Then it would return without "provide"-ing the feature, to
signal that sorry, this feature isn't available after all.
In short: just end your file with (provide 'basename), as you noticed
up there. Or do you see a problem with that?
regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAljCc+0ACgkQBcgs9XrR2kbKBwCdG4mgblQzZIfoaHlmIl0ryDkV
dVQAn0jNDAiBjE/az/LL+g3+WuJqd0fO
=Ol2N
-----END PGP SIGNATURE-----