[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yasnippet-snippets d80b2ff60f 10/13: FIX: Single semicolon
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yasnippet-snippets d80b2ff60f 10/13: FIX: Single semicolon at beginning was indented. (#454) |
Date: |
Fri, 5 Jan 2024 07:00:47 -0500 (EST) |
branch: elpa/yasnippet-snippets
commit d80b2ff60ffd149caf36cea2759e4c432aa73efc
Author: quazgar <quazgar@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
FIX: Single semicolon at beginning was indented. (#454)
The workaround here is to add a double semicolon, iff the start comment is a
single semicolon. This also required some fixing of the whitespace
calculations. This commit is for issue
387 (https://github.com/AndreaCrotti/yasnippet-snippets/issues/387).
---
snippets/prog-mode/commentblock | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/snippets/prog-mode/commentblock b/snippets/prog-mode/commentblock
index ba61f61a99..1636b7f6e0 100644
--- a/snippets/prog-mode/commentblock
+++ b/snippets/prog-mode/commentblock
@@ -15,15 +15,20 @@ ${1:$(let* ((col (current-column))
${1:$(let* ((col (current-column))
(str "")
(start (yas-trimmed-comment-start))
+ (start (if (string= start ";") ";;" start))
(end (yas-trimmed-comment-end)))
(while (< (length str) (ffloor (/ (- 78.0 (+ col (length start)
(string-width yas-text) (length end))) 2.0)))
(setq str (concat str " ")))
- (concat start str))} ${1:comment} ${1:$(let* ((col (current-column))
- (str "")
- (start
(yas-trimmed-comment-start))
- (end
(yas-trimmed-comment-end)))
- (while (< (length str) (-
79.0 (if (eq (mod (string-width yas-text) 2) 1) (- col 1) col) (length end)))
- (setq str (concat
str " ")))
+ (concat start str))} ${1:comment} ${1:$(
+ let* ((col (current-column))
+ (str "")
+ (start (yas-trimmed-comment-start))
+ (start (if (string= start ";") ";;" start))
+ (end (yas-trimmed-comment-end)))
+ (while (< (length str)
+ (- 79 (length end)
+ (if (eq (mod (+ (string-width yas-text) (length
start) (length end)) 2) 1) (- col 1) col)))
+ (setq str (concat str " ")))
(concat str end))}
${1:$(let* ((col (current-column))
(str "")
- [nongnu] elpa/yasnippet-snippets updated (12103bb505 -> baf82bd9dc), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets 98571357aa 07/13: *yasnippet-snippets.el: avoid duplicate loading the snippets (#468), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets 1eacad1d4e 05/13: Create a snippet to create desktop files (#476), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets 9f67370d9d 01/13: Merge elpy snippets (again) (#465), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets d80b2ff60f 10/13: FIX: Single semicolon at beginning was indented. (#454),
ELPA Syncer <=
- [nongnu] elpa/yasnippet-snippets 56dda449c0 11/13: faust-mode: improve license chooser (#470), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets cdad57f368 02/13: snippets: mass add tree-sitter modes to .yas-parents (#481), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets baf82bd9dc 13/13: Two more c++-mode snippets: forr and lambda (#472), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets a98c5deb27 06/13: "fixme" snippet also excludes bash-ts-mode (#478), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets ab935d7c7b 12/13: Add async versions of function snippets for rust (#480), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets ef4f51240b 04/13: added theorem, lemma and corollary snippets (#474), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets b00a7c9f9a 08/13: Implement missing python special methods. (#467), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets 9799ec9ffa 03/13: clojure-mode snippets update (#479), ELPA Syncer, 2024/01/05
- [nongnu] elpa/yasnippet-snippets 464517d0e2 09/13: ENH: python-mode/with-open (#482), ELPA Syncer, 2024/01/05