summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-08-16 20:28:59 -0400
committerKyle Meyer <kyle@kyleam.com>2015-08-16 20:28:59 -0400
commit1f66bf201dded51f6a0d598a8e3df67887ebe523 (patch)
tree75d5d69595832458303d54b8628275057d5c906d /lisp
parent6757fbe388793442218be688d35cdc3a07b1d01f (diff)
downloademacs.d-1f66bf201dded51f6a0d598a8e3df67887ebe523.tar.gz
yas: Adjust for comment-start spacing
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-yas.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/init-yas.el b/lisp/init-yas.el
index 33a52f8..52fb54b 100644
--- a/lisp/init-yas.el
+++ b/lisp/init-yas.el
@@ -9,6 +9,11 @@
(when (file-exists-p km/personal-snippets)
(add-to-list 'yas-snippet-dirs km/personal-snippets))
+(defun km/yas-with-comment (str)
+ (concat comment-start
+ (unless (s-ends-with? " " comment-start) " ")
+ str comment-end))
+
(define-key yas-minor-mode-map (kbd "C-c i") 'yas-expand)
;; Remove commands with 'C-c &' prefix, which conflicts with
;; `org-mark-ring-goto' binding'