[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29767: 26.0.90; Failing auto-fill in message-mode because of bad sta

From: Katsumi Yamaoka
Subject: bug#29767: 26.0.90; Failing auto-fill in message-mode because of bad state (comment-skip-end)
Date: Wed, 20 Dec 2017 16:25:37 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (i686-pc-cygwin)

Hi Jose,

On Wed, 20 Dec 2017 02:20:41 +0100, Jose A. Ortega Ruiz wrote:
> so i guess we must be doing something different,

Well, does evaluating this snippet in the message-mode buffer
fix your problem?

(setq paragraph-separate (default-value 'paragraph-separate))

As for me, I found the cause is that message-mode modifies its
value in a message-mode buffer locally so as to have the value
of `message-cite-prefix-regexp' (containing ">", etc.).  It makes
the paragraph commands, `M-{', `M-}', etc. work conveniently in
the message-mode.  However, it also seems to affect the auto-fill
command undesirably.  A patch is below.

But if [1] does not fix your problem, try evaluating the next
one before composing a message-mode buffer:

(fset 'message-setup-fill-variables 'ignore)

If it does the trick, a cause should be something done in the
`message-setup-fill-variables' function.  It will probably be
easy to find the culprit by the brute force method (actually I
did it -- commenting forms one by one in the function).

[1] To restore its value, eval
(setq paragraph-separate paragraph-start)
in the message-mode buffer.

[2] To restore it, do: M-x load-library RET message RET

--- message.el~ 2017-12-17 22:00:18.943355400 +0000
+++ message.el  2017-12-20 07:21:00.211760400 +0000
@@ -3441,7 +3441,8 @@
 (defun message-do-auto-fill ()
   "Like `do-auto-fill', but don't fill in message header."
   (unless (message-point-in-header-p)
-    (do-auto-fill)))
+    (let ((paragraph-separate (default-value 'paragraph-separate)))
+      (do-auto-fill))))
 (defun message-insert-signature (&optional force)
   "Insert a signature.  See documentation for variable `message-signature'."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]