From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: perl-mode.el file in Mac OS X Date: Wed, 02 Feb 2005 09:58:07 -0500 Organization: Bell Sympatico Message-ID: <87brb3vww1.fsf-monnier+gnu.emacs.help@gnu.org> References: <87c8e99.0502011954.6e3ca099@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107357679 31901 80.91.229.2 (2 Feb 2005 15:21:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2005 15:21:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 02 16:21:18 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CwMHM-0008D9-7a for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Feb 2005 16:18:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwMUU-0003LB-Sn for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Feb 2005 10:32:26 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.easynews.com!easynews.com!easynews!wn13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:5Ya6UgteW6ve2WfvEZFvftXnXvY= Original-Lines: 42 Original-NNTP-Posting-Host: 67.71.119.41 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1107356287 67.71.119.41 (Wed, 02 Feb 2005 09:58:07 EST) Original-NNTP-Posting-Date: Wed, 02 Feb 2005 09:58:07 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:128344 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:23857 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23857 > (setq auto-mode-alist > (append > '(("\\.xsl$" . sgml-mode) > ("\\.plist$" . sgml-mode) > ("\\.idd$" . sgml-mode) > ("\\.ide$" . sgml-mode) > ("\\.xml$" . xml-mode) > ("\\.xsl$" . xml-mode) > ("\\.fo$" . xml-mode) > ("\\.nw$" . noweb-mode) > ("\\.f90$" . f90-mode) > ("\\.pl$" . perl-mode) > ("\\.pod$" . perl-mode) > ("\\.tgz$" . tar-mode) > ("\\.tar\\.bz2$" . tar-mode) > ("\\.tar\\.gz$" . tar-mode)) > auto-mode-alist)) IIRC, the problem with the .pl extension is that it's used both for Perl and Prolog files, so I recommend people avoid it and use one of the many other possible extensions, such as ".perl". Oh and BTW, while I'm posting a useless message, I might as well use and point out that the above regexps should be "\\.xsl\\'", "\\.plist\\'", ..., "\\.pl\\'", ..., "\\.tar\\.gz\\'" (i.e. replace $ with \\' because $ would also match an embedded newline in a file name whereas \\' really only matches the end of the file name). If you feel like shortening such a list, you can also use things like: (setq auto-mode-alist (append '(("\\.\\(xsl\\|plist\\|id[de]\\)\\'" . sgml-mode) ("\\.\\(xml\\|xsl\\|fo\\)\\'" . xml-mode) ("\\.nw\\'" . noweb-mode) ("\\.f90\\'" . f90-mode) ("\\.\\(pl\\|pod\\)\\'" . perl-mode) ("\\.\\(tgz\\|tar.\\(gz\\|bz2\\)\\)\\'" . tar-mode)) auto-mode-alist)) -- Stefan