Put $0 before comment-end (#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.
This commit is contained in:
Noam Postavsky 2017-10-01 09:06:13 -04:00 committed by Andrea Crotti
parent 39b8becede
commit 65764856df
4 changed files with 3 additions and 6 deletions

View File

@ -1,8 +1,5 @@
(require 'yasnippet)
(defun yas-with-comment (str)
(format "%s%s%s" comment-start str comment-end))
;; whitespace removing functions from Magnar Sveen ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun yas-s-trim-left (s)
"Remove whitespace at the beginning of S."

View File

@ -3,4 +3,4 @@
# key: fi
# condition: (not (eq major-mode 'sh-mode))
# --
`(yas-with-comment "FIXME: ")`
`comment-start`FIXME: $0`comment-end

View File

@ -2,4 +2,4 @@
# name: todo
# key: t
# --
`(yas-with-comment "TODO: ")`
`comment-start`TODO: $0`comment-end`

View File

@ -2,4 +2,4 @@
# name: xxx
# key: x
# --
`(yas-with-comment "XXX: ")`
`comment-start`XXX: $0`comment-end`