Mercurial > hg > Members > kokubo > emacs
annotate .emacs.d/haskell-mode/snippets/haskell-mode/module @ 0:2764b4f45f9f
1st commit
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 21 Apr 2014 04:30:59 +0900 |
parents | |
children |
rev | line source |
---|---|
0 | 1 # -*- mode: snippet -*- |
2 # key: mod | |
3 # name: simple module | |
4 # condition: (= (length "mod") (current-column)) | |
5 # expand-env: ((yas-indent-line 'fixed)) | |
6 # contributor: Luke Hoersten <luke@hoersten.org> | |
7 # -- | |
8 module ${1:`(if (not buffer-file-name) "Module" | |
9 (let ((name (file-name-sans-extension (buffer-file-name)))) | |
10 (if (search "src/" name) | |
11 (replace-regexp-in-string "/" "." (car (last (split-string name "src/")))) | |
12 (file-name-nondirectory name))))`} where | |
13 | |
14 $0 |