From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36020 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus ideas: little ones Date: 26 Apr 2001 07:07:25 +1000 Organization: Bah Humbug Message-ID: <87u23c4rjm.fsf@zip.com.au> References: <87bsptlyt5.fsf@lynx.ionific.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035171678 6386 80.91.224.250 (21 Oct 2002 03:41:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:41:18 +0000 (UTC) Return-Path: Original-Received: (qmail 1925 invoked by alias); 25 Apr 2001 21:11:18 -0000 Original-Received: (qmail 1920 invoked from network); 25 Apr 2001 21:11:18 -0000 Original-Received: from leeloo.zip.com.au (mail@203.12.97.48) by gnus.org with SMTP; 25 Apr 2001 21:11:18 -0000 Original-Received: from localhost (ppp211.dyn248.pacific.net.au [203.143.248.211]) by leeloo.zip.com.au (8.9.1/8.9.1) with ESMTP id HAA03193 for ; Thu, 26 Apr 2001 07:11:10 +1000 Original-Received: from gg by localhost with local (Exim 3.12 #1 (Debian)) id 14sWVS-0000lm-00; Thu, 26 Apr 2001 07:07:26 +1000 Original-To: ding@gnus.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5 Original-Lines: 17 Xref: main.gmane.org gmane.emacs.gnus.general:36020 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:36020 --=-=-= Hannu Koivisto writes: > > A somewhat related issue: it seems that message sets > auto-fill-inhibit-regexp so that it matches header lines. I find > it very irritating that, not surprisingly, that regexp matches > lines that look like header lines in the body too. If it is > neccessary to disable auto-fill for header lines, it should be done > by some other means. I use the fragment below, with mail-header-separator to distinguish header and body. It also disables auto-fill if you happen to be editing a #part manually. I suppose that should have #mml and stuff too, but #part is enough for me. I've posted this before, apologies to those seeing it for the third time. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=message-do-auto-fill.el ;; as per message-goto-body (defun message-body-pos () (save-excursion (goto-char (point-min)) (or (search-forward (concat "\n" mail-header-separator "\n") nil t) (search-forward "\n\n" nil t) (point-max)))) (defun message-do-auto-fill () (if (not (or (< (point) (message-body-pos)) (save-excursion (beginning-of-line) (looking-at "<#part")))) (funcall (default-value 'normal-auto-fill-function)))) (add-hook 'message-mode-hook '(lambda () (setq auto-fill-inhibit-regexp nil) (set (make-local-variable 'normal-auto-fill-function) 'message-do-auto-fill) ;; this bit only because text-mode-hook might have ;; already turned on auto-fill-mode (if auto-fill-function (setq auto-fill-function 'message-do-auto-fill)) )) --=-=-=--