[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Package initialization
From: |
Artur Malabarba |
Subject: |
Re: Package initialization |
Date: |
Sat, 18 Jul 2015 20:20:22 +0100 |
>>> Which seems to suggest that one should write some
>>> ;;;###autoload (progn ...)
>>> somewhere that does the initialization. Is this the way it should be
>>> done?
>>
>> Yes, that line can be added to any of the package's “.el” files.
>
> The question was not if it works; the question was if this is considered
> good style.
As long as these autoload cookies are restricted to autoloading
commands and functions or running some very essential code (like
adding a theme to custom-theme-load-path, or adding a mode entry to
auto-mode-alist), then yes, it's good style.
> Frankly, I think this is very ugly because I can no longer
> load the foo-auotload.el file
Why would you load the file manually? It gets loaded for you.
Or are you complaining about the fact that it gets loaded
automatically? (you can disable that)
> without clobbering global variables.
Autoload cookies should not go around changing any global variable.
For instance, they should not change the fill-column or the
default-input-method. But it makes sense for them to change some
variables, like the auto-mode-alist or the custom-theme-load-path.
- Package initialization, Helmut Eller, 2015/07/18
- Re: Package initialization, Artur Malabarba, 2015/07/18
- Re: Package initialization, Helmut Eller, 2015/07/18
- Re: Package initialization,
Artur Malabarba <=
- Re: Package initialization, Helmut Eller, 2015/07/18
- Re: Package initialization, Artur Malabarba, 2015/07/18
- Re: Package initialization, Helmut Eller, 2015/07/18
- Re: Package initialization, Artur Malabarba, 2015/07/18
- Re: Package initialization, Stephen J. Turnbull, 2015/07/18
- Re: Package initialization, Helmut Eller, 2015/07/19
- Re: Package initialization, Artur Malabarba, 2015/07/19
- Re: Package initialization, Helmut Eller, 2015/07/19
- Re: Package initialization, David Kastrup, 2015/07/19
- Re: Package initialization, Helmut Eller, 2015/07/19