Skip to content

Commit 6576485

Browse files
npostavsAndreaCrotti
authored andcommitted
Put $0 before comment-end (AndreaCrotti#221)
* Put $0 before comment-end * snippets/prog-mode/fixme: * snippets/prog-mode/todo: * snippets/prog-mode/xxx: Use comment-start and comment-end directly instead of `yas-with-comment` so that $0 can be inserted before comment-end. * * snippets/prog-mode/.yas-setup.el (yas-with-comment): Remove.
1 parent 39b8bec commit 6576485

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

snippets/prog-mode/.yas-setup.el

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
(require 'yasnippet)
22

3-
(defun yas-with-comment (str)
4-
(format "%s%s%s" comment-start str comment-end))
5-
63
;; whitespace removing functions from Magnar Sveen ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
74
(defun yas-s-trim-left (s)
85
"Remove whitespace at the beginning of S."

snippets/prog-mode/fixme

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# key: fi
44
# condition: (not (eq major-mode 'sh-mode))
55
# --
6-
`(yas-with-comment "FIXME: ")`
6+
`comment-start`FIXME: $0`comment-end

snippets/prog-mode/todo

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# name: todo
33
# key: t
44
# --
5-
`(yas-with-comment "TODO: ")`
5+
`comment-start`TODO: $0`comment-end`

snippets/prog-mode/xxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# name: xxx
33
# key: x
44
# --
5-
`(yas-with-comment "XXX: ")`
5+
`comment-start`XXX: $0`comment-end`

0 commit comments

Comments
 (0)