diff .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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.emacs.d/haskell-mode/snippets/haskell-mode/module	Mon Apr 21 04:30:59 2014 +0900
@@ -0,0 +1,14 @@
+# -*- mode: snippet -*-
+# key: mod
+# name: simple module
+# condition: (= (length "mod") (current-column))
+# expand-env: ((yas-indent-line 'fixed))
+# contributor: Luke Hoersten <luke@hoersten.org>
+# --
+module ${1:`(if (not buffer-file-name) "Module"
+                (let ((name (file-name-sans-extension (buffer-file-name))))
+                     (if (search "src/" name)
+                         (replace-regexp-in-string "/" "." (car (last (split-string name "src/"))))
+                         (file-name-nondirectory name))))`} where
+
+$0
\ No newline at end of file