From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Three questions Date: Fri, 17 Sep 2004 17:06:27 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <414B6DF3.8000002@yahoo.com> References: <86mzzwz6so.fsf@vaio.shootybangbang.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1095462569 23954 80.91.229.6 (17 Sep 2004 23:09:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2004 23:09:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 18 01:09:21 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C8Rqy-0002qN-00 for ; Sat, 18 Sep 2004 01:09:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8Rwi-00087b-SB for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Sep 2004 19:15:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-X-Trace: news.uni-berlin.de AsZjIpQV+zY4hD7tfYE3pwjRDqbOLojP/XiXaLRQUj8qDZtrk= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:125394 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20749 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20749 William Payne wrote: > "John Paul Wallington" wrote in message > news:86mzzwz6so.fsf@vaio.shootybangbang.com... >>"William Payne" 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