org.el: Prepare `org-fill-paragraph' for `message-mode'.
* org.el (org-fill-paragraph): Falls back on `message-fill-paragraph' if required in `message-mode'.
This commit is contained in:
parent
da8215bc06
commit
6cf637fd1d
|
@ -20898,6 +20898,12 @@ width for filling.
|
|||
|
||||
For convenience, when point is at a plain list, an item or
|
||||
a footnote definition, try to fill the first paragraph within."
|
||||
;; Falls back on message-fill-paragraph when necessary
|
||||
(if (and (derived-mode-p 'message-mode)
|
||||
(or (not (message-in-body-p))
|
||||
(save-excursion (move-beginning-of-line 1)
|
||||
(looking-at "> "))))
|
||||
(message-fill-paragraph)
|
||||
(save-excursion
|
||||
;; Move to end of line in order to get the first paragraph within
|
||||
;; a plain list or a footnote definition.
|
||||
|
@ -20990,7 +20996,7 @@ a footnote definition, try to fill the first paragraph within."
|
|||
(skip-chars-backward " \r\t\n")
|
||||
(line-end-position))))))
|
||||
;; Ignore every other element.
|
||||
(otherwise t))))))
|
||||
(otherwise t)))))))
|
||||
|
||||
(defun org-auto-fill-function ()
|
||||
"Auto-fill function."
|
||||
|
|
Loading…
Reference in New Issue