--- ../nnmairix_0.4.el 2008-01-28 20:36:23.000000000 +0100 +++ nnmairix.el 2008-01-28 20:30:56.000000000 +0100 @@ -1025,10 +1025,10 @@ (when corr (setq article (+ (mail-header-number cur) numc)) (mail-header-set-number cur article)) - (setq xref (replace-regexp-in-string - (format "[ \t]%s:[0-9]+" backendgroup) - (format " %s:%d" mairixgroup article) - (mail-header-xref cur) t t)) + (setq xref (mail-header-xref cur)) + (when (and (stringp xref) + (string-match (format "[ \t]%s:[0-9]+" backendgroup) xref)) + (setq xref (replace-match (format " %s:%d" mairixgroup article) t nil xref))) (mail-header-set-xref cur xref) (set-buffer buf) (nnheader-insert-nov cur)