[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vile] Recognizing '.t' files as perly
From: |
Steven Lembark |
Subject: |
[vile] Recognizing '.t' files as perly |
Date: |
Tue, 22 Jan 2008 13:20:16 -0500 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071121) |
Odd thing: my #!.*perl and *.pm files show up with
"perlmode"; *.t files don't.
define-majormode perlmode
remove-submode perl cindent
~with define-submode perlmode
preamble "^#!.*perl"
suffixes "\\.(pm|t)$"
~endwith
Checking modes.doc, there aren't any examples of
dealing with multiple suffixes for a given mode
(examples show mixing a preamble with a single
suffix "\\.pl$"). I've also tried
suffixes "\\.\(pm|t\)$"
without any luck: I keep ending up in "confmode"
for my perl test code.
Using multiple suffixes lines:
define-majormode perlmode
remove-submode perl cindent
~with define-submode perlmode
preamble "^#!.*perl"
suffixes "\\.pm$"
suffixes "\\.t$"
~endwith
Gets me "perlmode" for *.pm and "perlmodemode" (no
typo) for *.t files.
Q: What is the correct syntax for attaching multiple
suffixes to a single mode?
e.g.,, how much of the regex requires escaping to
have the metachar's handled properly?
--
Steven Lembark +1 888 359 3508
Workhorse Computing 85-09 90th St
address@hidden Woodhaven, NY 11421
- [vile] Recognizing '.t' files as perly,
Steven Lembark <=