[Top][All Lists]

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

Re: how can I tell emacs to treat a text file as html?

From: Stefan Monnier
Subject: Re: how can I tell emacs to treat a text file as html?
Date: Fri, 15 Apr 2005 11:48:25 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> As the person who brought forth this mildly contentious and somewhat
> silly notion of "byte compiling .emacs", let me just mention that I
> (also) always byte compile packages that I write, and that I think
> _that_ does have a beneficial effect.  The compiler will catch things
> like undefined variables & other such bugs that the interpreter
> doesn't catch.  'Pon fixing these, the code is improved.

That's a good point.  I think it would be worthwhile to extract an "elisp
check" functionality that does the same/similar checks as byte-compiling but
without actually generating any .elc file.  This could be triggered
automatically when saving the .emacs file.  We could use it to give guidance
to the user about what kind of code in her .emacs is

> The fact that you _shouldn't_ do this in .emacs (now accepted by me, and
> I'm planning on entering a .emacs rehab) sorta/kinda rests on the
> principle that there shouldn't be much code in the .emacs anyway (see
> another recent thread).

It's not so much a question of quantity as a question of how many times it's
executed.  Most packages contain functions which are later on executed
potentially repeatedly.  Most .emacs files contain mostly one-time commands,
and the few functions defined there are executed fairly rarely (things like
major mode hooks).  Speeding up such code is not going to give much benefit,
if any.


reply via email to

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