diff options
| -rw-r--r-- | lisp/progmodes/cc-styles.el | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index d86afdc566f..6e422ec0266 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el | |||
| @@ -510,14 +510,21 @@ variables." | |||
| 510 | (assoc 'other c-comment-prefix-regexp))) | 510 | (assoc 'other c-comment-prefix-regexp))) |
| 511 | c-comment-prefix-regexp)) | 511 | c-comment-prefix-regexp)) |
| 512 | 512 | ||
| 513 | (let ((comment-line-prefix | 513 | (let* ((empty-is-prefix (string-match c-current-comment-prefix "")) |
| 514 | (concat "[ \t]*\\(" c-current-comment-prefix "\\)[ \t]*"))) | 514 | (nonws-comment-line-prefix |
| 515 | 515 | (concat "\\(" c-current-comment-prefix "\\)[ \t]*")) | |
| 516 | (setq paragraph-start (concat comment-line-prefix | 516 | (comment-line-prefix (concat "[ \t]*" nonws-comment-line-prefix)) |
| 517 | (blank-or-comment-line-prefix | ||
| 518 | (concat "[ \t]*" | ||
| 519 | (if empty-is-prefix "" "\\(") | ||
| 520 | nonws-comment-line-prefix | ||
| 521 | (if empty-is-prefix "" "\\)?")))) | ||
| 522 | |||
| 523 | (setq paragraph-start (concat blank-or-comment-line-prefix | ||
| 517 | c-paragraph-start | 524 | c-paragraph-start |
| 518 | "\\|" | 525 | "\\|" |
| 519 | page-delimiter) | 526 | page-delimiter) |
| 520 | paragraph-separate (concat comment-line-prefix | 527 | paragraph-separate (concat blank-or-comment-line-prefix |
| 521 | c-paragraph-separate | 528 | c-paragraph-separate |
| 522 | "\\|" | 529 | "\\|" |
| 523 | page-delimiter) | 530 | page-delimiter) |