Gnus development mailing list
 help / color / mirror / Atom feed
* auto-fill in body after "^[A-Za-z]: "
@ 2001-10-12 13:28 Oliver Scholz
  2001-10-12 13:18 ` Kai Großjohann
  2001-10-12 15:51 ` auto-fill in body after "^[A-Za-z]: " Simon Josefsson
  0 siblings, 2 replies; 32+ messages in thread
From: Oliver Scholz @ 2001-10-12 13:28 UTC (permalink / raw)


Many Greetings to the Gnus Towers!

This is the offspring from a discussion on gnu.emacs.gnus about the
fact that something like "Suggestion: bla bla ..." breaks auto-fill in
message buffer. I have added the following to my .emacs to correct
that behaviour while still inhibiting auto-fill in the header. Kai
suggested that I should mail my code to this list.

(add-hook 'message-mode-hook (lambda ()
			       (setq auto-fill-function
				     'message-do-auto-fill)))

(add-hook 'message-setup-hook (lambda ()
				(os-header-set-text-property)
				(setq auto-fill-inhibit-regexp nil)))


(defun os-header-set-text-property ()
  "Put a text-property \"field\" with value \"header\" to the header lines."
  (save-excursion
    (put-text-property (point-min)
		       (re-search-forward
			(concat "^"
				mail-header-separator) nil nil 1)
		       'field 'header)))


(defun message-do-auto-fill ()
  "Test if point is in message-header before auto-filling."
  (unless (text-property-any (line-beginning-position) (point) 'field 'header)
    (do-auto-fill)))



    'oliver

-- 
Oliver Scholz
Taunusstr. 25
60329 Frankfurt am Main
Tel. 069  97 40 99 42



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2001-10-19 16:29 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).