* selecting a major mode -- more newbie questions
@ 2002-09-25 17:25 Robert P. J. Day
0 siblings, 0 replies; 2+ messages in thread
From: Robert P. J. Day @ 2002-09-25 17:25 UTC (permalink / raw)
just to make sure i've got a complete list, i see four ways to
invoke a major mode when editing a file -- any other ways i've left
out? (the examples i show are based on my wanting to edit XML)
1) explicitly with "M-x" <modename>
2) adding to .emacs the appropriate auto-mode-alist setting, as in:
(add-to-list 'auto-mode-alist '("\\.xml\\'" . xml-mode))
3) adding a directive in the first non-blank like, as in
<?xml version='1.0' ?> <!-- -*- xml -*- -->
(or whatever the comment structure is for that type of data)
4) adding (within comments at the bottom of the file):
<!-- Local variables: -->
<!-- mode: xml -->
does that just about do it? have i missed anything? thanks for
your patience; i'm making progress.
rday
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <mailman.1032974663.4187.help-gnu-emacs@gnu.org>]
* Re: selecting a major mode -- more newbie questions
[not found] <mailman.1032974663.4187.help-gnu-emacs@gnu.org>
@ 2002-09-25 17:57 ` Barry Margolin
0 siblings, 0 replies; 2+ messages in thread
From: Barry Margolin @ 2002-09-25 17:57 UTC (permalink / raw)
In article <mailman.1032974663.4187.help-gnu-emacs@gnu.org>,
Robert P. J. Day <rpjday@mindspring.com> wrote:
>
> just to make sure i've got a complete list, i see four ways to
>invoke a major mode when editing a file -- any other ways i've left
>out? (the examples i show are based on my wanting to edit XML)
>
>1) explicitly with "M-x" <modename>
>2) adding to .emacs the appropriate auto-mode-alist setting, as in:
>3) adding a directive in the first non-blank like, as in
>4) adding (within comments at the bottom of the file):
There's also interpreter-mode-alist, which applies to files whose first
line starts with "#!" and matches against the rest of the line.
--
Barry Margolin, barmar@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-25 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-25 17:25 selecting a major mode -- more newbie questions Robert P. J. Day
[not found] <mailman.1032974663.4187.help-gnu-emacs@gnu.org>
2002-09-25 17:57 ` Barry Margolin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).