Setting up emacs for LilyPond

Use the following at your own risk. It worked for me. It might not
for you.

First, your LilyPond distribution came with some files that emacs
needs (or at least it should have come with them). Find files with the
suffix .el in one of the LilyPond subdirectories. Copy them into
emacs-nn.n/elisp, where "emacs-nn.n" is the directory into which you
installed emacs.

Second, edit your .emacs file. (If you don't have one or don't know
where it is,
<Ctrl>-x <Ctrl>-f ~/.emacs will
load it.) Add the following lines to it:

While you're at it, prepare emacs to deal with UTF-8 characters
(this will allow it to handle accented characters, the copyright
symbol, and other unusual characters.) Add this to your .emacs file
also:

Finally, you need to be able to enter those unusual characters. I
recommend installing leim, which you can probably get from the same
place you got emacs (and which may even have been installed with
it). Download the leim file and unpack it into the directory where you
installed emacs.

And so forth. Browsing leim/quail/latin-ltx.el will
show you the whole list.

One drawback is that any use of a \ in LilyPond is likely to be
(mis)interpreted by leim and mangled. Fortunately, it's easy to turn
leim on and off once it's been activated. <Ctrl>-\
toggles it. Turn it on only when needed, and off again as soon as
possible.