[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: Emacs modes
From: |
Akim Demaille |
Subject: |
Re: FYI: Emacs modes |
Date: |
19 Oct 2001 18:03:40 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
| Akim Demaille <address@hidden> writes:
| > Also, I don't know what should be done to trigger the mode
| > automatically,
|
| Generally you want something like:
|
| (autoload 'autoconf-mode "autoconf-mode"
| "Major mode for editing autoconf files." t)
| (setq auto-mode-alist
| (cons '("\\.ac\\'\\|configure\\.in\\'" . autoconf-mode)
| auto-mode-alist))
|
| (autoload 'autotest-mode "autotest-mode"
| "Major mode for editing autotest files." t)
| (setq auto-mode-alist
| (cons '("\\.at\\'" . autotest-mode) auto-mode-alist))
|
| The automatic mode logic in emacs is generally based on a regex match of
| the file name (with the -*- magic or file local variables overriding, of
| course). You may want to fiddle with the above regexes; I don't know that
| much about the file naming conventions of autoconf and autotest files.
What you wrote is just perfect!
| It's not clear to me, for example, whether people would prefer .m4 files
| be loaded in autoconf mode or m4 mode; I'm guessing that you may want to
| mention that as something people may want to customize.
In any case, the m4 mode is dead broken. But -*- is fine.
| \' is the emacs regex equivalent of $ without matching before any newline
| (so it does the right thing with file names containing newlines whereas $
| won't). It's like the Perl \z.
OK.
Thanks!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: FYI: Emacs modes,
Akim Demaille <=