[DRE-maint] Bug#551258: haml-elisp: autoload and auto-mode-alist

mike castleman m at mlcastle.net
Fri Oct 16 18:18:22 UTC 2009


hi Gunnar,

Thanks for the quick response.

It is my belief -- and maybe I'm wrong -- that if instead of doing
(require 'haml-mode)

you put
(autoload 'haml-mode "haml-mode" nil t)

then somehow haml-mode will not always be loaded but will magically be
loaded when it is actually needed. Then if you have the auto-mode-alist
thing you will get haml-mode when you open up a .haml file but not
before that.

This is the approach taken by (e.g.) yaml-mode.

Maybe there are some emacs maintainers who can be consulted about the
best approach here? I tried looking in the Debian emacs policy and
couldn't make heads or tails of most of it.

cheers,
mlc

Gunnar Wolf wrote:
> Ummm.. I do not think every major mode available on your system should
> be autoloaded — That can easily lead to bloat in the in-memory size of
> Emacs.
> 
> I am also no Emacs wizard and know hardly any elist - But I have the
> following set in my ~/.emacs, as I am a frequent user of haml-mode:
> 
> (require 'haml-mode)
> (add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
> 
> Of course, you can do the corresponding to get sass-mode as well.
> 
> I am closing this bug, as I feel it to be not a bug but a feature ;-)
> Of course, feel free to reopen if you think I am mistaken - Give me a
> reason to reconsider and I will do so.
> 


-- 
mike castleman
mailto:m at mlcastle.net
tel:+1-646-382-7220
http://mlcastle.net/






More information about the Pkg-ruby-extras-maintainers mailing list