From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: patches (Re: auto-fill in body after "^[A-Za-z]: ")
Date: Fri, 19 Oct 2001 12:10:02 +0200 [thread overview]
Message-ID: <rjn12o3pqd.fsf@ssv2.dina.kvl.dk> (raw)
In-Reply-To: <vafbsj42df9.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 19 Oct 2001 11:21:14 +0200")
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> After thinking about this, I agree with you that Simons solution is
> better.
I have made the change now, however as far as I can tell
message-do-auto-fill is never called!
(defun message-do-auto-fill ()
"Like `do-auto-fill', but don't fill in message header."
(debug)
(when (> (point) (save-excursion (rfc822-goto-eoh)))
(do-auto-fill)))
While "normal-auto-fill-function's value is message-do-auto-fill",
"auto-fill-function's value is do-auto-fill".
What is going on here?
...
Ah, message-mode is defined with 'define-derived-mode'. Normal modes
run all hooks last when all local variables are set, but modes defined
with 'define-derived-mode' run the parent mode hook before the derived
variables are set.
This mean that the standard way to turn on auto-fill in text related
modes
(add-hook 'text-mode-hook 'turn-on-auto-fill)
will use the wrong value of normal-auto-fill-function in message mode.
The real solution is to make message-mode non-derived.
A quick hack would be to add
(when auto-fill-function
(setq auto-fill-function normal-auto-fill-function))
near the end of message-mode.
next prev parent reply other threads:[~2001-10-19 10:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-12 13:28 auto-fill in body after "^[A-Za-z]: " Oliver Scholz
2001-10-12 13:18 ` Kai Großjohann
2001-10-12 14:57 ` David S. Goldberg
2001-10-12 20:53 ` Oliver Scholz
2001-10-12 22:18 ` Kai Großjohann
2001-10-13 12:34 ` Oliver Scholz
2001-10-13 19:52 ` Kai Großjohann
2001-10-13 12:42 ` Oliver Scholz
2001-10-13 12:48 ` Oliver Scholz
2001-10-13 20:36 ` patches (Re: auto-fill in body after "^[A-Za-z]: ") Oliver Scholz
2001-10-13 19:55 ` Kai Großjohann
2001-10-14 1:02 ` Henrik Enberg
2001-10-15 20:47 ` Oliver Scholz
2001-10-15 20:37 ` Kai Großjohann
2001-10-16 0:04 ` Oliver Scholz
2001-10-16 8:27 ` Kai Großjohann
2001-10-19 6:41 ` Per Abrahamsen
2001-10-19 9:21 ` Kai Großjohann
2001-10-19 10:10 ` Per Abrahamsen [this message]
2001-10-19 11:41 ` Kai Großjohann
2001-10-19 13:27 ` Per Abrahamsen
2001-10-19 16:29 ` Kai Großjohann
2001-10-13 19:56 ` Kai Großjohann
2001-10-12 15:51 ` auto-fill in body after "^[A-Za-z]: " Simon Josefsson
2001-10-12 16:45 ` Kai Großjohann
2001-10-12 17:05 ` Paul Jarc
2001-10-12 17:10 ` Paul Jarc
2001-10-12 17:16 ` Kai Großjohann
2001-10-12 17:09 ` ShengHuo ZHU
2001-10-12 17:22 ` Kai Großjohann
2001-10-12 17:19 ` Simon Josefsson
2001-10-12 18:53 ` Oliver Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rjn12o3pqd.fsf@ssv2.dina.kvl.dk \
--to=abraham@dina.kvl.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).