mu4e: work-around for format-flowed corner-case
Fixes: #1938 (fixes, eh, works around it)
This commit is contained in:
@ -459,15 +459,16 @@ separated by blank lines. If variable `use-hard-newlines' is not
|
|||||||
set, this simply executes `fill-paragraph'."
|
set, this simply executes `fill-paragraph'."
|
||||||
;; Inspired by https://www.emacswiki.org/emacs/UnfillParagraph
|
;; Inspired by https://www.emacswiki.org/emacs/UnfillParagraph
|
||||||
(interactive (progn (barf-if-buffer-read-only) '(t)))
|
(interactive (progn (barf-if-buffer-read-only) '(t)))
|
||||||
(if mu4e-compose-format-flowed
|
(ignore-errors
|
||||||
(let ((fill-column (point-max))
|
(if mu4e-compose-format-flowed
|
||||||
(use-hard-newlines nil)); rfill "across" hard newlines
|
(let ((fill-column (point-max))
|
||||||
(when (use-region-p)
|
(use-hard-newlines nil)); rfill "across" hard newlines
|
||||||
(delete-trailing-whitespace (region-beginning) (region-end)))
|
(when (use-region-p)
|
||||||
(fill-paragraph nil region))
|
(delete-trailing-whitespace (region-beginning) (region-end)))
|
||||||
(when (use-region-p)
|
(fill-paragraph nil region))
|
||||||
(delete-trailing-whitespace (region-beginning) (region-end)))
|
(when (use-region-p)
|
||||||
(fill-paragraph nil region)))
|
(delete-trailing-whitespace (region-beginning) (region-end)))
|
||||||
|
(fill-paragraph nil region))))
|
||||||
|
|
||||||
(defun mu4e-toggle-use-hard-newlines ()
|
(defun mu4e-toggle-use-hard-newlines ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|||||||
Reference in New Issue
Block a user