gnus-sum.el 419 KB
Newer Older
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1
;;; gnus-sum.el --- summary mode commands for Gnus
2 3 4

;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;;   2005 Free Software Foundation, Inc.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
5

6
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
;; Keywords: news

;; This file is part of GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
Lute Kamstra's avatar
Lute Kamstra committed
23 24
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
25 26 27 28 29

;;; Commentary:

;;; Code:

30 31 32
(eval-when-compile
  (require 'cl)
  (defvar tool-bar-map))
33

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
34 35 36 37 38 39
(require 'gnus)
(require 'gnus-group)
(require 'gnus-spec)
(require 'gnus-range)
(require 'gnus-int)
(require 'gnus-undo)
40
(require 'gnus-util)
41
(require 'mm-decode)
Dave Love's avatar
Dave Love committed
42
(require 'nnoo)
43

44
(autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t)
45
(autoload 'gnus-cache-write-active "gnus-cache")
46 47
(autoload 'gnus-mailing-list-insinuate "gnus-ml" nil t)
(autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" nil t)
48
(autoload 'gnus-pick-line-number "gnus-salt" nil t)
Dave Love's avatar
Dave Love committed
49
(autoload 'mm-uu-dissect "mm-uu")
50 51 52 53 54 55
(autoload 'gnus-article-outlook-deuglify-article "deuglify"
  "Deuglify broken Outlook (Express) articles and redisplay."
  t)
(autoload 'gnus-article-outlook-unwrap-lines "deuglify" nil t)
(autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t)
(autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
56 57 58 59 60 61 62 63 64 65 66 67

(defcustom gnus-kill-summary-on-exit t
  "*If non-nil, kill the summary buffer when you exit from it.
If nil, the summary will become a \"*Dead Summary*\" buffer, and
it will be killed sometime later."
  :group 'gnus-summary-exit
  :type 'boolean)

(defcustom gnus-fetch-old-headers nil
  "*Non-nil means that Gnus will try to build threads by grabbing old headers.
If an unread article in the group refers to an older, already read (or
just marked as read) article, the old article will not normally be
68
displayed in the Summary buffer.  If this variable is t, Gnus
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
69
will attempt to grab the headers to the old articles, and thereby
70 71 72 73 74
build complete threads.  If it has the value `some', only enough
headers to connect otherwise loose threads will be displayed.  This
variable can also be a number.  In that case, no more than that number
of old headers will be fetched.  If it has the value `invisible', all
old headers will be fetched, but none will be displayed.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
75 76 77 78

The server has to support NOV for any of this to work."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
79
		 (const :tag "on" t)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
80
		 (const some)
81
		 (const invisible)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
82 83 84
		 number
		 (sexp :menu-tag "other" t)))

85 86 87 88 89 90 91
(defcustom gnus-refer-thread-limit 200
  "*The number of old headers to fetch when doing \\<gnus-summary-mode-map>\\[gnus-summary-refer-thread].
If t, fetch all the available old headers."
  :group 'gnus-thread
  :type '(choice number
		 (sexp :menu-tag "other" t)))

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
(defcustom gnus-summary-make-false-root 'adopt
  "*nil means that Gnus won't gather loose threads.
If the root of a thread has expired or been read in a previous
session, the information necessary to build a complete thread has been
lost.  Instead of having many small sub-threads from this original thread
scattered all over the summary buffer, Gnus can gather them.

If non-nil, Gnus will try to gather all loose sub-threads from an
original thread into one large thread.

If this variable is non-nil, it should be one of `none', `adopt',
`dummy' or `empty'.

If this variable is `none', Gnus will not make a false root, but just
present the sub-threads after another.
If this variable is `dummy', Gnus will create a dummy root that will
have all the sub-threads as children.
If this variable is `adopt', Gnus will make one of the \"children\"
the parent and mark all the step-children as such.
If this variable is `empty', the \"children\" are printed with empty
subject fields.	 (Or rather, they will be printed with a string
given by the `gnus-summary-same-subject' variable.)"
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const none)
		 (const dummy)
		 (const adopt)
		 (const empty)))

121 122
(defcustom gnus-summary-make-false-root-always nil
  "Always make a false dummy root."
123
  :version "22.1"
124 125 126
  :group 'gnus-thread
  :type 'boolean)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
(defcustom gnus-summary-gather-exclude-subject "^ *$\\|^(none)$"
  "*A regexp to match subjects to be excluded from loose thread gathering.
As loose thread gathering is done on subjects only, that means that
there can be many false gatherings performed.  By rooting out certain
common subjects, gathering might become saner."
  :group 'gnus-thread
  :type 'regexp)

(defcustom gnus-summary-gather-subject-limit nil
  "*Maximum length of subject comparisons when gathering loose threads.
Use nil to compare full subjects.  Setting this variable to a low
number will help gather threads that have been corrupted by
newsreaders chopping off subject lines, but it might also mean that
unrelated articles that have subject that happen to begin with the
same few characters will be incorrectly gathered.

If this variable is `fuzzy', Gnus will use a fuzzy algorithm when
comparing subjects."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const fuzzy)
		 (sexp :menu-tag "on" t)))

150 151 152 153
(defcustom gnus-simplify-subject-functions nil
  "List of functions taking a string argument that simplify subjects.
The functions are applied recursively.

154 155 156
Useful functions to put in this list include:
`gnus-simplify-subject-re', `gnus-simplify-subject-fuzzy',
`gnus-simplify-whitespace', and `gnus-simplify-all-whitespace'."
157 158 159
  :group 'gnus-thread
  :type '(repeat function))

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
160
(defcustom gnus-simplify-ignored-prefixes nil
161
  "*Remove matches for this regexp from subject lines when simplifying fuzzily."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 regexp))

(defcustom gnus-build-sparse-threads nil
  "*If non-nil, fill in the gaps in threads.
If `some', only fill in the gaps that are needed to tie loose threads
together.  If `more', fill in all leaf nodes that Gnus can find.  If
non-nil and non-`some', fill in all gaps that Gnus manages to guess."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const some)
		 (const more)
		 (sexp :menu-tag "all" t)))

(defcustom gnus-summary-thread-gathering-function
  'gnus-gather-threads-by-subject
179
  "*Function used for gathering loose threads.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
180 181 182 183 184
There are two pre-defined functions: `gnus-gather-threads-by-subject',
which only takes Subjects into consideration; and
`gnus-gather-threads-by-references', which compared the References
headers of the articles to find matches."
  :group 'gnus-thread
185 186 187
  :type '(radio (function-item gnus-gather-threads-by-subject)
		(function-item gnus-gather-threads-by-references)
		(function :tag "other")))
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
188 189 190 191 192 193 194 195 196

(defcustom gnus-summary-same-subject ""
  "*String indicating that the current article has the same subject as the previous.
This variable will only be used if the value of
`gnus-summary-make-false-root' is `empty'."
  :group 'gnus-summary-format
  :type 'string)

(defcustom gnus-summary-goto-unread t
197 198 199 200 201 202
  "*If t, many commands will go to the next unread article.
This applies to marking commands as well as other commands that
\"naturally\" select the next article, like, for instance, `SPC' at
the end of an article.

If nil, the marking commands do NOT go to the next unread article
203
\(they go to the next article instead).  If `never', commands that
204 205
usually go to the next unread article, will go to the next article,
whether it is read or not."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
206 207 208 209 210 211 212 213 214 215 216 217 218 219
  :group 'gnus-summary-marks
  :link '(custom-manual "(gnus)Setting Marks")
  :type '(choice (const :tag "off" nil)
		 (const never)
		 (sexp :menu-tag "on" t)))

(defcustom gnus-summary-default-score 0
  "*Default article score level.
All scores generated by the score files will be added to this score.
If this variable is nil, scoring will be disabled."
  :group 'gnus-score-default
  :type '(choice (const :tag "disable")
		 integer))

220 221 222 223
(defcustom gnus-summary-default-high-score 0
  "*Default threshold for a high scored article.
An article will be highlighted as high scored if its score is greater
than this score."
224
  :version "22.1"
225 226 227 228 229 230 231
  :group 'gnus-score-default
  :type 'integer)

(defcustom gnus-summary-default-low-score 0
  "*Default threshold for a low scored article.
An article will be highlighted as low scored if its score is smaller
than this score."
232
  :version "22.1"
233 234 235
  :group 'gnus-score-default
  :type 'integer)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
(defcustom gnus-summary-zcore-fuzz 0
  "*Fuzziness factor for the zcore in the summary buffer.
Articles with scores closer than this to `gnus-summary-default-score'
will not be marked."
  :group 'gnus-summary-format
  :type 'integer)

(defcustom gnus-simplify-subject-fuzzy-regexp nil
  "*Strings to be removed when doing fuzzy matches.
This can either be a regular expression or list of regular expressions
that will be removed from subject strings if fuzzy subject
simplification is selected."
  :group 'gnus-thread
  :type '(repeat regexp))

(defcustom gnus-show-threads t
  "*If non-nil, display threads in summary mode."
  :group 'gnus-thread
  :type 'boolean)

(defcustom gnus-thread-hide-subtree nil
  "*If non-nil, hide all threads initially.
258
This can be a predicate specifier which says which threads to hide.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
259 260 261 262
If threads are hidden, you have to run the command
`gnus-summary-show-thread' by hand or use `gnus-select-article-hook'
to expose hidden threads."
  :group 'gnus-thread
263 264 265 266 267
  :type '(radio (sexp :format "Non-nil\n"
		      :match (lambda (widget value)
			       (not (or (consp value) (functionp value))))
		      :value t)
		(const nil)
268
		(sexp :tag "Predicate specifier")))
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
269 270 271 272 273 274

(defcustom gnus-thread-hide-killed t
  "*If non-nil, hide killed threads automatically."
  :group 'gnus-thread
  :type 'boolean)

275 276 277 278
(defcustom gnus-thread-ignore-subject t
  "*If non-nil, which is the default, ignore subjects and do all threading based on the Reference header.
If nil, articles that have different subjects from their parents will
start separate threads."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
  :group 'gnus-thread
  :type 'boolean)

(defcustom gnus-thread-operation-ignore-subject t
  "*If non-nil, subjects will be ignored when doing thread commands.
This affects commands like `gnus-summary-kill-thread' and
`gnus-summary-lower-thread'.

If this variable is nil, articles in the same thread with different
subjects will not be included in the operation in question.  If this
variable is `fuzzy', only articles that have subjects that are fuzzily
equal will be included."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const fuzzy)
		 (sexp :tag "on" t)))

(defcustom gnus-thread-indent-level 4
  "*Number that says how much each sub-thread should be indented."
  :group 'gnus-thread
  :type 'integer)

(defcustom gnus-auto-extend-newsgroup t
  "*If non-nil, extend newsgroup forward and backward when requested."
  :group 'gnus-summary-choose
  :type 'boolean)

(defcustom gnus-auto-select-first t
307 308 309 310 311 312
  "*If non-nil, select the article under point.
Which article this is is controlled by the `gnus-auto-select-subject'
variable.

If you want to prevent automatic selection of articles in some
newsgroups, set the variable to nil in `gnus-select-group-hook'."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
313 314
  :group 'gnus-group-select
  :type '(choice (const :tag "none" nil)
315 316 317 318 319 320 321 322 323
		 (sexp :menu-tag "first" t)))

(defcustom gnus-auto-select-subject 'unread
  "*Says what subject to place under point when entering a group.

This variable can either be the symbols `first' (place point on the
first subject), `unread' (place point on the subject line of the first
unread article), `best' (place point on the subject line of the
higest-scored article), `unseen' (place point on the subject line of
324
the first unseen article), `unseen-or-unread' (place point on the subject
325 326 327
line of the first unseen article or, if all article have been seen, on the
subject line of the first unread article), or a function to be called to
place point on some subject line."
328
  :version "22.1"
329 330 331 332 333 334
  :group 'gnus-group-select
  :type '(choice (const best)
		 (const unread)
		 (const first)
		 (const unseen)
	         (const unseen-or-unread)))
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
335 336 337 338

(defcustom gnus-auto-select-next t
  "*If non-nil, offer to go to the next group from the end of the previous.
If the value is t and the next newsgroup is empty, Gnus will exit
339 340
summary mode and go back to group mode.  If the value is neither nil
nor t, Gnus will select the following unread newsgroup.  In
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
341 342 343 344
particular, if the value is the symbol `quietly', the next unread
newsgroup will be selected without any confirmation, and if it is
`almost-quietly', the next group will be selected without any
confirmation if you are located on the last article in the group.
345
Finally, if this variable is `slightly-quietly', the `\\<gnus-summary-mode-map>\\[gnus-summary-catchup-and-goto-next-group]' command
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
346 347 348 349 350 351 352 353 354
will go to the next group without confirmation."
  :group 'gnus-summary-maneuvering
  :type '(choice (const :tag "off" nil)
		 (const quietly)
		 (const almost-quietly)
		 (const slightly-quietly)
		 (sexp :menu-tag "on" t)))

(defcustom gnus-auto-select-same nil
355 356 357
  "*If non-nil, select the next article with the same subject.
If there are no more articles with the same subject, go to
the first unread article."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
358 359 360
  :group 'gnus-summary-maneuvering
  :type 'boolean)

361 362 363 364 365 366 367 368 369 370 371
(defcustom gnus-auto-goto-ignores 'unfetched
  "*Says how to handle unfetched articles when maneuvering.

This variable can either be the symbols nil (maneuver to any
article), `undownloaded' (maneuvering while unplugged ignores articles
that have not been fetched), `always-undownloaded' (maneuvering always
ignores articles that have not been fetched), `unfetched' (maneuvering
ignores articles whose headers have not been fetched).

NOTE: The list of unfetched articles will always be nil when plugged
and, when unplugged, a subset of the undownloaded article list."
372
  :version "22.1"
373 374 375 376 377 378
  :group 'gnus-summary-maneuvering
  :type '(choice (const :tag "None" nil)
                 (const :tag "Undownloaded when unplugged" undownloaded)
                 (const :tag "Undownloaded" always-undownloaded)
                 (const :tag "Unfetched" unfetched)))

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
379 380 381 382 383 384 385 386 387 388 389 390 391 392
(defcustom gnus-summary-check-current nil
  "*If non-nil, consider the current article when moving.
The \"unread\" movement commands will stay on the same line if the
current article is unread."
  :group 'gnus-summary-maneuvering
  :type 'boolean)

(defcustom gnus-auto-center-summary t
  "*If non-nil, always center the current summary buffer.
In particular, if `vertical' do only vertical recentering.  If non-nil
and non-`vertical', do both horizontal and vertical recentering."
  :group 'gnus-summary-maneuvering
  :type '(choice (const :tag "none" nil)
		 (const vertical)
393
		 (integer :tag "height")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
394 395
		 (sexp :menu-tag "both" t)))

396 397 398
(defvar gnus-auto-center-group t
  "*If non-nil, always center the group buffer.")

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
399 400 401 402 403 404 405 406 407 408
(defcustom gnus-show-all-headers nil
  "*If non-nil, don't hide any headers."
  :group 'gnus-article-hiding
  :group 'gnus-article-headers
  :type 'boolean)

(defcustom gnus-summary-ignore-duplicates nil
  "*If non-nil, ignore articles with identical Message-ID headers."
  :group 'gnus-summary
  :type 'boolean)
409

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
(defcustom gnus-single-article-buffer t
  "*If non-nil, display all articles in the same buffer.
If nil, each group will get its own article buffer."
  :group 'gnus-article-various
  :type 'boolean)

(defcustom gnus-break-pages t
  "*If non-nil, do page breaking on articles.
The page delimiter is specified by the `gnus-page-delimiter'
variable."
  :group 'gnus-article-various
  :type 'boolean)

(defcustom gnus-move-split-methods nil
  "*Variable used to suggest where articles are to be moved to.
425 426 427
It uses the same syntax as the `gnus-split-methods' variable.
However, whereas `gnus-split-methods' specifies file names as targets,
this variable specifies group names."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
428
  :group 'gnus-summary-mail
429 430 431
  :type '(repeat (choice (list :value (fun) function)
			 (cons :value ("" "") regexp (repeat string))
			 (sexp :value nil))))
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
432

433 434 435
;; FIXME: Although the custom type is `character' for the following variables,
;; using multibyte characters (Latin-1, UTF-8) doesn't work.  -- rs

436
(defcustom gnus-unread-mark ?           ;Whitespace
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
  "*Mark used for unread articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-ticked-mark ?!
  "*Mark used for ticked articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-dormant-mark ??
  "*Mark used for dormant articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-del-mark ?r
  "*Mark used for del'd articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-read-mark ?R
  "*Mark used for read articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-expirable-mark ?E
  "*Mark used for expirable articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-killed-mark ?K
  "*Mark used for killed articles."
  :group 'gnus-summary-marks
  :type 'character)

471 472
(defcustom gnus-spam-mark ?$
  "*Mark used for spam articles."
473
  :version "22.1"
474 475 476
  :group 'gnus-summary-marks
  :type 'character)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
477
(defcustom gnus-souped-mark ?F
478
  "*Mark used for souped articles."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-kill-file-mark ?X
  "*Mark used for articles killed by kill files."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-low-score-mark ?Y
  "*Mark used for articles with a low score."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-catchup-mark ?C
  "*Mark used for articles that are caught up."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-replied-mark ?A
  "*Mark used for articles that have been replied to."
  :group 'gnus-summary-marks
  :type 'character)

502 503
(defcustom gnus-forwarded-mark ?F
  "*Mark used for articles that have been forwarded."
504
  :version "22.1"
505 506 507 508 509
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-recent-mark ?N
  "*Mark used for articles that are recent."
510
  :version "22.1"
511 512 513
  :group 'gnus-summary-marks
  :type 'character)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
514 515 516 517 518 519
(defcustom gnus-cached-mark ?*
  "*Mark used for articles that are in the cache."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-saved-mark ?S
520 521 522 523 524 525
  "*Mark used for articles that have been saved."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-unseen-mark ?.
  "*Mark used for articles that haven't been seen."
526
  :version "22.1"
527 528 529 530 531
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-no-mark ?               ;Whitespace
  "*Mark used for articles that have no other secondary mark."
532
  :version "22.1"
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-ancient-mark ?O
  "*Mark used for ancient articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-sparse-mark ?Q
  "*Mark used for sparsely reffed articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-canceled-mark ?G
  "*Mark used for canceled articles."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-duplicate-mark ?M
  "*Mark used for duplicate articles."
  :group 'gnus-summary-marks
  :type 'character)

556
(defcustom gnus-undownloaded-mark ?-
557
  "*Mark used for articles that weren't downloaded."
558
  :version "22.1"
559 560 561
  :group 'gnus-summary-marks
  :type 'character)

562 563 564 565 566
(defcustom gnus-downloaded-mark ?+
  "*Mark used for articles that were downloaded."
  :group 'gnus-summary-marks
  :type 'character)

567 568 569 570 571 572 573 574 575 576
(defcustom gnus-downloadable-mark ?%
  "*Mark used for articles that are to be downloaded."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-unsendable-mark ?=
  "*Mark used for articles that won't be sent."
  :group 'gnus-summary-marks
  :type 'character)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
577 578 579 580 581 582 583 584 585 586
(defcustom gnus-score-over-mark ?+
  "*Score mark used for articles with high scores."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-score-below-mark ?-
  "*Score mark used for articles with low scores."
  :group 'gnus-summary-marks
  :type 'character)

587
(defcustom gnus-empty-thread-mark ?     ;Whitespace
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
588 589 590 591 592 593 594 595 596 597 598 599 600 601
  "*There is no thread under the article."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-not-empty-thread-mark ?=
  "*There is a thread under the article."
  :group 'gnus-summary-marks
  :type 'character)

(defcustom gnus-view-pseudo-asynchronously nil
  "*If non-nil, Gnus will view pseudo-articles asynchronously."
  :group 'gnus-extract-view
  :type 'boolean)

602 603 604 605 606
(defcustom gnus-auto-expirable-marks
  (list gnus-killed-mark gnus-del-mark gnus-catchup-mark
	gnus-low-score-mark gnus-ancient-mark gnus-read-mark
	gnus-souped-mark gnus-duplicate-mark)
  "*The list of marks converted into expiration if a group is auto-expirable."
Dave Love's avatar
Dave Love committed
607
  :version "21.1"
608 609 610 611 612
  :group 'gnus-summary
  :type '(repeat character))

(defcustom gnus-inhibit-user-auto-expire t
  "*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on."
Dave Love's avatar
Dave Love committed
613
  :version "21.1"
614 615 616
  :group 'gnus-summary
  :type 'boolean)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638
(defcustom gnus-view-pseudos nil
  "*If `automatic', pseudo-articles will be viewed automatically.
If `not-confirm', pseudos will be viewed automatically, and the user
will not be asked to confirm the command."
  :group 'gnus-extract-view
  :type '(choice (const :tag "off" nil)
		 (const automatic)
		 (const not-confirm)))

(defcustom gnus-view-pseudos-separately t
  "*If non-nil, one pseudo-article will be created for each file to be viewed.
If nil, all files that use the same viewing command will be given as a
list of parameters to that command."
  :group 'gnus-extract-view
  :type 'boolean)

(defcustom gnus-insert-pseudo-articles t
  "*If non-nil, insert pseudo-articles when decoding articles."
  :group 'gnus-extract-view
  :type 'boolean)

(defcustom gnus-summary-dummy-line-format
639
  "   %(:                             :%) %S\n"
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
640 641 642 643
  "*The format specification for the dummy roots in the summary buffer.
It works along the same lines as a normal formatting string,
with some simple extensions.

644 645 646 647 648
%S  The subject

General format specifiers can also be used.
See `(gnus)Formatting Variables'."
  :link '(custom-manual "(gnus)Formatting Variables")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
649 650 651
  :group 'gnus-threading
  :type 'string)

652
(defcustom gnus-summary-mode-line-format "Gnus: %g [%A] %Z"
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
653 654 655 656 657 658 659
  "*The format specification for the summary mode line.
It works along the same lines as a normal formatting string,
with some simple extensions:

%G  Group name
%p  Unprefixed group name
%A  Current article number
660
%z  Current article score
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
661 662 663 664 665 666 667 668 669 670 671 672 673 674
%V  Gnus version
%U  Number of unread articles in the group
%e  Number of unselected articles in the group
%Z  A string with unread/unselected article counts
%g  Shortish group name
%S  Subject of the current article
%u  User-defined spec
%s  Current score file name
%d  Number of dormant articles
%r  Number of articles that have been marked as read in this session
%E  Number of articles expunged by the score files"
  :group 'gnus-summary-format
  :type 'string)

675 676 677
(defcustom gnus-list-identifiers nil
  "Regexp that matches list identifiers to be removed from subject.
This can also be a list of regexps."
Dave Love's avatar
Dave Love committed
678
  :version "21.1"
679 680 681 682 683 684
  :group 'gnus-summary-format
  :group 'gnus-article-hiding
  :type '(choice (const :tag "none" nil)
		 (regexp :value ".*")
		 (repeat :value (".*") regexp)))

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
685 686 687 688 689 690 691 692 693
(defcustom gnus-summary-mark-below 0
  "*Mark all articles with a score below this variable as read.
This variable is local to each summary buffer and usually set by the
score file."
  :group 'gnus-score-default
  :type 'integer)

(defcustom gnus-article-sort-functions '(gnus-article-sort-by-number)
  "*List of functions used for sorting articles in the summary buffer.
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710

Each function takes two articles and returns non-nil if the first
article should be sorted before the other.  If you use more than one
function, the primary sort function should be the last.  You should
probably always include `gnus-article-sort-by-number' in the list of
sorting functions -- preferably first.  Also note that sorting by date
is often much slower than sorting by number, and the sorting order is
very similar.  (Sorting by date means sorting by the time the message
was sent, sorting by number means sorting by arrival time.)

Ready-made functions include `gnus-article-sort-by-number',
`gnus-article-sort-by-author', `gnus-article-sort-by-subject',
`gnus-article-sort-by-date', `gnus-article-sort-by-random'
and `gnus-article-sort-by-score'.

When threading is turned on, the variable `gnus-thread-sort-functions'
controls how articles are sorted."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
711 712 713 714 715 716
  :group 'gnus-summary-sort
  :type '(repeat (choice (function-item gnus-article-sort-by-number)
			 (function-item gnus-article-sort-by-author)
			 (function-item gnus-article-sort-by-subject)
			 (function-item gnus-article-sort-by-date)
			 (function-item gnus-article-sort-by-score)
717
			 (function-item gnus-article-sort-by-random)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
718 719 720 721 722 723
			 (function :tag "other"))))

(defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number)
  "*List of functions used for sorting threads in the summary buffer.
By default, threads are sorted by article number.

724 725 726 727 728 729 730 731
Each function takes two threads and returns non-nil if the first
thread should be sorted before the other.  If you use more than one
function, the primary sort function should be the last.  You should
probably always include `gnus-thread-sort-by-number' in the list of
sorting functions -- preferably first.  Also note that sorting by date
is often much slower than sorting by number, and the sorting order is
very similar.  (Sorting by date means sorting by the time the message
was sent, sorting by number means sorting by arrival time.)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
732 733 734

Ready-made functions include `gnus-thread-sort-by-number',
`gnus-thread-sort-by-author', `gnus-thread-sort-by-subject',
735 736 737 738 739 740 741 742
`gnus-thread-sort-by-date', `gnus-thread-sort-by-score',
`gnus-thread-sort-by-most-recent-number',
`gnus-thread-sort-by-most-recent-date',
`gnus-thread-sort-by-random', and
`gnus-thread-sort-by-total-score' (see `gnus-thread-score-function').

When threading is turned off, the variable
`gnus-article-sort-functions' controls how articles are sorted."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
743 744 745 746 747 748 749
  :group 'gnus-summary-sort
  :type '(repeat (choice (function-item gnus-thread-sort-by-number)
			 (function-item gnus-thread-sort-by-author)
			 (function-item gnus-thread-sort-by-subject)
			 (function-item gnus-thread-sort-by-date)
			 (function-item gnus-thread-sort-by-score)
			 (function-item gnus-thread-sort-by-total-score)
750
			 (function-item gnus-thread-sort-by-random)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
751 752 753 754 755 756 757 758 759 760 761 762 763
			 (function :tag "other"))))

(defcustom gnus-thread-score-function '+
  "*Function used for calculating the total score of a thread.

The function is called with the scores of the article and each
subthread and should then return the score of the thread.

Some functions you can use are `+', `max', or `min'."
  :group 'gnus-summary-sort
  :type 'function)

(defcustom gnus-summary-expunge-below nil
764 765
  "All articles that have a score less than this variable will be expunged.
This variable is local to the summary buffers."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
766 767 768 769 770 771 772
  :group 'gnus-score-default
  :type '(choice (const :tag "off" nil)
		 integer))

(defcustom gnus-thread-expunge-below nil
  "All threads that have a total score less than this variable will be expunged.
See `gnus-thread-score-function' for en explanation of what a
773 774 775
\"thread score\" is.

This variable is local to the summary buffers."
776
  :group 'gnus-threading
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
777 778 779 780 781 782 783
  :group 'gnus-score-default
  :type '(choice (const :tag "off" nil)
		 integer))

(defcustom gnus-summary-mode-hook nil
  "*A hook for Gnus summary mode.
This hook is run before any variables are set in the summary buffer."
784
  :options '(turn-on-gnus-mailing-list-mode gnus-pick-mode)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
785 786 787
  :group 'gnus-summary-various
  :type 'hook)

788 789 790 791 792 793 794
;; Extracted from gnus-xmas-redefine in order to preserve user settings
(when (featurep 'xemacs)
  (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
  (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
  (add-hook 'gnus-summary-mode-hook
	    'gnus-xmas-switch-horizontal-scrollbar-off))

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
(defcustom gnus-summary-menu-hook nil
  "*Hook run after the creation of the summary mode menu."
  :group 'gnus-summary-visual
  :type 'hook)

(defcustom gnus-summary-exit-hook nil
  "*A hook called on exit from the summary buffer.
It will be called with point in the group buffer."
  :group 'gnus-summary-exit
  :type 'hook)

(defcustom gnus-summary-prepare-hook nil
  "*A hook called after the summary buffer has been generated.
If you want to modify the summary buffer, you can use this hook."
  :group 'gnus-summary-various
  :type 'hook)

812 813 814 815 816
(defcustom gnus-summary-prepared-hook nil
  "*A hook called as the last thing after the summary buffer has been generated."
  :group 'gnus-summary-various
  :type 'hook)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
817 818 819 820 821 822 823 824 825 826 827 828 829 830
(defcustom gnus-summary-generate-hook nil
  "*A hook run just before generating the summary buffer.
This hook is commonly used to customize threading variables and the
like."
  :group 'gnus-summary-various
  :type 'hook)

(defcustom gnus-select-group-hook nil
  "*A hook called when a newsgroup is selected.

If you'd like to simplify subjects like the
`gnus-summary-next-same-subject' command does, you can use the
following hook:

831 832 833 834 835 836 837 838
 (add-hook gnus-select-group-hook
	   (lambda ()
	     (mapcar (lambda (header)
		       (mail-header-set-subject
			header
			(gnus-simplify-subject
			 (mail-header-subject header) 're-only)))
		     gnus-newsgroup-headers)))"
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
839 840 841 842 843 844
  :group 'gnus-group-select
  :type 'hook)

(defcustom gnus-select-article-hook nil
  "*A hook called when an article is selected."
  :group 'gnus-summary-choose
845
  :options '(gnus-agent-fetch-selected-article)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
846 847 848 849 850 851 852 853 854 855
  :type 'hook)

(defcustom gnus-visual-mark-article-hook
  (list 'gnus-highlight-selected-summary)
  "*Hook run after selecting an article in the summary buffer.
It is meant to be used for highlighting the article in some way.  It
is not run if `gnus-visual' is nil."
  :group 'gnus-summary-visual
  :type 'hook)

856
(defcustom gnus-parse-headers-hook nil
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
857 858 859 860 861
  "*A hook called before parsing the headers."
  :group 'gnus-various
  :type 'hook)

(defcustom gnus-exit-group-hook nil
862 863
  "*A hook called when exiting summary mode.
This hook is not called from the non-updating exit commands like `Q'."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894
  :group 'gnus-various
  :type 'hook)

(defcustom gnus-summary-update-hook
  (list 'gnus-summary-highlight-line)
  "*A hook called when a summary line is changed.
The hook will not be called if `gnus-visual' is nil.

The default function `gnus-summary-highlight-line' will
highlight the line according to the `gnus-summary-highlight'
variable."
  :group 'gnus-summary-visual
  :type 'hook)

(defcustom gnus-mark-article-hook '(gnus-summary-mark-read-and-unread-as-read)
  "*A hook called when an article is selected for the first time.
The hook is intended to mark an article as read (or unread)
automatically when it is selected."
  :group 'gnus-summary-choose
  :type 'hook)

(defcustom gnus-group-no-more-groups-hook nil
  "*A hook run when returning to group mode having no more (unread) groups."
  :group 'gnus-group-select
  :type 'hook)

(defcustom gnus-ps-print-hook nil
  "*A hook run before ps-printing something from Gnus."
  :group 'gnus-summary
  :type 'hook)

895 896
(defcustom gnus-summary-article-move-hook nil
  "*A hook called after an article is moved, copied, respooled, or crossposted."
897
  :version "22.1"
898 899 900 901 902
  :group 'gnus-summary
  :type 'hook)

(defcustom gnus-summary-article-delete-hook nil
  "*A hook called after an article is deleted."
903
  :version "22.1"
904 905 906 907 908
  :group 'gnus-summary
  :type 'hook)

(defcustom gnus-summary-article-expire-hook nil
  "*A hook called after an article is expired."
909
  :version "22.1"
910 911 912 913 914 915 916
  :group 'gnus-summary
  :type 'hook)

(defcustom gnus-summary-display-arrow
  (and (fboundp 'display-graphic-p)
       (display-graphic-p))
  "*If non-nil, display an arrow highlighting the current article."
917
  :version "22.1"
918 919 920
  :group 'gnus-summary
  :type 'boolean)

921
(defcustom gnus-summary-selected-face 'gnus-summary-selected
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
922 923 924 925
  "Face used for highlighting the current article in the summary buffer."
  :group 'gnus-summary-visual
  :type 'face)

926 927
(defvar gnus-tmp-downloaded nil)

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
928
(defcustom gnus-summary-highlight
929
  '(((eq mark gnus-canceled-mark)
930
     . gnus-summary-cancelled)
931
    ((and uncached (> score default-high))
932
     . gnus-summary-high-undownloaded)
933
    ((and uncached (< score default-low))
934
     . gnus-summary-low-undownloaded)
935
    (uncached
936
     . gnus-summary-normal-undownloaded)
937 938 939
    ((and (> score default-high)
	  (or (eq mark gnus-dormant-mark)
	      (eq mark gnus-ticked-mark)))
940
     . gnus-summary-high-ticked)
941 942 943
    ((and (< score default-low)
	  (or (eq mark gnus-dormant-mark)
	      (eq mark gnus-ticked-mark)))
944
     . gnus-summary-low-ticked)
945 946
    ((or (eq mark gnus-dormant-mark)
	 (eq mark gnus-ticked-mark))
947
     . gnus-summary-normal-ticked)
948
    ((and (> score default-high) (eq mark gnus-ancient-mark))
949
     . gnus-summary-high-ancient)
950
    ((and (< score default-low) (eq mark gnus-ancient-mark))
951
     . gnus-summary-low-ancient)
952
    ((eq mark gnus-ancient-mark)
953
     . gnus-summary-normal-ancient)
954
    ((and (> score default-high) (eq mark gnus-unread-mark))
955
     . gnus-summary-high-unread)
956
    ((and (< score default-low) (eq mark gnus-unread-mark))
957
     . gnus-summary-low-unread)
958
    ((eq mark gnus-unread-mark)
959
     . gnus-summary-normal-unread)
960
    ((> score default-high)
961
     . gnus-summary-high-read)
962
    ((< score default-low)
963
     . gnus-summary-low-read)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
964
    (t
965
     . gnus-summary-normal-read))
966
  "*Controls the highlighting of summary buffer lines.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
967

968 969 970 971
A list of (FORM . FACE) pairs.  When deciding how a a particular
summary line should be displayed, each form is evaluated.  The content
of the face field after the first true form is used.  You can change
how those summary lines are displayed, by editing the face field.
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
972 973 974

You can use the following variables in the FORM field.

975 976 977 978 979 980 981
score:        The article's score
default:      The default article score.
default-high: The default score for high scored articles.
default-low:  The default score for low scored articles.
below:        The score below which articles are automatically marked as read.
mark:         The article's mark.
uncached:     Non-nil if the article is uncached."
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
982 983 984 985
  :group 'gnus-summary-visual
  :type '(repeat (cons (sexp :tag "Form" nil)
		       face)))

986 987 988
(defcustom gnus-alter-header-function nil
  "Function called to allow alteration of article header structures.
The function is called with one parameter, the article header vector,
989 990 991 992
which it may alter in any way."
  :type '(choice (const :tag "None" nil)
		 function)
  :group 'gnus-summary)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
993

994 995 996
(defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
  "Variable that says which function should be used to decode a string with encoded words.")

997
(defcustom gnus-extra-headers '(To Newsgroups)
998
  "*Extra headers to parse."
Dave Love's avatar
Dave Love committed
999
  :version "21.1"
1000 1001 1002 1003 1004 1005
  :group 'gnus-summary
  :type '(repeat symbol))

(defcustom gnus-ignored-from-addresses
  (and user-mail-address (regexp-quote user-mail-address))
  "*Regexp of From headers that may be suppressed in favor of To headers."
Dave Love's avatar
Dave Love committed
1006
  :version "21.1"
1007 1008 1009 1010 1011 1012 1013
  :group 'gnus-summary
  :type 'regexp)

(defcustom gnus-newsgroup-ignored-charsets '(unknown-8bit x-unknown)
  "List of charsets that should be ignored.
When these charsets are used in the \"charset\" parameter, the
default charset will be used instead."
Dave Love's avatar
Dave Love committed
1014
  :version "21.1"
1015 1016 1017
  :type '(repeat symbol)
  :group 'gnus-charset)

1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
(gnus-define-group-parameter
 ignored-charsets
 :type list
 :function-document
 "Return the ignored charsets of GROUP."
 :variable gnus-group-ignored-charsets-alist
 :variable-default
 '(("alt\\.chinese\\.text" iso-8859-1))
 :variable-document
 "Alist of regexps (to match group names) and charsets that should be ignored.
1028 1029
When these charsets are used in the \"charset\" parameter, the
default charset will be used instead."
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
 :variable-group gnus-charset
 :variable-type '(repeat (cons (regexp :tag "Group")
			       (repeat symbol)))
 :parameter-type '(choice :tag "Ignored charsets"
			  :value nil
			  (repeat (symbol)))
 :parameter-document       "\
List of charsets that should be ignored.

When these charsets are used in the \"charset\" parameter, the
default charset will be used instead.")
1041 1042 1043 1044

(defcustom gnus-group-highlight-words-alist nil
  "Alist of group regexps and highlight regexps.
This variable uses the same syntax as `gnus-emphasis-alist'."
Dave Love's avatar
Dave Love committed
1045
  :version "21.1"
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059
  :type '(repeat (cons (regexp :tag "Group")
		       (repeat (list (regexp :tag "Highlight regexp")
				     (number :tag "Group for entire word" 0)
				     (number :tag "Group for displayed part" 0)
				     (symbol :tag "Face"
					     gnus-emphasis-highlight-words)))))
  :group 'gnus-summary-visual)

(defcustom gnus-summary-show-article-charset-alist
  nil
  "Alist of number and charset.
The article will be shown with the charset corresponding to the
numbered argument.
For example: ((1 . cn-gb-2312) (2 . big5))."
Dave Love's avatar
Dave Love committed
1060
  :version "21.1"
1061 1062 1063 1064 1065 1066
  :type '(repeat (cons (number :tag "Argument" 1)
		       (symbol :tag "Charset")))
  :group 'gnus-charset)

(defcustom gnus-preserve-marks t
  "Whether marks are preserved when moving, copying and respooling messages."
Dave Love's avatar
Dave Love committed
1067
  :version "21.1"
1068 1069 1070 1071 1072
  :type 'boolean
  :group 'gnus-summary-marks)

(defcustom gnus-alter-articles-to-read-function nil
  "Function to be called to alter the list of articles to be selected."
1073
  :type '(choice (const nil) function)
1074 1075 1076 1077 1078 1079 1080 1081
  :group 'gnus-summary)

(defcustom gnus-orphan-score nil
  "*All orphans get this score added.  Set in the score file."
  :group 'gnus-score-default
  :type '(choice (const nil)
		 integer))

Dave Love's avatar
Dave Love committed
1082
(defcustom gnus-summary-save-parts-default-mime "image/.*"
1083 1084 1085 1086
  "*A regexp to match MIME parts when saving multiple parts of a
message with `gnus-summary-save-parts' (\\<gnus-summary-mode-map>\\[gnus-summary-save-parts]).
This regexp will be used by default when prompting the user for which
type of files to save."
Dave Love's avatar
Dave Love committed
1087 1088 1089
  :group 'gnus-summary
  :type 'regexp)

1090 1091 1092 1093 1094
(defcustom gnus-read-all-available-headers nil
  "Whether Gnus should parse all headers made available to it.
This is mostly relevant for slow back ends where the user may
wish to widen the summary buffer to include all headers
that were fetched.  Say, for nnultimate groups."
1095
  :version "22.1"
1096 1097 1098 1099 1100
  :group 'gnus-summary
  :type '(choice boolean regexp))

(defcustom gnus-summary-muttprint-program "muttprint"
  "Command (and optional arguments) used to run Muttprint."
1101
  :version "22.1"
1102 1103 1104 1105 1106 1107
  :group 'gnus-summary
  :type 'string)

(defcustom gnus-article-loose-mime nil
  "If non-nil, don't require MIME-Version header.
Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not
1108
supply the MIME-Version header or deliberately strip it from the mail.
1109 1110
Set it to non-nil, Gnus will treat some articles as MIME even if
the MIME-Version header is missed."
1111
  :version "22.1"
1112 1113 1114 1115 1116 1117 1118 1119
  :type 'boolean
  :group 'gnus-article-mime)

(defcustom gnus-article-emulate-mime t
  "If non-nil, use MIME emulation for uuencode and the like.
This means that Gnus will search message bodies for text that look
like uuencoded bits, yEncoded bits, and so on, and present that using
the normal Gnus MIME machinery."
1120
  :version "22.1"
1121 1122
  :type 'boolean
  :group 'gnus-article-mime)
Dave Love's avatar
Dave Love committed
1123

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1124 1125
;;; Internal variables

1126
(defvar gnus-summary-display-cache nil)
1127 1128
(defvar gnus-article-mime-handles nil)
(defvar gnus-article-decoded-p nil)
1129 1130
(defvar gnus-article-charset nil)
(defvar gnus-article-ignored-charsets nil)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1131 1132 1133 1134 1135 1136 1137 1138 1139
(defvar gnus-scores-exclude-files nil)
(defvar gnus-page-broken nil)

(defvar gnus-original-article nil)
(defvar gnus-article-internal-prepare-hook nil)
(defvar gnus-newsgroup-process-stack nil)

(defvar gnus-thread-indent-array nil)
(defvar gnus-thread-indent-array-level gnus-thread-indent-level)
1140 1141
(defvar gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number
  "Function called to sort the articles within a thread after it has been gathered together.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1142

Dave Love's avatar
Dave Love committed
1143
(defvar gnus-summary-save-parts-type-history nil)
1144
(defvar gnus-summary-save-parts-last-directory mm-default-directory)
Dave Love's avatar
Dave Love committed
1145

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1146 1147 1148 1149 1150 1151 1152 1153 1154
;; Avoid highlighting in kill files.
(defvar gnus-summary-inhibit-highlight nil)
(defvar gnus-newsgroup-selected-overlay nil)
(defvar gnus-inhibit-limiting nil)
(defvar gnus-newsgroup-adaptive-score-file nil)
(defvar gnus-current-score-file nil)
(defvar gnus-current-move-group nil)
(defvar gnus-current-copy-group nil)
(defvar gnus-current-crosspost-group nil)
1155
(defvar gnus-newsgroup-display nil)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175

(defvar gnus-newsgroup-dependencies nil)
(defvar gnus-newsgroup-adaptive nil)
(defvar gnus-summary-display-article-function nil)
(defvar gnus-summary-highlight-line-function nil
  "Function called after highlighting a summary line.")

(defvar gnus-summary-line-format-alist
  `((?N ,(macroexpand '(mail-header-number gnus-tmp-header)) ?d)
    (?S ,(macroexpand '(mail-header-subject gnus-tmp-header)) ?s)
    (?s gnus-tmp-subject-or-nil ?s)
    (?n gnus-tmp-name ?s)
    (?A (car (cdr (funcall gnus-extract-address-components gnus-tmp-from)))
	?s)
    (?a (or (car (funcall gnus-extract-address-components gnus-tmp-from))
	    gnus-tmp-from) ?s)
    (?F gnus-tmp-from ?s)
    (?x ,(macroexpand '(mail-header-xref gnus-tmp-header)) ?s)
    (?D ,(macroexpand '(mail-header-date gnus-tmp-header)) ?s)
    (?d (gnus-dd-mmm (mail-header-date gnus-tmp-header)) ?s)
1176
    (?o (gnus-date-iso8601 (mail-header-date gnus-tmp-header)) ?s)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1177 1178 1179
    (?M ,(macroexpand '(mail-header-id gnus-tmp-header)) ?s)
    (?r ,(macroexpand '(mail-header-references gnus-tmp-header)) ?s)
    (?c (or (mail-header-chars gnus-tmp-header) 0) ?d)
1180 1181 1182
    (?k (gnus-summary-line-message-size gnus-tmp-header) ?s)
    (?L gnus-tmp-lines ?s)
    (?O gnus-tmp-downloaded ?c)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194
    (?I gnus-tmp-indentation ?s)
    (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s)
    (?R gnus-tmp-replied ?c)
    (?\[ gnus-tmp-opening-bracket ?c)
    (?\] gnus-tmp-closing-bracket ?c)
    (?\> (make-string gnus-tmp-level ? ) ?s)
    (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
    (?i gnus-tmp-score ?d)
    (?z gnus-tmp-score-char ?c)
    (?l (bbb-grouplens-score gnus-tmp-header) ?s)
    (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d)
    (?U gnus-tmp-unread ?c)
1195 1196
    (?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)
	?s)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1197 1198 1199 1200 1201 1202 1203
    (?t (gnus-summary-number-of-articles-in-thread
	 (and (boundp 'thread) (car thread)) gnus-tmp-level)
	?d)
    (?e (gnus-summary-number-of-articles-in-thread
	 (and (boundp 'thread) (car thread)) gnus-tmp-level t)
	?c)
    (?u gnus-tmp-user-defined ?s)
1204 1205 1206 1207
    (?P (gnus-pick-line-number) ?d)
    (?B gnus-tmp-thread-tree-header-string ?s)
    (user-date (gnus-user-date
		,(macroexpand '(mail-header-date gnus-tmp-header))) ?s))
1208 1209 1210
  "An alist of format specifications that can appear in summary lines.
These are paired with what variables they correspond with, along with
the type of the variable (string, integer, character, etc).")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229

(defvar gnus-summary-dummy-line-format-alist
  `((?S gnus-tmp-subject ?s)
    (?N gnus-tmp-number ?d)
    (?u gnus-tmp-user-defined ?s)))

(defvar gnus-summary-mode-line-format-alist
  `((?G gnus-tmp-group-name ?s)
    (?g (gnus-short-group-name gnus-tmp-group-name) ?s)
    (?p (gnus-group-real-name gnus-tmp-group-name) ?s)
    (?A gnus-tmp-article-number ?d)
    (?Z gnus-tmp-unread-and-unselected ?s)
    (?V gnus-version ?s)
    (?U gnus-tmp-unread-and-unticked ?d)
    (?S gnus-tmp-subject ?s)
    (?e gnus-tmp-unselected ?d)
    (?u gnus-tmp-user-defined ?s)
    (?d (length gnus-newsgroup-dormant) ?d)
    (?t (length gnus-newsgroup-marked) ?d)
1230
    (?h (length gnus-newsgroup-spam-marked) ?d)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1231
    (?r (length gnus-newsgroup-reads) ?d)
1232
    (?z (gnus-summary-article-score gnus-tmp-article-number) ?d)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1233 1234 1235 1236 1237 1238 1239 1240 1241
    (?E gnus-newsgroup-expunged-tally ?d)
    (?s (gnus-current-score-file-nondirectory) ?s)))

(defvar gnus-last-search-regexp nil
  "Default regexp for article search command.")

(defvar gnus-last-shell-command nil
  "Default shell command on article.")

1242 1243
(defvar gnus-newsgroup-agentized nil
  "Locally bound in each summary buffer to indicate whether the server has been agentized.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256
(defvar gnus-newsgroup-begin nil)
(defvar gnus-newsgroup-end nil)
(defvar gnus-newsgroup-last-rmail nil)
(defvar gnus-newsgroup-last-mail nil)
(defvar gnus-newsgroup-last-folder nil)
(defvar gnus-newsgroup-last-file nil)
(defvar gnus-newsgroup-auto-expire nil)
(defvar gnus-newsgroup-active nil)

(defvar gnus-newsgroup-data nil)
(defvar gnus-newsgroup-data-reverse nil)
(defvar gnus-newsgroup-limit nil)
(defvar gnus-newsgroup-limits nil)
1257
(defvar gnus-summary-use-undownloaded-faces nil)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1258 1259

(defvar gnus-newsgroup-unreads nil
1260
  "Sorted list of unread articles in the current newsgroup.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1261 1262

(defvar gnus-newsgroup-unselected nil
1263
  "Sorted list of unselected unread articles in the current newsgroup.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1264 1265 1266 1267 1268 1269 1270

(defvar gnus-newsgroup-reads nil
  "Alist of read articles and article marks in the current newsgroup.")

(defvar gnus-newsgroup-expunged-tally nil)

(defvar gnus-newsgroup-marked nil
1271 1272 1273 1274
  "Sorted list of ticked articles in the current newsgroup (a subset of unread art).")

(defvar gnus-newsgroup-spam-marked nil
  "List of ranges of articles that have been marked as spam.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1275 1276 1277 1278 1279

(defvar gnus-newsgroup-killed nil
  "List of ranges of articles that have been through the scoring process.")

(defvar gnus-newsgroup-cached nil
1280
  "Sorted list of articles that come from the article cache.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1281 1282 1283 1284 1285 1286 1287 1288 1289

(defvar gnus-newsgroup-saved nil
  "List of articles that have been saved.")

(defvar gnus-newsgroup-kill-headers nil)

(defvar gnus-newsgroup-replied nil
  "List of articles that have been replied to in the current newsgroup.")

1290 1291 1292 1293 1294 1295
(defvar gnus-newsgroup-forwarded nil
  "List of articles that have been forwarded in the current newsgroup.")

(defvar gnus-newsgroup-recent nil
  "List of articles that have are recent in the current newsgroup.")

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1296
(defvar gnus-newsgroup-expirable nil
1297
  "Sorted list of articles in the current newsgroup that can be expired.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1298 1299 1300 1301

(defvar gnus-newsgroup-processable nil
  "List of articles in the current newsgroup that can be processed.")

1302
(defvar gnus-newsgroup-downloadable nil
1303 1304 1305 1306 1307 1308 1309
  "Sorted list of articles in the current newsgroup that can be processed.")

(defvar gnus-newsgroup-unfetched nil
  "Sorted list of articles in the current newsgroup whose headers have
not been fetched into the agent.

This list will always be a subset of gnus-newsgroup-undownloaded.")
1310 1311

(defvar gnus-newsgroup-undownloaded nil
1312
  "List of articles in the current newsgroup that haven't been downloaded.")
1313 1314 1315 1316

(defvar gnus-newsgroup-unsendable nil
  "List of articles in the current newsgroup that won't be sent.")

Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1317 1318 1319 1320
(defvar gnus-newsgroup-bookmarks nil
  "List of articles in the current newsgroup that have bookmarks.")

(defvar gnus-newsgroup-dormant nil
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330
  "Sorted list of dormant articles in the current newsgroup.")

(defvar gnus-newsgroup-unseen nil
  "List of unseen articles in the current newsgroup.")

(defvar gnus-newsgroup-seen nil
  "Range of seen articles in the current newsgroup.")

(defvar gnus-newsgroup-articles nil
  "List of articles in the current newsgroup.")
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353

(defvar gnus-newsgroup-scored nil
  "List of scored articles in the current newsgroup.")

(defvar gnus-newsgroup-headers nil
  "List of article headers in the current newsgroup.")

(defvar gnus-newsgroup-threads nil)

(defvar gnus-newsgroup-prepared nil
  "Whether the current group has been prepared properly.")

(defvar gnus-newsgroup-ancient nil
  "List of `gnus-fetch-old-headers' articles in the current newsgroup.")

(defvar gnus-newsgroup-sparse nil)

(defvar gnus-current-article nil)
(defvar gnus-article-current nil)
(defvar gnus-current-headers nil)
(defvar gnus-have-all-headers nil)
(defvar gnus-last-article nil)
(defvar gnus-newsgroup-history nil)
1354 1355 1356
(defvar gnus-newsgroup-charset nil)
(defvar gnus-newsgroup-ephemeral-charset nil)
(defvar gnus-newsgroup-ephemeral-ignored-charsets nil)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1357

1358 1359 1360
(defvar gnus-article-before-search nil)

(defvar gnus-summary-local-variables
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1361 1362 1363 1364 1365 1366
  '(gnus-newsgroup-name
    gnus-newsgroup-begin gnus-newsgroup-end
    gnus-newsgroup-last-rmail gnus-newsgroup-last-mail
    gnus-newsgroup-last-folder gnus-newsgroup-last-file
    gnus-newsgroup-auto-expire gnus-newsgroup-unreads
    gnus-newsgroup-unselected gnus-newsgroup-marked
1367
    gnus-newsgroup-spam-marked
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1368
    gnus-newsgroup-reads gnus-newsgroup-saved
1369 1370 1371
    gnus-newsgroup-replied gnus-newsgroup-forwarded
    gnus-newsgroup-recent
    gnus-newsgroup-expirable
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1372
    gnus-newsgroup-processable gnus-newsgroup-killed
1373
    gnus-newsgroup-downloadable gnus-newsgroup-undownloaded
1374 1375 1376
    gnus-newsgroup-unfetched
    gnus-newsgroup-unsendable gnus-newsgroup-unseen
    gnus-newsgroup-seen gnus-newsgroup-articles
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1377 1378 1379 1380 1381 1382 1383 1384
    gnus-newsgroup-bookmarks gnus-newsgroup-dormant
    gnus-newsgroup-headers gnus-newsgroup-threads
    gnus-newsgroup-prepared gnus-summary-highlight-line-function
    gnus-current-article gnus-current-headers gnus-have-all-headers
    gnus-last-article gnus-article-internal-prepare-hook
    gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay
    gnus-newsgroup-scored gnus-newsgroup-kill-headers
    gnus-thread-expunge-below
1385 1386
    gnus-score-alist gnus-current-score-file
    (gnus-summary-expunge-below . global)
Lars Magne Ingebrigtsen's avatar
Lars Magne Ingebrigtsen committed
1387
    (gnus-summary-mark-below . global)