From a4d37877f8da3588aa176672f65952a91daf1699 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 10 Sep 2020 23:26:30 +0200 Subject: [PATCH] Tweak how `M-RET' in Message mode fills paragraphs * lisp/gnus/message.el (message-newline-and-reformat): Pick up any longer white-space prefix before starting to fill (bug#43299). This fixes the problem of hitting M-RET on a line that's just ">". --- lisp/gnus/message.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index e10322417d8..3e7e18906c6 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3536,8 +3536,8 @@ Prefix arg means justify as well." (equal quoted (match-string 0))) (goto-char (match-end 0)) (looking-at "[ \t]*") - (if (> (length leading-space) (length (match-string 0))) - (setq leading-space (match-string 0))) + (when (< (length leading-space) (length (match-string 0))) + (setq leading-space (match-string 0))) (forward-line 1)) (setq end (point)) (goto-char beg) -- 2.39.5