Skip to content
Browse files

Added Clojure namespace macro.

Converts buffer-name according to Clojure namespace conventions: http://clojure.org/libs#toc1
  • Loading branch information...
1 parent 7a2ae1c commit 27ae5c11956cc288939f89e4842c1ec2962dda26 @juergenhoetzel juergenhoetzel committed Apr 9, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 clojure-mode/ns
View
7 clojure-mode/ns
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+#name : Namespace Macro
+# --
+(ns ^{:doc "$1"
+ :author "`user-full-name`"}
+ `(subst-char-in-string ?/ ?.
+ (subst-char-in-string ?_ ?- (replace-regexp-in-string ".*src/\\\\(.*\\\\).clj" "\\\\1" (buffer-file-name)))))`)

0 comments on commit 27ae5c1

Please sign in to comment.
Something went wrong with that request. Please try again.