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

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

Re: Three questions


From: William Payne
Subject: Re: Three questions
Date: Sat, 18 Sep 2004 01:27:25 +0200

"Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message 
414B6DF3.8000002@yahoo.com">news:414B6DF3.8000002@yahoo.com...
> William Payne wrote:
> > "John Paul Wallington" <jpw@gnu.org> wrote in message
> > 86mzzwz6so.fsf@vaio.shootybangbang.com">news:86mzzwz6so.fsf@vaio.shootybangbang.com...
> >>"William Payne" <mikas493_no_spam@student.liu.se> writes:
> >>>Second question: I have the following in my .emacs:
> >>>(setq auto-mode-alist
> >>>      (cons '("\\(\\`\\|/\\)Makefile\\'" . makefile-mode)
> >>>       auto-mode-alist))
> >>>
> >>>My old varaint would trigger Makefile mode (think I just had
> >>>Makefile$ or something similar), if the path contained the string
> >>>"Makefile". That wasn't so good. This varaint triggers makefile
> >>>mode only if the actual file name itself is called Makefile: that
> >>>is good. However, I want it to trigger make > file mode if the file
> >>>name (not the path!) contains the string Makefile, so Makefile.in
> >>>would trigger also. What do I need to change to get that?
> >>
> >>If you remove the above snippet from your .emacs file then Emacs
> >>should work as you expect by default.  Does it?
> >
> > And if I comment out the lines regarding makefile-mode, I don't get
> > makefile mode for files named Makefile.txt for example, only if they
> > are named Makefile.
>
> To match an optional extension:
>
> (setq auto-mode-alist
>       (cons '("\\(\\`\\|/\\)Makefile\\(\\.[^.]*\\)?\\'" . makefile-mode)
>        auto-mode-alist))
>
> -- 
> Kevin Rodgers
>

Thanks Kevin, that works!

/ WP 



reply via email to

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