summaryrefslogtreecommitdiff
path: root/.emacs.d/snippets/prog-mode/commentline
diff options
context:
space:
mode:
authorSimeon Simeonov2017-03-28 09:35:03 +0200
committerSimeon Simeonov2017-03-28 09:35:03 +0200
commit15c068e1cff03f81f63b85159437e162660c0760 (patch)
tree938b12468601084423e494272a859bb47110023c /.emacs.d/snippets/prog-mode/commentline
parent380ef3e4b3907c5f4a203947f38bebe4c0498c4c (diff)
Update snippets and yasnippet
Diffstat (limited to '.emacs.d/snippets/prog-mode/commentline')
-rw-r--r--.emacs.d/snippets/prog-mode/commentline14
1 files changed, 6 insertions, 8 deletions
diff --git a/.emacs.d/snippets/prog-mode/commentline b/.emacs.d/snippets/prog-mode/commentline
index 0b0edff..400a7bf 100644
--- a/.emacs.d/snippets/prog-mode/commentline
+++ b/.emacs.d/snippets/prog-mode/commentline
@@ -3,11 +3,9 @@
3# name: commentline 3# name: commentline
4# key: col 4# key: col
5# -- 5# --
6${1:$(yas-trimmed-comment-start)} ${1:comment} ${1:$(let* ((str "") 6`(yas-trimmed-comment-start)` ${1:comment} ${1:$(let* ((start (yas-trimmed-comment-start))
7 (curr (current-column)) 7 (lastcom (aref start (1- (length start))))
8 (start (yas-trimmed-comment-start)) 8 (end (yas-trimmed-comment-end))
9 (lastcom (substring start -1)) 9 (endpadlen (- 79 (+ (current-column) (length end)))))
10 (end (yas-trimmed-comment-end))) 10 (concat (make-string (max endpadlen 0) lastcom)
11 (while (< (length str) (- 79 (+ curr (length end)))) 11 end))}$0 \ No newline at end of file
12 (setq str (concat str lastcom)))
13 (concat str end))}$0 \ No newline at end of file