[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6ae835c9241 2/2: ; Add some comments to c-ts-common-comment-inden
From: |
Yuan Fu |
Subject: |
master 6ae835c9241 2/2: ; Add some comments to c-ts-common-comment-indent-new-line |
Date: |
Tue, 23 Apr 2024 00:56:56 -0400 (EDT) |
branch: master
commit 6ae835c924124a743d4f9dc6255ff1a3bd09ba6f
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
; Add some comments to c-ts-common-comment-indent-new-line
* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Add comments.
---
lisp/progmodes/c-ts-common.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
index 025703d7fce..457aa55c195 100644
--- a/lisp/progmodes/c-ts-common.el
+++ b/lisp/progmodes/c-ts-common.el
@@ -301,7 +301,7 @@ and /* */ comments. SOFT works the same as in
(delete-region (line-beginning-position) (point))
(insert "//" whitespaces)))
- ;; Line starts with /* or /**
+ ;; Line starts with /* or /**.
((save-excursion
(beginning-of-line)
(looking-at (rx "/*" (group (? "*") (* " ")))))
@@ -310,7 +310,7 @@ and /* */ comments. SOFT works the same as in
(delete-region (line-beginning-position) (point))
(insert " *" (make-string whitespace-and-star-len ?\s))))
- ;; Line starts with *
+ ;; Line starts with *.
((save-excursion
(beginning-of-line)
(looking-at (rx (group (* " ") (or "*" "|") (* " ")))))
@@ -319,7 +319,8 @@ and /* */ comments. SOFT works the same as in
(delete-region (line-beginning-position) (point))
(insert prefix)))
- ;; Line starts with whitespaces
+ ;; Line starts with whitespaces or no space. This is basically the
+ ;; default case since (rx (* " ")) matches anything.
((save-excursion
(beginning-of-line)
(looking-at (rx (* " "))))