* gnus-msg.el (gnus-copy-article-buffer): Quote decoded words containing
[gnus] / lisp / nnheader.el
index 8f360cf..3b34f68 100644 (file)
@@ -1,7 +1,7 @@
 ;;; nnheader.el --- header access macros for Gnus and its backends
 
 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
-;;        1997, 1998, 2000, 2001, 2002, 2003
+;;        1997, 1998, 2000, 2001, 2002, 2003, 2004
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -58,7 +58,7 @@ they will keep on jabbering all the time."
   :group 'gnus-server
   :type 'boolean)
 
-(defvar nnheader-max-head-length 4096
+(defvar nnheader-max-head-length 8192
   "*Max length of the head of articles.
 
 Value is an integer, nil, or t.  nil means read in chunks of a file
@@ -74,7 +74,15 @@ Integer values will in effect be rounded up to the nearest multiple of
 (defvar nnheader-read-timeout
   (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
                    (symbol-name system-type))
-      1.0                              ; why?
+      ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de
+      ;;
+      ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS.
+      ;;
+      ;; There should probably be a runtime test to determine the timing
+      ;; resolution, or a primitive to report it.  I don't know off-hand
+      ;; what's possible.  Perhaps better, maybe the Windows/DOS primitive
+      ;; could round up non-zero timeouts to a minimum of 1.0?
+      1.0
     0.1)
   "How long nntp should wait between checking for the end of output.
 Shorter values mean quicker response, but are more CPU intensive.")
@@ -219,9 +227,9 @@ on your system, you could say something like:
 (defsubst nnheader-generate-fake-message-id (&optional number)
   (if (numberp number)
       (format "fake+none+%s+%d" gnus-newsgroup-name number)
-  (format "fake+none+%s+%s" 
-         gnus-newsgroup-name 
-         (int-to-string (incf nnheader-fake-message-id)))))
+    (format "fake+none+%s+%s"
+           gnus-newsgroup-name
+           (int-to-string (incf nnheader-fake-message-id)))))
 
 (defsubst nnheader-fake-message-id-p (id)
   (save-match-data                    ; regular message-id's are <.*>
@@ -385,10 +393,17 @@ on your system, you could say something like:
               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 ()