emacs-wiki-discuss
[Top][All Lists]
Advanced

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

Re: [emacs-wiki-discuss] Re: Autoloads


From: Trent Buck
Subject: Re: [emacs-wiki-discuss] Re: Autoloads
Date: Thu, 24 Nov 2005 23:29:03 +1100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Phillip Lord" <address@hidden> writes:

> Björn Lindström wrote:
>> drkm <address@hidden> writes:
>> 
>>> I'm re-installing Muse & Planner, on a new laptop.  And I was
>>> surprised to find that Muse doesn't use ";;;###autoload" cookies
>>> (Planner does).  Why?  Is there some reason?
>>> 
>>> This makes installing more difficult, and forces users to add a
>>> plethora of 'require' in their '~/.emacs.el'.
>> 
>> I didn't write it, so I don't know exactly why.
>> 
>> However, since Muse uses macros for style definitions, you would still
>> have to load it at start-up time as long as you want to do the style
>> definitions at that point.
>> 
>> In my opinion, this is yet an argument for my suggestion in
>> http://article.gmane.org/gmane.emacs.wiki.general/4301
>
> You could pull the macros out into a file, the way that
> cl does. Then, an (eval-when-compile) would make dependant
> files work. 
>
> Not that I disagree with your point. I think that your idea
> is entirely the way to go. 

What's wrong with AUTOLOAD and EVAL-AFTER-LOAD?  For example:

,----[ http://twb.ath.cx/notes/dotemacs.txt ]
| (when (locate-library "muse")
|   (autoload 'muse-mode "muse" nil t)
|   (add-to-list 'auto-mode-alist '("\\.muse\\'" . muse-mode))
|
|   ;;; Treat <src> tags like <example> tags.
|   (eval-after-load "muse-colors"
|     '(add-to-list 'muse-colors-tags
|                   '("src" t nil muse-colors-example-tag))))
`----


-- 
Trent Buck, Student Errant




reply via email to

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