2606 |
regexp) |
regexp) |
2607 |
:group 'fill) |
:group 'fill) |
2608 |
|
|
2609 |
|
(defvar comment-line-break-function 'indent-new-comment-line |
2610 |
|
"*Mode-specific function which line breaks and continues a comment. |
2611 |
|
|
2612 |
|
This function is only called during auto-filling of a comment section. |
2613 |
|
The function should take a single optional argument, which is a flag |
2614 |
|
indicating whether it should use soft newlines. |
2615 |
|
|
2616 |
|
Setting this variable automatically makes it local to the current buffer.") |
2617 |
|
|
2618 |
;; This function is the auto-fill-function of a buffer |
;; This function is the auto-fill-function of a buffer |
2619 |
;; when Auto-Fill mode is enabled. |
;; when Auto-Fill mode is enabled. |
2620 |
;; It returns t if it really did any work. |
;; It returns t if it really did any work. |
2714 |
(if (save-excursion |
(if (save-excursion |
2715 |
(skip-chars-backward " \t") |
(skip-chars-backward " \t") |
2716 |
(= (point) fill-point)) |
(= (point) fill-point)) |
2717 |
(indent-new-comment-line t) |
(funcall comment-line-break-function t) |
2718 |
(save-excursion |
(save-excursion |
2719 |
(goto-char fill-point) |
(goto-char fill-point) |
2720 |
(indent-new-comment-line t))) |
(funcall comment-line-break-function t))) |
2721 |
;; Now do justification, if required |
;; Now do justification, if required |
2722 |
(if (not (eq justify 'left)) |
(if (not (eq justify 'left)) |
2723 |
(save-excursion |
(save-excursion |