From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39446 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: patches (Re: auto-fill in body after "^[A-Za-z]: ") Date: Fri, 19 Oct 2001 12:10:02 +0200 Organization: The Church of Emacs Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035175150 27909 80.91.224.250 (21 Oct 2002 04:39:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:39:10 +0000 (UTC) Return-Path: Original-Received: (qmail 1188 invoked from network); 19 Oct 2001 10:11:22 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 19 Oct 2001 10:11:21 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15uWc7-0002jN-00; Fri, 19 Oct 2001 05:10:51 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 19 Oct 2001 05:10:29 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id FAA12673 for ; Fri, 19 Oct 2001 05:10:13 -0500 (CDT) Original-Received: (qmail 1150 invoked by alias); 19 Oct 2001 10:10:29 -0000 Original-Received: (qmail 1145 invoked from network); 19 Oct 2001 10:10:29 -0000 Original-Received: from sheridan.dina.kvl.dk (130.225.40.227) by gnus.org with SMTP; 19 Oct 2001 10:10:29 -0000 Original-Received: from ssv2.dina.kvl.dk (ssv2.dina.kvl.dk [130.225.40.226]) by sheridan.dina.kvl.dk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id MAA19455; Fri, 19 Oct 2001 12:10:02 +0200 Original-Received: from abraham by ssv2.dina.kvl.dk with local (Exim 3.12 #1 (Debian)) id 15uWbK-00046d-00; Fri, 19 Oct 2001 12:10:02 +0200 Original-To: ding@gnus.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 19 Oct 2001 11:21:14 +0200") Original-Lines: 41 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39446 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39446 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) 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".=20=20 What is going on here?=20 ... 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=20 (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.