Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] [X]Emacs file association (auto-mode)
- Date: Fri, 23 Dec 2005 13:50:18 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] [X]Emacs file association (auto-mode)
- References: <d8fcc0800512201916y7602ff30i@example.com><87vexhmo80.fsf@example.com><d8fcc0800512221748x68d9902dh@example.com>
- Organization: The XEmacs Project
- User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b23 (daikon, linux)
>>>>> "Josh" == Josh Glover <jmglov@example.com> writes: Josh> Um... pretty hard, when I forget about Emacs's online Josh> help. Sorry. :( Wow, you don't use the help and you still like Emacs? I'd find it pretty unbearable, myself.<wink> Josh> I tried [inter alia]: Josh> (setq auto-mode-alist (append (list "\\.m4$" nil 'YOW!) Josh> auto-mode-alist)) That is correct, though (setq auto-mode-alist (append (list "\\.m4$" nil 'YOW!) auto-mode-alist)) is the preferred layout. More convenient and easy to read are (push '("\\.m4$" nil YOW!) auto-mode-alist) (add-to-list 'auto-mode-alist '("\\.m4$" nil YOW!)) (For intermediate LISPers: push is a macro so it can properly update the value of auto-mode-alist even though it's not quoted. In both, since the list literal is quoted, the symbol YOW! doesn't need to be quoted.) push is best in this case, since it's less complex than setq ... append, and add-to-list really is "add-to-set", because it only adds it if it's not already in the list, which would fail to work as expected if your auto-mode-alist was (("\\.m4$" m4-mode) ("\\.m4$" nil YOW!)) since alist processing depends on order. The "push" version works for me immediately. Ie M-: (push '("\\.m4$" nil YOW!) auto-mode-alist) RET C-x C-f junk.tex.m4 RET gives me a fresh buffer in LaTeX mode. I also tested an existing file by cp Makefile.in.in Makefile.in.in.m4 and the latter comes up in Makefile mode. Check that this form of element for auto-mode-alist is supported in your version of Emacs (start by checking the docstring if you haven't done so already). -- School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.
- Follow-Ups:
- Re: [tlug] [X]Emacs file association (auto-mode)
- From: Josh Glover
- References:
- [tlug] [X]Emacs file association (auto-mode)
- From: Josh Glover
- Re: [tlug] [X]Emacs file association (auto-mode)
- From: Stephen J. Turnbull
- Re: [tlug] [X]Emacs file association (auto-mode)
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Free Linux for Desktop Newbies ?
- Next by Date: Re: [tlug] Buying a Palm from the US
- Previous by thread: Re: [tlug] [X]Emacs file association (auto-mode)
- Next by thread: Re: [tlug] [X]Emacs file association (auto-mode)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links