org.el: Leave scheduled/deadline lines untouched when filling an adjacent paragraph.
* org.el (org-fill-paragraph): Leave scheduled/deadline lines untouched when filling an adjacent paragraph. Thanks to Stuart McLean for suggesting this.
This commit is contained in:
parent
ce06791334
commit
187f77a20a
|
@ -20521,6 +20521,14 @@ the functionality can be provided as a fall-back.")
|
|||
(save-excursion (forward-paragraph 1)
|
||||
(point)))
|
||||
(fill-paragraph justify) t)))
|
||||
;; Don't fill schedule/deadline line before a paragraph
|
||||
((save-excursion (forward-paragraph -1)
|
||||
(or (looking-at (concat "^[^\n]*" org-scheduled-regexp ".*$"))
|
||||
(looking-at (concat "^[^\n]*" org-deadline-regexp ".*$"))))
|
||||
(save-restriction
|
||||
(narrow-to-region (1+ (match-end 0))
|
||||
(save-excursion (forward-paragraph 1) (point)))
|
||||
(fill-paragraph justify) t))
|
||||
;; Else simply call `fill-paragraph'.
|
||||
(t nil))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue