File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 29
29
" This function returns `comment-start' trimmed by whitespaces."
30
30
(yas-s-trim comment-start))
31
31
32
+ (defun yas-trimmed-add-comment ()
33
+ " This function returns `comment-start' trimmed by whitespaces. It uses
34
+ `comment-add' to determine how many comment symbols to insert."
35
+ (yas-s-trim (apply #'concat (mapcar (lambda (x )
36
+ comment-start)
37
+ (number-sequence 0 comment-add)))))
38
+
32
39
(defun yas-trimmed-comment-end ()
33
40
" This function returns `comment-end' trimmed by whitespaces if
34
41
`comment-end' is not empty. Otherwise the reversed output of
Original file line number Diff line number Diff line change
1
+ # -*- mode : snippet -*-
2
+ # contributor : Antero Mejr <mail@antr.me >
3
+ # name : spdxcopyright
4
+ # key : spc
5
+ # --
6
+ `(yas-trimmed-add-comment) ` SPDX-FileCopyrightText: $0 `comment-end `
Original file line number Diff line number Diff line change
1
+ # -*- mode : snippet -*-
2
+ # contributor : Antero Mejr <mail@antr.me >
3
+ # name : spdxlicense
4
+ # key : spl
5
+ # --
6
+ `(yas-trimmed-add-comment) ` SPDX-License-Identifier: $0 `comment-end `
You can’t perform that action at this time.
0 commit comments