Install yasnippet and vala-snippets packages
This commit is contained in:
22
elpa/yasnippet-20160924.2001/snippets/clojure-mode/ns
Normal file
22
elpa/yasnippet-20160924.2001/snippets/clojure-mode/ns
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# name: ns
|
||||
# key: ns
|
||||
# --
|
||||
(ns `(flet ((try-src-prefix
|
||||
(path src-pfx)
|
||||
(let ((parts (split-string path src-pfx)))
|
||||
(if (= 2 (length parts))
|
||||
(second parts)
|
||||
nil))))
|
||||
(let* ((p (buffer-file-name))
|
||||
(p2 (first
|
||||
(remove-if-not '(lambda (x) x)
|
||||
(mapcar
|
||||
'(lambda (pfx)
|
||||
(try-src-prefix p pfx))
|
||||
'("/src/cljs/" "/src/clj/" "/src/")))))
|
||||
(p3 (file-name-sans-extension p2))
|
||||
(p4 (mapconcat '(lambda (x) x)
|
||||
(split-string p3 "/")
|
||||
".")))
|
||||
(replace-regexp-in-string "_" "-" p4)))`)
|
Reference in New Issue
Block a user