mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-12 02:40:34 -08:00
(comment-line-break-function): New variable.
(do-auto-fill): Use that variable.
This commit is contained in:
parent
31c691c1a1
commit
b3ac9fa99a
1 changed files with 11 additions and 2 deletions
|
|
@ -2606,6 +2606,15 @@ Setting this variable automatically makes it local to the current buffer."
|
|||
regexp)
|
||||
:group 'fill)
|
||||
|
||||
(defvar comment-line-break-function 'indent-new-comment-line
|
||||
"*Mode-specific function which line breaks and continues a comment.
|
||||
|
||||
This function is only called during auto-filling of a comment section.
|
||||
The function should take a single optional argument, which is a flag
|
||||
indicating whether it should use soft newlines.
|
||||
|
||||
Setting this variable automatically makes it local to the current buffer.")
|
||||
|
||||
;; This function is the auto-fill-function of a buffer
|
||||
;; when Auto-Fill mode is enabled.
|
||||
;; It returns t if it really did any work.
|
||||
|
|
@ -2705,10 +2714,10 @@ Setting this variable automatically makes it local to the current buffer."
|
|||
(if (save-excursion
|
||||
(skip-chars-backward " \t")
|
||||
(= (point) fill-point))
|
||||
(indent-new-comment-line t)
|
||||
(funcall comment-line-break-function t)
|
||||
(save-excursion
|
||||
(goto-char fill-point)
|
||||
(indent-new-comment-line t)))
|
||||
(funcall comment-line-break-function t)))
|
||||
;; Now do justification, if required
|
||||
(if (not (eq justify 'left))
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue