all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: perl-mode.el file in Mac OS X
Date: Wed, 02 Feb 2005 09:58:07 -0500	[thread overview]
Message-ID: <87brb3vww1.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.448.1107338600.2841.help-gnu-emacs@gnu.org

> (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
<anal-mode> 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

  parent reply	other threads:[~2005-02-02 14:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-02  3:54 perl-mode.el file in Mac OS X Nicholas Tamara
2005-02-02  8:54 ` Ismael Valladolid Torres
2005-02-02  9:39 ` Peter Dyballa
     [not found] ` <mailman.448.1107338600.2841.help-gnu-emacs@gnu.org>
2005-02-02 14:58   ` Stefan Monnier [this message]
2005-02-02 15:40     ` Ismael Valladolid Torres
2005-02-02 16:01     ` David Kastrup
2005-02-02 16:12       ` **Re: " Ismael Valladolid Torres
2005-02-02 18:05     ` Peter Dyballa
     [not found]     ` <mailman.557.1107368636.2841.help-gnu-emacs@gnu.org>
2005-02-03  3:53       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87brb3vww1.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.