[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Recognizing '.t' files as perly
From: |
Thomas Dickey |
Subject: |
Re: [vile] Recognizing '.t' files as perly |
Date: |
Tue, 22 Jan 2008 13:58:09 -0500 (EST) |
On Tue, 22 Jan 2008, J. Chris Coppick wrote:
Steven Lembark wrote:
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.
This works for me I think:
define-majormode html
~with define-submode html
suf '\.\(html\|HTML\|htm\|HTM\|dodo\)$'
~endwith
yes - the "\|" is probably where Steven's example does not work.
When I forget where the backslashes are needed, I make a simple
example in a text file, and let the visual-matches feature show
where it's not right. (a lot of the patterns in modes.rc are
built up that way ;-)
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net