From 37f11d642f5f7b6dfb19b3377c89117fdf9cf13b Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 27 Aug 2016 19:06:10 +0300 Subject: [PATCH] mu4e: improve mu4e-fill-paragraph Improve mu4e-fill-paragraph for some corner-cases where there is trailing whitespace. Patch by holtzermann17. --- mu4e/mu4e-compose.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 07e37985..1688dce4 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -354,8 +354,10 @@ simply executes `fill-paragraph'." (interactive (progn (barf-if-buffer-read-only) '(t))) (if mu4e-compose-format-flowed (let ((fill-column (point-max)) - (use-hard-newlines nil)); rfill "across" hard newlines + (use-hard-newlines nil)); rfill "across" hard newlines + (delete-trailing-whitespace) (fill-paragraph nil region)) + (delete-trailing-whitespace) (fill-paragraph nil region))) (defun mu4e-toggle-use-hard-newlines ()