(setq-default paragraph-separate (default-value 'paragraph-start))
(setq adaptive-fill-regexp (substring (default-value 'paragraph-start) 1 -1))
+(defun tfheen-debian-group-p ()
+ (if (= (string-match "nnml:linux.debian" gnus-newsgroup-name) 0) t nil))
+
+(defun tfheen-get-recipients-parsed ()
+(save-excursion
+ (set-buffer gnus-article-buffer)
+ (message-narrow-to-headers-or-head)
+ (append (mail-header-parse-addresses
+ (message-fetch-field "to"))
+ (mail-header-parse-addresses
+ (message-fetch-field "cc")))))
+
+(defun tfheen-debian-find-recipients ()
+ "Try to find all the recipients on debian lists."
+ (save-excursion
+ (set-buffer gnus-article-buffer)
+ (message-narrow-to-headers-or-head)
+ (or (message-fetch-field "Mail-Followup-To")
+ (mapconcat '(lambda(x)
+ (if (string-match ".*@lists.debian.org" (car x))
+ (car x) nil))
+ (tfheen-get-recipients-parsed) ", "))))
+
(setq gnus-posting-styles
'(
; Default-verdier
Send bidrag til no-alt-gullkorn@moderators.usenet.no
OBS: <URL:http://www.stud.ifi.uio.no/~jani/OBS/no-alt-gullkorn.shtml>")))
((and (message-mail-p) (stringp gnus-newsgroup-name))
- ("Mail-Followup-To" (gnus-group-get-parameter gnus-newsgroup-name 'to-address)))
+ ("Mail-Followup-To" (or (gnus-group-get-parameter gnus-newsgroup-name 'to-address)
+ (if (tfheen-debian-group-p)
+ (mapconcat '(lambda(x)
+ (if (string-match ".*@lists.debian.org" (car x))
+ (car x) nil))
+ (tfheen-get-recipients-parsed)
+ nil)))))
+
+ ((and (message-mail-p) (stringp gnus-newsgroup-name) (tfheen-debian-group-p))
+ (to (tfheen-debian-find-recipients))
+ (cc nil))
("nnml:in-"
- (address (save-excursion
- (set-buffer gnus-article-buffer)
- (message-narrow-to-headers-or-head)
- (let ((addr (mapconcat '(lambda(x)
- (if (string-match gnus-ignored-from-addresses
- (car x))
- (car x) nil))
- (append (mail-header-parse-addresses
- (message-fetch-field "to"))
- (mail-header-parse-addresses
- (message-fetch-field "cc")))
+ (address (let ((addr
+ (mapconcat '(lambda(x)
+ (if (string-match gnus-ignored-from-addresses
+ (car x))
+ (car x) nil))
+ (tfheen-get-recipients-parsed)
nil)))
- (if (string-equal addr "") "tfheen@raw.no" addr)))))
+ (if (string-equal addr "") "tfheen@raw.no" addr))))
; ITK/Samfundet-ting
("nnml:drift.\\(itk\\|samfundet\\)"
(address "tfheen@samfundet.no")