chiark / gitweb /
dot/gnus-local.el.distorted (gnus-posting-styles): Set address better.
[profile] / dot / gnus-local.el.distorted
index e753bdfc0a3e8c33740069cc0f307e33f633a596..1db8e95ca702159c8c8803af62d0bee49b36cb11 100644 (file)
 
 ;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
 (setq gnus-posting-styles
-      '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$"
-                           gnus-newsgroup-name)
-             (setq mdw-from-address
-                   (replace-match "mdw-nospam-\\1@distorted.org.uk"
-                                  nil nil gnus-newsgroup-name)))
-        ("From" mdw-from-address))))
+      '(("^nnimap\\+distorted:crap\\."
+        (address (concat "mdw-nospam-"
+                         (substring gnus-newsgroup-name (match-end 0))
+                         "@distorted.org.uk")))))
 
 ;; The actual splitting rules.
 (setq nnmail-split-fancy