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:
parent
39b8becede
commit
65764856df
|
@ -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."
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
# key: fi
|
||||
# condition: (not (eq major-mode 'sh-mode))
|
||||
# --
|
||||
`(yas-with-comment "FIXME: ")`
|
||||
`comment-start`FIXME: $0`comment-end
|
|
@ -2,4 +2,4 @@
|
|||
# name: todo
|
||||
# key: t
|
||||
# --
|
||||
`(yas-with-comment "TODO: ")`
|
||||
`comment-start`TODO: $0`comment-end`
|
|
@ -2,4 +2,4 @@
|
|||
# name: xxx
|
||||
# key: x
|
||||
# --
|
||||
`(yas-with-comment "XXX: ")`
|
||||
`comment-start`XXX: $0`comment-end`
|
Loading…
Reference in New Issue