summaryrefslogtreecommitdiff
path: root/.emacs.d/snippets/prog-mode/commentline
diff options
context:
space:
mode:
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