* gnus-art.el (gnus-article-describe-bindings): Work for prefix keys.
[gnus] / lisp / nnheader.el
1 ;;; nnheader.el --- header access macros for Gnus and its backends
2
3 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994,
4 ;;   1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003,
5 ;;   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
6
7 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
8 ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>
9 ;; Keywords: news
10
11 ;; This file is part of GNU Emacs.
12
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
17
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 ;; GNU General Public License for more details.
22
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
25
26 ;;; Commentary:
27
28 ;;; Code:
29
30 (eval-when-compile (require 'cl))
31
32 (defvar nnmail-extra-headers)
33 (defvar gnus-newsgroup-name)
34 (defvar nnheader-file-coding-system)
35 (defvar jka-compr-compression-info-list)
36
37 ;; Requiring `gnus-util' at compile time creates a circular
38 ;; dependency between nnheader.el and gnus-util.el.
39 ;;(eval-when-compile (require 'gnus-util))
40
41 (require 'mail-utils)
42 (require 'mm-util)
43 (require 'gnus-util)
44 ;; FIXME none of these are used explicitly in this file.
45 (autoload 'gnus-sorted-intersection "gnus-range")
46 (autoload 'gnus-intersection "gnus-range")
47 (autoload 'gnus-sorted-complement "gnus-range")
48 (autoload 'gnus-sorted-difference "gnus-range")
49
50 (defcustom gnus-verbose-backends 7
51   "Integer that says how verbose the Gnus backends should be.
52 The higher the number, the more messages the Gnus backends will flash
53 to say what it's doing.  At zero, the Gnus backends will be totally
54 mute; at five, they will display most important messages; and at ten,
55 they will keep on jabbering all the time."
56   :group 'gnus-start
57   :type 'integer)
58
59 (defcustom gnus-nov-is-evil nil
60   "If non-nil, Gnus backends will never output headers in the NOV format."
61   :group 'gnus-server
62   :type 'boolean)
63
64 (defvar nnheader-max-head-length 8192
65   "*Max length of the head of articles.
66
67 Value is an integer, nil, or t.  nil means read in chunks of a file
68 indefinitely until a complete head is found\; t means always read the
69 entire file immediately, disregarding `nnheader-head-chop-length'.
70
71 Integer values will in effect be rounded up to the nearest multiple of
72 `nnheader-head-chop-length'.")
73
74 (defvar nnheader-head-chop-length 2048
75   "*Length of each read operation when trying to fetch HEAD headers.")
76
77 (defvar nnheader-read-timeout
78   (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
79                     (symbol-name system-type))
80       ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de
81       ;;
82       ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS.
83       ;;
84       ;; There should probably be a runtime test to determine the timing
85       ;; resolution, or a primitive to report it.  I don't know off-hand
86       ;; what's possible.  Perhaps better, maybe the Windows/DOS primitive
87       ;; could round up non-zero timeouts to a minimum of 1.0?
88       1.0
89     ;; 2008-05-19 change by Larsi: