mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
; 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.
This commit is contained in:
parent
1f443c277a
commit
6ae835c924
1 changed files with 4 additions and 3 deletions
|
|
@ -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 (* " "))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue