[Top][All Lists]

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

Re: Another 'best' practices question ??

From: Robert Thorpe
Subject: Re: Another 'best' practices question ??
Date: 4 May 2007 09:36:27 -0700
User-agent: G2/1.0

On May 3, 6:47 pm, William Case <address@hidden> wrote:
> Should I create a new directory in "/usr/share/emacs/22.0.95/lisp" or
> add the file to an existing directory?  I tried to include it with the
> XHTML-mode but I could find specific XHTML, HTML or PHP mode files or
> directories to include it with.  Is that a good idea or not?

The normal procedures is to keep the regular Emacs separate from your
customizations of it.  So, usually you put modes that you have
downloaded from elsewhere somewhere out of the way of the normal Emacs
tree.  This allows you to upgrade Emacs more simply.  The normal place
to put these modes is in "site-lisp".  There are two "site-lisp"
directories, one in /usr/share/emacs/site-lisp is intended for things
that can work on many versions of emacs.  The one in /usr/share/emacs/
22.0.95/site-lisp is intended for things that are there for the
benefit of that particular version of Emacs.

A simple mode consisting of a single .el file I would put straight
into the site-lisp directory.  If the mode consists of many files that
would make reading the directory confusing then I'd make a new
directory just to put the mode in.  Then add that dir to the load-path
in .emacs.  Or, add a line into .emacs to load the main file of the
mode directly rather than relying on the load-path.

There are no hard-and-fast rules.

reply via email to

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