Synch to No Gnus 200409231508.
[elisp/gnus.git-] / lisp / nnheader.el
index d02d25f..141fce0 100644 (file)
@@ -788,10 +788,17 @@ given, the return value will not contain the last newline."
               out)))
      out))
 
+(defvar nnheader-uniquify-message-id nil)
+
 (defmacro nnheader-nov-read-message-id (&optional number)
   `(let ((id (nnheader-nov-field)))
      (if (string-match "^<[^>]+>$" id)
-        id
+        ,(if nnheader-uniquify-message-id
+             `(if (string-match "__[^@]+@" id)
+                  (concat (substring id 0 (match-beginning 0))
+                          (substring id (1- (match-end 0))))
+                id)
+           'id)
        (nnheader-generate-fake-message-id ,number))))
 
 (defun nnheader-parse-nov ()