help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: auto-mode-alist - recognize prefix instead of sufix?


From: Lennart Borgman (gmail)
Subject: Re: auto-mode-alist - recognize prefix instead of sufix?
Date: Thu, 20 Mar 2008 00:46:25 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Christian Herenz wrote:
Hi,

is it possible to use a major-mode on files with a certain prefix?
I know that I can do something like this:

(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode)auto-mode-alist))

But what about opening files like foo.comments, foo.examples and so on in a special mode?


I never tried, but from the documentation it looks perfectly possible. Have you tried to use a regexp like "^foo\." ?




reply via email to

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