tweakage
[sepia.git] / sepia-snippet.el
blobe07a9c6d3915f7e1db951194297b554467d96f3e
1 (eval-when-compile
2 (require 'snippet))
4 (defun sepia-snippet-abbrev ()
5 (require 'snippet nil t)
6 (when (featurep 'snippet)
7 (snippet-with-abbrev-table
8 'sepia-mode-abbrev-table
9 ("for" . "for my $${VAR} ($${LIST}) {\n$>$.\n}$>")
10 ("foreach" . "foreach my $${VAR} ($${LIST}) {\n$>$.\n}$>")
11 ("if" . "if ($${TEST}) {\n$>$.\n}$>")
12 ("elsif" . "elsif ($${TEST}) {\n$>$.\n}$>")
13 ("else" . "else {\n$>$.\n}$>")
14 ("unless" . "unless ($${TEST}) {\n$>$.\n}$>")
15 ("while" . "while ($${TEST}) {\n$>$.\n}$>")
16 ("until" . "until ($${TEST}) {\n$>$.\n}$>")
17 ("for" . "for my $${VAR} ($${LIST}) {\n$>$.\n}$>")
18 ("sub" . "sub $${NAME}\n{\n$>$.\n}$>"))))
20 (add-hook 'sepia-mode-hook 'sepia-snippet-abbrev)