[Top][All Lists]

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

Re: interactive feel of Emacs: the need for speed, and -Q [measure.el]

From: chad
Subject: Re: interactive feel of Emacs: the need for speed, and -Q [measure.el]
Date: Thu, 23 Apr 2020 16:35:16 -0700

I'm loading code that I wrote, because I don't maintain my emacs configuration as a single big pile of elisp used on every system (I grew up in a very heterogenous environment at MIT). The code is safe to load multiple times; I avoid doing so to avoid the overhead, and because in a more complicated past there were include-loops to avoid. At some point in the middle, I built myself a pair of functions enable-quiet/disable-quiet to handle this sort of thing; it sounds like maybe I should dust that off again. FWIW, I wonder if anyone here would recommend building it around load-file or require, and why.


On Thu, Apr 23, 2020 at 1:57 PM Stefan Monnier <address@hidden> wrote:
> I long ago adopted the use of require in my .emacs file as a well-worn
> shorthand for "load this unless it's already loaded". Is there an
> alternative that I should be using instead?

If what you want is "load this unless it's already loaded", then
`require` is the answer.  But the code in ~/.emacs should not about
about "loading" it should be about enabling/disabling: loading a file
(other than the init file, that is) should never noticeably affect
Emacs's behavior, so "loading" should be of no concern when writing your
config file (unless you're concerned about pre-loading a package for
performance reasons, maybe).


reply via email to

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