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

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

Re: Is this comment in my .emacs correct?


From: Barry Margolin
Subject: Re: Is this comment in my .emacs correct?
Date: Thu, 19 Aug 2004 20:53:38 -0400
User-agent: MT-NewsWatcher/3.4 (PPC Mac OS X)

In article <cg3ffn$cpj$1@news.island.liu.se>,
 "William Payne" <mikas493_no_spam@student.liu.se> wrote:

> From my .emacs-file:
> 
> (setq auto-mode-alist
>       (append
>        (list
> ; Must use Makefile$ and not just Makefile or you will get makefile mode for 
> any
> ; type of file in a directory with the string makefile in it
>         '("\\Makefile$" . makefile-mode)         )
>        auto-mode-alist
>        )
>       )
> 
> Is the comment correct?

Not quite.  You'll get makefile mode for any pathname that contains the 
string "\Makefile" in it.  So it will use this mode for something like 
"C:\Data\Makefiles\README.txt", but not 
"C:\Data\My_Makefiles\README.txt".

The $ matches the end of the pathname.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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