help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: require and the package management system


From: Tim Visher
Subject: Re: require and the package management system
Date: Thu, 16 Jan 2014 08:03:14 -0500

On Thu, Jan 16, 2014 at 7:28 AM, aidy lewis <aidy.lewis@gmail.com> wrote:
> I currently use Emacs 24 and its package management system.
>
> However, my .emacs file is littered with 'require' statements
>
> (require 'rainbow-delimiters)
> (require 'auto-complete-config)
>
> Am I correct to say, that 'require' is not needed in my config if I
> use the package manager system?

It's possible. Many of the packages installed by the package manager
use magic 'autoload' comments that automatically export the most used
symbols into the global namespace so you can address them and have the
rest of the library required automatically.

But it's also possible that no such autoload statements were used and
thus you still need to require (or autoload yourself) the library so
you can use it. It really comes down to a per library evaluation.

I would say that requires are often not needed and the easiest way for
you to find out which ones truly are is to remove them all (on a clean
commit of your .emacs file!) and try launching emacs.

eval-after-load and autoload are just two of the many ways you can
make emacs start faster if you're requiring too much.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail



reply via email to

[Prev in Thread] Current Thread [Next in Thread]