1 ;;; gnus-sum.el --- summary mode commands for Gnus
2 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
3 ;; Free Software Foundation, Inc.
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
31 (defvar tool-bar-map))
43 (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t)
44 (autoload 'gnus-cache-write-active "gnus-cache")
45 (autoload 'gnus-mailing-list-insinuate "gnus-ml" nil t)
46 (autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" nil t)
47 (autoload 'gnus-pick-line-number "gnus-salt" nil t)
48 (autoload 'mm-uu-dissect "mm-uu")
49 (autoload 'gnus-article-outlook-deuglify-article "deuglify"
50 "Deuglify broken Outlook (Express) articles and redisplay."
52 (autoload 'gnus-article-outlook-unwrap-lines "deuglify" nil t)
53 (autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t)
54 (autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t)
56 (defcustom gnus-kill-summary-on-exit t
57 "*If non-nil, kill the summary buffer when you exit from it.
58 If nil, the summary will become a \"*Dead Summary*\" buffer, and
59 it will be killed sometime later."
60 :group 'gnus-summary-exit
63 (defcustom gnus-fetch-old-headers nil
64 "*Non-nil means that Gnus will try to build threads by grabbing old headers.
65 If an unread article in the group refers to an older, already read (or
66 just marked as read) article, the old article will not normally be
67 displayed in the Summary buffer. If this variable is non-nil, Gnus
68 will attempt to grab the headers to the old articles, and thereby
69 build complete threads. If it has the value `some', only enough
70 headers to connect otherwise loose threads will be displayed. This
71 variable can also be a number. In that case, no more than that number
72 of old headers will be fetched. If it has the value `invisible', all
73 old headers will be fetched, but none will be displayed.
75 The server has to support NOV for any of this to work."
77 :type '(choice (const :tag "off" nil)
80 (sexp :menu-tag "other" t)))
82 (defcustom gnus-refer-thread-limit 200
83 "*The number of old headers to fetch when doing \\<gnus-summary-mode-map>\\[gnus-summary-refer-thread].
84 If t, fetch all the available old headers."
87 (sexp :menu-tag "other" t)))
89 (defcustom gnus-summary-make-false-root 'adopt
90 "*nil means that Gnus won't gather loose threads.
91 If the root of a thread has expired or been read in a previous
92 session, the information necessary to build a complete thread has been
93 lost. Instead of having many small sub-threads from this original thread
94 scattered all over the summary buffer, Gnus can gather them.
96 If non-nil, Gnus will try to gather all loose sub-threads from an
97 original thread into one large thread.
99 If this variable is non-nil, it should be one of `none', `adopt',
102 If this variable is `none', Gnus will not make a false root, but just
103 present the sub-threads after another.
104 If this variable is `dummy', Gnus will create a dummy root that will
105 have all the sub-threads as children.
106 If this variable is `adopt', Gnus will make one of the \"children\"
107 the parent and mark all the step-children as such.
108 If this variable is `empty', the \"children\" are printed with empty
109 subject fields. (Or rather, they will be printed with a string
110 given by the `gnus-summary-same-subject' variable.)"
112 :type '(choice (const :tag "off" nil)
118 (defcustom gnus-summary-make-false-root-always nil
119 "Always make a false dummy root."
123 (defcustom gnus-summary-gather-exclude-subject "^ *$\\|^(none)$"
124 "*A regexp to match subjects to be excluded from loose thread gathering.
125 As loose thread gathering is done on subjects only, that means that
126 there can be many false gatherings performed. By rooting out certain
127 common subjects, gathering might become saner."
131 (defcustom gnus-summary-gather-subject-limit nil
132 "*Maximum length of subject comparisons when gathering loose threads.
133 Use nil to compare full subjects. Setting this variable to a low
134 number will help gather threads that have been corrupted by
135 newsreaders chopping off subject lines, but it might also mean that
136 unrelated articles that have subject that happen to begin with the
137 same few characters will be incorrectly gathered.
139 If this variable is `fuzzy', Gnus will use a fuzzy algorithm when
142 :type '(choice (const :tag "off" nil)
144 (sexp :menu-tag "on" t)))
146 (defcustom gnus-simplify-subject-functions nil
147 "List of functions taking a string argument that simplify subjects.
148 The functions are applied recursively.
150 Useful functions to put in this list include:
151 `gnus-simplify-subject-re', `gnus-simplify-subject-fuzzy',
152 `gnus-simplify-whitespace', and `gnus-simplify-all-whitespace'."
154 :type '(repeat function))
156 (defcustom gnus-simplify-ignored-prefixes nil
157 "*Remove matches for this regexp from subject lines when simplifying fuzzily."
159 :type '(choice (const :tag "off" nil)
162 (defcustom gnus-build-sparse-threads nil
163 "*If non-nil, fill in the gaps in threads.
164 If `some', only fill in the gaps that are needed to tie loose threads
165 together. If `more', fill in all leaf nodes that Gnus can find. If
166 non-nil and non-`some', fill in all gaps that Gnus manages to guess."
168 :type '(choice (const :tag "off" nil)
171 (sexp :menu-tag "all" t)))
173 (defcustom gnus-summary-thread-gathering-function
174 'gnus-gather-threads-by-subject
175 "*Function used for gathering loose threads.
176 There are two pre-defined functions: `gnus-gather-threads-by-subject',
177 which only takes Subjects into consideration; and
178 `gnus-gather-threads-by-references', which compared the References
179 headers of the articles to find matches."
181 :type '(radio (function-item gnus-gather-threads-by-subject)
182 (function-item gnus-gather-threads-by-references)
183 (function :tag "other")))
185 (defcustom gnus-summary-same-subject ""
186 "*String indicating that the current article has the same subject as the previous.
187 This variable will only be used if the value of
188 `gnus-summary-make-false-root' is `empty'."
189 :group 'gnus-summary-format
192 (defcustom gnus-summary-goto-unread t
193 "*If t, many commands will go to the next unread article.
194 This applies to marking commands as well as other commands that
195 \"naturally\" select the next article, like, for instance, `SPC' at
196 the end of an article.
198 If nil, the marking commands do NOT go to the next unread article
199 \(they go to the next article instead). If `never', commands that
200 usually go to the next unread article, will go to the next article,
201 whether it is read or not."
202 :group 'gnus-summary-marks
203 :link '(custom-manual "(gnus)Setting Marks")
204 :type '(choice (const :tag "off" nil)
206 (sexp :menu-tag "on" t)))
208 (defcustom gnus-summary-default-score 0
209 "*Default article score level.
210 All scores generated by the score files will be added to this score.
211 If this variable is nil, scoring will be disabled."
212 :group 'gnus-score-default
213 :type '(choice (const :tag "disable")
216 (defcustom gnus-summary-default-high-score 0
217 "*Default threshold for a high scored article.
218 An article will be highlighted as high scored if its score is greater
220 :group 'gnus-score-default
223 (defcustom gnus-summary-default-low-score 0
224 "*Default threshold for a low scored article.
225 An article will be highlighted as low scored if its score is smaller
227 :group 'gnus-score-default
230 (defcustom gnus-summary-zcore-fuzz 0
231 "*Fuzziness factor for the zcore in the summary buffer.
232 Articles with scores closer than this to `gnus-summary-default-score'
234 :group 'gnus-summary-format
237 (defcustom gnus-simplify-subject-fuzzy-regexp nil
238 "*Strings to be removed when doing fuzzy matches.
239 This can either be a regular expression or list of regular expressions
240 that will be removed from subject strings if fuzzy subject
241 simplification is selected."
243 :type '(repeat regexp))
245 (defcustom gnus-show-threads t
246 "*If non-nil, display threads in summary mode."
250 (defcustom gnus-thread-hide-subtree nil
251 "*If non-nil, hide all threads initially.
252 This can be a predicate specifier which says which threads to hide.
253 If threads are hidden, you have to run the command
254 `gnus-summary-show-thread' by hand or use `gnus-select-article-hook'
255 to expose hidden threads."
257 :type '(radio (sexp :format "Non-nil\n"
258 :match (lambda (widget value)
259 (not (or (consp value) (functionp value))))
262 (sexp :tag "Predicate specifier" :size 0)))
264 (defcustom gnus-thread-hide-killed t
265 "*If non-nil, hide killed threads automatically."
269 (defcustom gnus-thread-ignore-subject t
270 "*If non-nil, which is the default, ignore subjects and do all threading based on the Reference header.
271 If nil, articles that have different subjects from their parents will
272 start separate threads."
276 (defcustom gnus-thread-operation-ignore-subject t
277 "*If non-nil, subjects will be ignored when doing thread commands.
278 This affects commands like `gnus-summary-kill-thread' and
279 `gnus-summary-lower-thread'.
281 If this variable is nil, articles in the same thread with different
282 subjects will not be included in the operation in question. If this
283 variable is `fuzzy', only articles that have subjects that are fuzzily
284 equal will be included."
286 :type '(choice (const :tag "off" nil)
290 (defcustom gnus-thread-indent-level 4
291 "*Number that says how much each sub-thread should be indented."
295 (defcustom gnus-auto-extend-newsgroup t
296 "*If non-nil, extend newsgroup forward and backward when requested."
297 :group 'gnus-summary-choose
300 (defcustom gnus-auto-select-first t
301 "*If non-nil, select the article under point.
302 Which article this is is controlled by the `gnus-auto-select-subject'
305 If you want to prevent automatic selection of articles in some
306 newsgroups, set the variable to nil in `gnus-select-group-hook'."
307 :group 'gnus-group-select
308 :type '(choice (const :tag "none" nil)
309 (sexp :menu-tag "first" t)))
311 (defcustom gnus-auto-select-subject 'unread
312 "*Says what subject to place under point when entering a group.
314 This variable can either be the symbols `first' (place point on the
315 first subject), `unread' (place point on the subject line of the first
316 unread article), `best' (place point on the subject line of the
317 higest-scored article), `unseen' (place point on the subject line of
318 the first unseen article), 'unseen-or-unread' (place point on the subject
319 line of the first unseen article or, if all article have been seen, on the
320 subject line of the first unread article), or a function to be called to
321 place point on some subject line."
322 :group 'gnus-group-select
323 :type '(choice (const best)
327 (const unseen-or-unread)))
329 (defcustom gnus-auto-select-next t
330 "*If non-nil, offer to go to the next group from the end of the previous.
331 If the value is t and the next newsgroup is empty, Gnus will exit
332 summary mode and go back to group mode. If the value is neither nil
333 nor t, Gnus will select the following unread newsgroup. In
334 particular, if the value is the symbol `quietly', the next unread
335 newsgroup will be selected without any confirmation, and if it is
336 `almost-quietly', the next group will be selected without any
337 confirmation if you are located on the last article in the group.
338 Finally, if this variable is `slightly-quietly', the `\\<gnus-summary-mode-map>\\[gnus-summary-catchup-and-goto-next-group]' command
339 will go to the next group without confirmation."
340 :group 'gnus-summary-maneuvering
341 :type '(choice (const :tag "off" nil)
343 (const almost-quietly)
344 (const slightly-quietly)
345 (sexp :menu-tag "on" t)))
347 (defcustom gnus-auto-select-same nil
348 "*If non-nil, select the next article with the same subject.
349 If there are no more articles with the same subject, go to
350 the first unread article."
351 :group 'gnus-summary-maneuvering
354 (defcustom gnus-auto-goto-ignores 'unfetched
355 "*Says how to handle unfetched articles when maneuvering.
357 This variable can either be the symbols nil (maneuver to any
358 article), `undownloaded' (maneuvering while unplugged ignores articles
359 that have not been fetched), `always-undownloaded' (maneuvering always
360 ignores articles that have not been fetched), `unfetched' (maneuvering
361 ignores articles whose headers have not been fetched).
363 NOTE: The list of unfetched articles will always be nil when plugged
364 and, when unplugged, a subset of the undownloaded article list."
365 :group 'gnus-summary-maneuvering
366 :type '(choice (const :tag "None" nil)
367 (const :tag "Undownloaded when unplugged" undownloaded)
368 (const :tag "Undownloaded" always-undownloaded)
369 (const :tag "Unfetched" unfetched)))
371 (defcustom gnus-summary-check-current nil
372 "*If non-nil, consider the current article when moving.
373 The \"unread\" movement commands will stay on the same line if the
374 current article is unread."
375 :group 'gnus-summary-maneuvering
378 (defcustom gnus-auto-center-summary t
379 "*If non-nil, always center the current summary buffer.
380 In particular, if `vertical' do only vertical recentering. If non-nil
381 and non-`vertical', do both horizontal and vertical recentering."
382 :group 'gnus-summary-maneuvering
383 :type '(choice (const :tag "none" nil)
385 (integer :tag "height")
386 (sexp :menu-tag "both" t)))
388 (defvar gnus-auto-center-group t
389 "*If non-nil, always center the group buffer.")
391 (defcustom gnus-show-all-headers nil
392 "*If non-nil, don't hide any headers."
393 :group 'gnus-article-hiding
394 :group 'gnus-article-headers
397 (defcustom gnus-summary-ignore-duplicates nil
398 "*If non-nil, ignore articles with identical Message-ID headers."
402 (defcustom gnus-single-article-buffer t
403 "*If non-nil, display all articles in the same buffer.
404 If nil, each group will get its own article buffer."
405 :group 'gnus-article-various
408 (defcustom gnus-break-pages t
409 "*If non-nil, do page breaking on articles.
410 The page delimiter is specified by the `gnus-page-delimiter'
412 :group 'gnus-article-various
415 (defcustom gnus-move-split-methods nil
416 "*Variable used to suggest where articles are to be moved to.
417 It uses the same syntax as the `gnus-split-methods' variable.
418 However, whereas `gnus-split-methods' specifies file names as targets,
419 this variable specifies group names."
420 :group 'gnus-summary-mail
421 :type '(repeat (choice (list :value (fun) function)
422 (cons :value ("" "") regexp (repeat string))
425 (defcustom gnus-move-group-prefix-function 'gnus-group-real-prefix
426 "Function used to compute default prefix for article move/copy/etc prompts.
427 The function should take one argument, a group name, and return a
428 string with the suggested prefix."
429 :group 'gnus-summary-mail
432 (defcustom gnus-unread-mark ? ;Whitespace
433 "*Mark used for unread articles."
434 :group 'gnus-summary-marks
437 (defcustom gnus-ticked-mark ?!
438 "*Mark used for ticked articles."
439 :group 'gnus-summary-marks
442 (defcustom gnus-dormant-mark ??
443 "*Mark used for dormant articles."
444 :group 'gnus-summary-marks
447 (defcustom gnus-del-mark ?r
448 "*Mark used for del'd articles."
449 :group 'gnus-summary-marks
452 (defcustom gnus-read-mark ?R
453 "*Mark used for read articles."
454 :group 'gnus-summary-marks
457 (defcustom gnus-expirable-mark ?E
458 "*Mark used for expirable articles."
459 :group 'gnus-summary-marks
462 (defcustom gnus-killed-mark ?K
463 "*Mark used for killed articles."
464 :group 'gnus-summary-marks
467 (defcustom gnus-spam-mark ?$
468 "*Mark used for spam articles."
469 :group 'gnus-summary-marks
472 (defcustom gnus-souped-mark ?F
473 "*Mark used for souped articles."
474 :group 'gnus-summary-marks
477 (defcustom gnus-kill-file-mark ?X
478 "*Mark used for articles killed by kill files."
479 :group 'gnus-summary-marks
482 (defcustom gnus-low-score-mark ?Y
483 "*Mark used for articles with a low score."
484 :group 'gnus-summary-marks
487 (defcustom gnus-catchup-mark ?C
488 "*Mark used for articles that are caught up."
489 :group 'gnus-summary-marks
492 (defcustom gnus-replied-mark ?A
493 "*Mark used for articles that have been replied to."
494 :group 'gnus-summary-marks
497 (defcustom gnus-forwarded-mark ?F
498 "*Mark used for articles that have been forwarded."
499 :group 'gnus-summary-marks
502 (defcustom gnus-recent-mark ?N
503 "*Mark used for articles that are recent."
504 :group 'gnus-summary-marks
507 (defcustom gnus-cached-mark ?*
508 "*Mark used for articles that are in the cache."
509 :group 'gnus-summary-marks
512 (defcustom gnus-saved-mark ?S
513 "*Mark used for articles that have been saved."
514 :group 'gnus-summary-marks
517 (defcustom gnus-unseen-mark ?.
518 "*Mark used for articles that haven't been seen."
519 :group 'gnus-summary-marks
522 (defcustom gnus-no-mark ? ;Whitespace
523 "*Mark used for articles that have no other secondary mark."
524 :group 'gnus-summary-marks
527 (defcustom gnus-ancient-mark ?O
528 "*Mark used for ancient articles."
529 :group 'gnus-summary-marks
532 (defcustom gnus-sparse-mark ?Q
533 "*Mark used for sparsely reffed articles."
534 :group 'gnus-summary-marks
537 (defcustom gnus-canceled-mark ?G
538 "*Mark used for canceled articles."
539 :group 'gnus-summary-marks
542 (defcustom gnus-duplicate-mark ?M
543 "*Mark used for duplicate articles."
544 :group 'gnus-summary-marks
547 (defcustom gnus-undownloaded-mark ?-
548 "*Mark used for articles that weren't downloaded."
549 :group 'gnus-summary-marks
552 (defcustom gnus-downloaded-mark ?+
553 "*Mark used for articles that were downloaded."
554 :group 'gnus-summary-marks
557 (defcustom gnus-downloadable-mark ?%
558 "*Mark used for articles that are to be downloaded."
559 :group 'gnus-summary-marks
562 (defcustom gnus-unsendable-mark ?=
563 "*Mark used for articles that won't be sent."
564 :group 'gnus-summary-marks
567 (defcustom gnus-score-over-mark ?+
568 "*Score mark used for articles with high scores."
569 :group 'gnus-summary-marks
572 (defcustom gnus-score-below-mark ?-
573 "*Score mark used for articles with low scores."
574 :group 'gnus-summary-marks
577 (defcustom gnus-empty-thread-mark ? ;Whitespace
578 "*There is no thread under the article."
579 :group 'gnus-summary-marks
582 (defcustom gnus-not-empty-thread-mark ?=
583 "*There is a thread under the article."
584 :group 'gnus-summary-marks
587 (defcustom gnus-view-pseudo-asynchronously nil
588 "*If non-nil, Gnus will view pseudo-articles asynchronously."
589 :group 'gnus-extract-view
592 (defcustom gnus-auto-expirable-marks
593 (list gnus-killed-mark gnus-del-mark gnus-catchup-mark
594 gnus-low-score-mark gnus-ancient-mark gnus-read-mark
595 gnus-souped-mark gnus-duplicate-mark)
596 "*The list of marks converted into expiration if a group is auto-expirable."
599 :type '(repeat character))
601 (defcustom gnus-inhibit-user-auto-expire t
602 "*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on."
607 (defcustom gnus-view-pseudos nil
608 "*If `automatic', pseudo-articles will be viewed automatically.
609 If `not-confirm', pseudos will be viewed automatically, and the user
610 will not be asked to confirm the command."
611 :group 'gnus-extract-view
612 :type '(choice (const :tag "off" nil)
614 (const not-confirm)))
616 (defcustom gnus-view-pseudos-separately t
617 "*If non-nil, one pseudo-article will be created for each file to be viewed.
618 If nil, all files that use the same viewing command will be given as a
619 list of parameters to that command."
620 :group 'gnus-extract-view
623 (defcustom gnus-insert-pseudo-articles t
624 "*If non-nil, insert pseudo-articles when decoding articles."
625 :group 'gnus-extract-view
628 (defcustom gnus-summary-dummy-line-format
630 "*The format specification for the dummy roots in the summary buffer.
631 It works along the same lines as a normal formatting string,
632 with some simple extensions.
636 General format specifiers can also be used.
637 See `(gnus)Formatting Variables'."
638 :link '(custom-manual "(gnus)Formatting Variables")
639 :group 'gnus-threading
642 (defcustom gnus-summary-mode-line-format "Gnus: %g [%A] %Z"
643 "*The format specification for the summary mode line.
644 It works along the same lines as a normal formatting string,
645 with some simple extensions:
648 %p Unprefixed group name
649 %A Current article number
650 %z Current article score
652 %U Number of unread articles in the group
653 %e Number of unselected articles in the group
654 %Z A string with unread/unselected article counts
655 %g Shortish group name
656 %S Subject of the current article
658 %s Current score file name
659 %d Number of dormant articles
660 %r Number of articles that have been marked as read in this session
661 %E Number of articles expunged by the score files"
662 :group 'gnus-summary-format
665 (defcustom gnus-list-identifiers nil
666 "Regexp that matches list identifiers to be removed from subject.
667 This can also be a list of regexps."
669 :group 'gnus-summary-format
670 :group 'gnus-article-hiding
671 :type '(choice (const :tag "none" nil)
673 (repeat :value (".*") regexp)))
675 (defcustom gnus-summary-mark-below 0
676 "*Mark all articles with a score below this variable as read.
677 This variable is local to each summary buffer and usually set by the
679 :group 'gnus-score-default
682 (defun gnus-widget-reversible-match (widget value)
683 "Ignoring WIDGET, convert VALUE to internal form.
684 VALUE should have the form `FOO' or `(not FOO)', where FOO is an symbol."
688 (eq (length value) 2)
689 (eq (nth 0 value) 'not)
690 (symbolp (nth 1 value)))))
692 (defun gnus-widget-reversible-to-internal (widget value)
693 "Ignoring WIDGET, convert VALUE to internal form.
694 VALUE should have the form `FOO' or `(not FOO)', where FOO is an atom.
695 FOO is converted to (FOO nil) and (not FOO) is converted to (FOO t)."
699 (list (nth 1 value) t)))
701 (defun gnus-widget-reversible-to-external (widget value)
702 "Ignoring WIDGET, convert VALUE to external form.
703 VALUE should have the form `(FOO nil)' or `(FOO t)', where FOO is an atom.
704 \(FOO nil) is converted to FOO and (FOO t) is converted to (not FOO)."
707 (list 'not (nth 0 value))
710 (define-widget 'gnus-widget-reversible 'group
711 "A `group' that convert values."
712 :match 'gnus-widget-reversible-match
713 :value-to-internal 'gnus-widget-reversible-to-internal
714 :value-to-external 'gnus-widget-reversible-to-external)
717 (defcustom gnus-article-sort-functions '(gnus-article-sort-by-number)
718 "*List of functions used for sorting articles in the summary buffer.
720 Each function takes two articles and returns non-nil if the first
721 article should be sorted before the other. If you use more than one
722 function, the primary sort function should be the last. You should
723 probably always include `gnus-article-sort-by-number' in the list of
724 sorting functions -- preferably first. Also note that sorting by date
725 is often much slower than sorting by number, and the sorting order is
726 very similar. (Sorting by date means sorting by the time the message
727 was sent, sorting by number means sorting by arrival time.)
729 Each item can also be a list `(not F)' where F is a function;
730 this reverses the sort order.
732 Ready-made functions include `gnus-article-sort-by-number',
733 `gnus-article-sort-by-author', `gnus-article-sort-by-subject',
734 `gnus-article-sort-by-date', `gnus-article-sort-by-random'
735 and `gnus-article-sort-by-score'.
737 When threading is turned on, the variable `gnus-thread-sort-functions'
738 controls how articles are sorted."
739 :group 'gnus-summary-sort
740 :type '(repeat (gnus-widget-reversible
741 (choice (function-item gnus-article-sort-by-number)
742 (function-item gnus-article-sort-by-author)
743 (function-item gnus-article-sort-by-subject)
744 (function-item gnus-article-sort-by-date)
745 (function-item gnus-article-sort-by-score)
746 (function-item gnus-article-sort-by-random)
747 (function :tag "other"))
748 (boolean :tag "Reverse order"))))
751 (defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number)
752 "*List of functions used for sorting threads in the summary buffer.
753 By default, threads are sorted by article number.
755 Each function takes two threads and returns non-nil if the first
756 thread should be sorted before the other. If you use more than one
757 function, the primary sort function should be the last. You should
758 probably always include `gnus-thread-sort-by-number' in the list of
759 sorting functions -- preferably first. Also note that sorting by date
760 is often much slower than sorting by number, and the sorting order is
761 very similar. (Sorting by date means sorting by the time the message
762 was sent, sorting by number means sorting by arrival time.)
764 Each list item can also be a list `(not F)' where F is a
765 function; this specifies reversed sort order.
767 Ready-made functions include `gnus-thread-sort-by-number',
768 `gnus-thread-sort-by-author', `gnus-thread-sort-by-subject',
769 `gnus-thread-sort-by-date', `gnus-thread-sort-by-score',
770 `gnus-thread-sort-by-most-recent-number',
771 `gnus-thread-sort-by-most-recent-date',
772 `gnus-thread-sort-by-random', and
773 `gnus-thread-sort-by-total-score' (see `gnus-thread-score-function').
775 When threading is turned off, the variable
776 `gnus-article-sort-functions' controls how articles are sorted."
777 :group 'gnus-summary-sort
779 (gnus-widget-reversible
780 (choice (function-item gnus-thread-sort-by-number)
781 (function-item gnus-thread-sort-by-author)
782 (function-item gnus-thread-sort-by-subject)
783 (function-item gnus-thread-sort-by-date)
784 (function-item gnus-thread-sort-by-score)
785 (function-item gnus-thread-sort-by-most-recent-number)
786 (function-item gnus-thread-sort-by-most-recent-date)
787 (function-item gnus-thread-sort-by-random)
788 (function-item gnus-thread-sort-by-total-score)
789 (function :tag "other"))
790 (boolean :tag "Reverse order"))))
792 (defcustom gnus-thread-score-function '+
793 "*Function used for calculating the total score of a thread.
795 The function is called with the scores of the article and each
796 subthread and should then return the score of the thread.
798 Some functions you can use are `+', `max', or `min'."
799 :group 'gnus-summary-sort
802 (defcustom gnus-summary-expunge-below nil
803 "All articles that have a score less than this variable will be expunged.
804 This variable is local to the summary buffers."
805 :group 'gnus-score-default
806 :type '(choice (const :tag "off" nil)
809 (defcustom gnus-thread-expunge-below nil
810 "All threads that have a total score less than this variable will be expunged.
811 See `gnus-thread-score-function' for en explanation of what a
814 This variable is local to the summary buffers."
815 :group 'gnus-threading
816 :group 'gnus-score-default
817 :type '(choice (const :tag "off" nil)
820 (defcustom gnus-summary-mode-hook nil
821 "*A hook for Gnus summary mode.
822 This hook is run before any variables are set in the summary buffer."
823 :options '(turn-on-gnus-mailing-list-mode gnus-pick-mode)
824 :group 'gnus-summary-various
827 ;; Extracted from gnus-xmas-redefine in order to preserve user settings
828 (when (featurep 'xemacs)
829 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
830 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
831 (add-hook 'gnus-summary-mode-hook
832 'gnus-xmas-switch-horizontal-scrollbar-off))
834 (defcustom gnus-summary-menu-hook nil
835 "*Hook run after the creation of the summary mode menu."
836 :group 'gnus-summary-visual
839 (defcustom gnus-summary-exit-hook nil
840 "*A hook called on exit from the summary buffer.
841 It will be called with point in the group buffer."
842 :group 'gnus-summary-exit
845 (defcustom gnus-summary-prepare-hook nil
846 "*A hook called after the summary buffer has been generated.
847 If you want to modify the summary buffer, you can use this hook."
848 :group 'gnus-summary-various
851 (defcustom gnus-summary-prepared-hook nil
852 "*A hook called as the last thing after the summary buffer has been generated."
853 :group 'gnus-summary-various
856 (defcustom gnus-summary-generate-hook nil
857 "*A hook run just before generating the summary buffer.
858 This hook is commonly used to customize threading variables and the
860 :group 'gnus-summary-various
863 (defcustom gnus-select-group-hook nil
864 "*A hook called when a newsgroup is selected.
866 If you'd like to simplify subjects like the
867 `gnus-summary-next-same-subject' command does, you can use the
870 (add-hook gnus-select-group-hook
872 (mapcar (lambda (header)
873 (mail-header-set-subject
875 (gnus-simplify-subject
876 (mail-header-subject header) 're-only)))
877 gnus-newsgroup-headers)))"
878 :group 'gnus-group-select
881 (defcustom gnus-select-article-hook nil
882 "*A hook called when an article is selected."
883 :group 'gnus-summary-choose
884 :options '(gnus-agent-fetch-selected-article)
887 (defcustom gnus-visual-mark-article-hook
888 (list 'gnus-highlight-selected-summary)
889 "*Hook run after selecting an article in the summary buffer.
890 It is meant to be used for highlighting the article in some way. It
891 is not run if `gnus-visual' is nil."
892 :group 'gnus-summary-visual
895 (defcustom gnus-parse-headers-hook nil
896 "*A hook called before parsing the headers."
900 (defcustom gnus-exit-group-hook nil
901 "*A hook called when exiting summary mode.
902 This hook is not called from the non-updating exit commands like `Q'."
906 (defcustom gnus-summary-update-hook
907 (list 'gnus-summary-highlight-line)
908 "*A hook called when a summary line is changed.
909 The hook will not be called if `gnus-visual' is nil.
911 The default function `gnus-summary-highlight-line' will
912 highlight the line according to the `gnus-summary-highlight'
914 :group 'gnus-summary-visual
917 (defcustom gnus-mark-article-hook '(gnus-summary-mark-read-and-unread-as-read)
918 "*A hook called when an article is selected for the first time.
919 The hook is intended to mark an article as read (or unread)
920 automatically when it is selected."
921 :group 'gnus-summary-choose
924 (defcustom gnus-group-no-more-groups-hook nil
925 "*A hook run when returning to group mode having no more (unread) groups."
926 :group 'gnus-group-select
929 (defcustom gnus-ps-print-hook nil
930 "*A hook run before ps-printing something from Gnus."
934 (defcustom gnus-summary-article-move-hook nil
935 "*A hook called after an article is moved, copied, respooled, or crossposted."
939 (defcustom gnus-summary-article-delete-hook nil
940 "*A hook called after an article is deleted."
944 (defcustom gnus-summary-article-expire-hook nil
945 "*A hook called after an article is expired."
949 (defcustom gnus-summary-display-arrow
950 (and (fboundp 'display-graphic-p)
952 "*If non-nil, display an arrow highlighting the current article."
957 (defcustom gnus-summary-selected-face 'gnus-summary-selected-face
958 "Face used for highlighting the current article in the summary buffer."
959 :group 'gnus-summary-visual
962 (defvar gnus-tmp-downloaded nil)
964 (defcustom gnus-summary-highlight
965 '(((eq mark gnus-canceled-mark)
966 . gnus-summary-cancelled-face)
967 ((and uncached (> score default-high))
968 . gnus-summary-high-undownloaded-face)
969 ((and uncached (< score default-low))
970 . gnus-summary-low-undownloaded-face)
972 . gnus-summary-normal-undownloaded-face)
973 ((and (> score default-high)
974 (or (eq mark gnus-dormant-mark)
975 (eq mark gnus-ticked-mark)))
976 . gnus-summary-high-ticked-face)
977 ((and (< score default-low)
978 (or (eq mark gnus-dormant-mark)
979 (eq mark gnus-ticked-mark)))
980 . gnus-summary-low-ticked-face)
981 ((or (eq mark gnus-dormant-mark)
982 (eq mark gnus-ticked-mark))
983 . gnus-summary-normal-ticked-face)
984 ((and (> score default-high) (eq mark gnus-ancient-mark))
985 . gnus-summary-high-ancient-face)
986 ((and (< score default-low) (eq mark gnus-ancient-mark))
987 . gnus-summary-low-ancient-face)
988 ((eq mark gnus-ancient-mark)
989 . gnus-summary-normal-ancient-face)
990 ((and (> score default-high) (eq mark gnus-unread-mark))
991 . gnus-summary-high-unread-face)
992 ((and (< score default-low) (eq mark gnus-unread-mark))
993 . gnus-summary-low-unread-face)
994 ((eq mark gnus-unread-mark)
995 . gnus-summary-normal-unread-face)
996 ((> score default-high)
997 . gnus-summary-high-read-face)
998 ((< score default-low)
999 . gnus-summary-low-read-face)
1001 . gnus-summary-normal-read-face))
1002 "*Controls the highlighting of summary buffer lines.
1004 A list of (FORM . FACE) pairs. When deciding how a a particular
1005 summary line should be displayed, each form is evaluated. The content
1006 of the face field after the first true form is used. You can change
1007 how those summary lines are displayed, by editing the face field.
1009 You can use the following variables in the FORM field.
1011 score: The article's score
1012 default: The default article score.
1013 default-high: The default score for high scored articles.
1014 default-low: The default score for low scored articles.
1015 below: The score below which articles are automatically marked as read.
1016 mark: The article's mark.
1017 uncached: Non-nil if the article is uncached."
1018 :group 'gnus-summary-visual
1019 :type '(repeat (cons (sexp :tag "Form" nil)
1022 (defcustom gnus-alter-header-function nil
1023 "Function called to allow alteration of article header structures.
1024 The function is called with one parameter, the article header vector,
1025 which it may alter in any way."
1026 :type '(choice (const :tag "None" nil)
1028 :group 'gnus-summary)
1030 (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
1031 "Variable that says which function should be used to decode a string with encoded words.")
1033 (defcustom gnus-extra-headers '(To Newsgroups)
1034 "*Extra headers to parse."
1036 :group 'gnus-summary
1037 :type '(repeat symbol))
1039 (defcustom gnus-ignored-from-addresses
1040 (and user-mail-address (regexp-quote user-mail-address))
1041 "*Regexp of From headers that may be suppressed in favor of To headers."
1043 :group 'gnus-summary
1046 (defcustom gnus-newsgroup-ignored-charsets '(unknown-8bit x-unknown)
1047 "List of charsets that should be ignored.
1048 When these charsets are used in the \"charset\" parameter, the
1049 default charset will be used instead."
1051 :type '(repeat symbol)
1052 :group 'gnus-charset)
1054 (gnus-define-group-parameter
1058 "Return the ignored charsets of GROUP."
1059 :variable gnus-group-ignored-charsets-alist
1061 '(("alt\\.chinese\\.text" iso-8859-1))
1063 "Alist of regexps (to match group names) and charsets that should be ignored.
1064 When these charsets are used in the \"charset\" parameter, the
1065 default charset will be used instead."
1066 :variable-group gnus-charset
1067 :variable-type '(repeat (cons (regexp :tag "Group")
1069 :parameter-type '(choice :tag "Ignored charsets"
1072 :parameter-document "\
1073 List of charsets that should be ignored.
1075 When these charsets are used in the \"charset\" parameter, the
1076 default charset will be used instead.")
1078 (defcustom gnus-group-highlight-words-alist nil
1079 "Alist of group regexps and highlight regexps.
1080 This variable uses the same syntax as `gnus-emphasis-alist'."
1082 :type '(repeat (cons (regexp :tag "Group")
1083 (repeat (list (regexp :tag "Highlight regexp")
1084 (number :tag "Group for entire word" 0)
1085 (number :tag "Group for displayed part" 0)
1087 gnus-emphasis-highlight-words)))))
1088 :group 'gnus-summary-visual)
1090 (defcustom gnus-summary-show-article-charset-alist
1092 "Alist of number and charset.
1093 The article will be shown with the charset corresponding to the
1095 For example: ((1 . cn-gb-2312) (2 . big5))."
1097 :type '(repeat (cons (number :tag "Argument" 1)
1098 (symbol :tag "Charset")))
1099 :group 'gnus-charset)
1101 (defcustom gnus-preserve-marks t
1102 "Whether marks are preserved when moving, copying and respooling messages."
1105 :group 'gnus-summary-marks)
1107 (defcustom gnus-alter-articles-to-read-function nil
1108 "Function to be called to alter the list of articles to be selected."
1109 :type '(choice (const nil) function)
1110 :group 'gnus-summary)
1112 (defcustom gnus-orphan-score nil
1113 "*All orphans get this score added. Set in the score file."
1114 :group 'gnus-score-default
1115 :type '(choice (const nil)
1118 (defcustom gnus-summary-save-parts-default-mime "image/.*"
1119 "*A regexp to match MIME parts when saving multiple parts of a
1120 message with `gnus-summary-save-parts' (\\<gnus-summary-mode-map>\\[gnus-summary-save-parts]).
1121 This regexp will be used by default when prompting the user for which
1122 type of files to save."
1123 :group 'gnus-summary
1126 (defcustom gnus-read-all-available-headers nil
1127 "Whether Gnus should parse all headers made available to it.
1128 This is mostly relevant for slow back ends where the user may
1129 wish to widen the summary buffer to include all headers
1130 that were fetched. Say, for nnultimate groups."
1131 :group 'gnus-summary
1132 :type '(choice boolean regexp))
1134 (defcustom gnus-summary-muttprint-program "muttprint"
1135 "Command (and optional arguments) used to run Muttprint."
1137 :group 'gnus-summary
1140 (defcustom gnus-article-loose-mime nil
1141 "If non-nil, don't require MIME-Version header.
1142 Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not
1143 supply the MIME-Version header or deliberately strip it From the mail.
1144 Set it to non-nil, Gnus will treat some articles as MIME even if
1145 the MIME-Version header is missed."
1148 :group 'gnus-article-mime)
1150 (defcustom gnus-article-emulate-mime t
1151 "If non-nil, use MIME emulation for uuencode and the like.
1152 This means that Gnus will search message bodies for text that look
1153 like uuencoded bits, yEncoded bits, and so on, and present that using
1154 the normal Gnus MIME machinery."
1156 :group 'gnus-article-mime)
1158 ;;; Internal variables
1160 (defvar gnus-summary-display-cache nil)
1161 (defvar gnus-article-mime-handles nil)
1162 (defvar gnus-article-decoded-p nil)
1163 (defvar gnus-article-charset nil)
1164 (defvar gnus-article-ignored-charsets nil)
1165 (defvar gnus-scores-exclude-files nil)
1166 (defvar gnus-page-broken nil)
1168 (defvar gnus-original-article nil)
1169 (defvar gnus-article-internal-prepare-hook nil)
1170 (defvar gnus-newsgroup-process-stack nil)
1172 (defvar gnus-thread-indent-array nil)
1173 (defvar gnus-thread-indent-array-level gnus-thread-indent-level)
1174 (defvar gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number
1175 "Function called to sort the articles within a thread after it has been gathered together.")
1177 (defvar gnus-summary-save-parts-type-history nil)
1178 (defvar gnus-summary-save-parts-last-directory mm-default-directory)
1180 ;; Avoid highlighting in kill files.
1181 (defvar gnus-summary-inhibit-highlight nil)
1182 (defvar gnus-newsgroup-selected-overlay nil)
1183 (defvar gnus-inhibit-limiting nil)
1184 (defvar gnus-newsgroup-adaptive-score-file nil)
1185 (defvar gnus-current-score-file nil)
1186 (defvar gnus-current-move-group nil)
1187 (defvar gnus-current-copy-group nil)
1188 (defvar gnus-current-crosspost-group nil)
1189 (defvar gnus-newsgroup-display nil)
1191 (defvar gnus-newsgroup-dependencies nil)
1192 (defvar gnus-newsgroup-adaptive nil)
1193 (defvar gnus-summary-display-article-function nil)
1194 (defvar gnus-summary-highlight-line-function nil
1195 "Function called after highlighting a summary line.")
1197 (defvar gnus-summary-line-format-alist
1198 `((?N ,(macroexpand '(mail-header-number gnus-tmp-header)) ?d)
1199 (?S ,(macroexpand '(mail-header-subject gnus-tmp-header)) ?s)
1200 (?s gnus-tmp-subject-or-nil ?s)
1201 (?n gnus-tmp-name ?s)
1202 (?A (car (cdr (funcall gnus-extract-address-components gnus-tmp-from)))
1204 (?a (or (car (funcall gnus-extract-address-components gnus-tmp-from))
1206 (?F gnus-tmp-from ?s)
1207 (?x ,(macroexpand '(mail-header-xref gnus-tmp-header)) ?s)
1208 (?D ,(macroexpand '(mail-header-date gnus-tmp-header)) ?s)
1209 (?d (gnus-dd-mmm (mail-header-date gnus-tmp-header)) ?s)
1210 (?o (gnus-date-iso8601 (mail-header-date gnus-tmp-header)) ?s)
1211 (?M ,(macroexpand '(mail-header-id gnus-tmp-header)) ?s)
1212 (?r ,(macroexpand '(mail-header-references gnus-tmp-header)) ?s)
1213 (?c (or (mail-header-chars gnus-tmp-header) 0) ?d)
1214 (?k (gnus-summary-line-message-size gnus-tmp-header) ?s)
1215 (?L gnus-tmp-lines ?s)
1216 (?O gnus-tmp-downloaded ?c)
1217 (?I gnus-tmp-indentation ?s)
1218 (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s)
1219 (?R gnus-tmp-replied ?c)
1220 (?\[ gnus-tmp-opening-bracket ?c)
1221 (?\] gnus-tmp-closing-bracket ?c)
1222 (?\> (make-string gnus-tmp-level ? ) ?s)
1223 (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
1224 (?i gnus-tmp-score ?d)
1225 (?z gnus-tmp-score-char ?c)
1226 (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d)
1227 (?U gnus-tmp-unread ?c)
1228 (?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)
1230 (?t (gnus-summary-number-of-articles-in-thread
1231 (and (boundp 'thread) (car thread)) gnus-tmp-level)
1233 (?e (gnus-summary-number-of-articles-in-thread
1234 (and (boundp 'thread) (car thread)) gnus-tmp-level t)
1236 (?u gnus-tmp-user-defined ?s)
1237 (?P (gnus-pick-line-number) ?d)
1238 (?B gnus-tmp-thread-tree-header-string ?s)
1239 (user-date (gnus-user-date
1240 ,(macroexpand '(mail-header-date gnus-tmp-header))) ?s))
1241 "An alist of format specifications that can appear in summary lines.
1242 These are paired with what variables they correspond with, along with
1243 the type of the variable (string, integer, character, etc).")
1245 (defvar gnus-summary-dummy-line-format-alist
1246 `((?S gnus-tmp-subject ?s)
1247 (?N gnus-tmp-number ?d)
1248 (?u gnus-tmp-user-defined ?s)))
1250 (defvar gnus-summary-mode-line-format-alist
1251 `((?G gnus-tmp-group-name ?s)
1252 (?g (gnus-short-group-name gnus-tmp-group-name) ?s)
1253 (?p (gnus-group-real-name gnus-tmp-group-name) ?s)
1254 (?A gnus-tmp-article-number ?d)
1255 (?Z gnus-tmp-unread-and-unselected ?s)
1256 (?V gnus-version ?s)
1257 (?U gnus-tmp-unread-and-unticked ?d)
1258 (?S gnus-tmp-subject ?s)
1259 (?e gnus-tmp-unselected ?d)
1260 (?u gnus-tmp-user-defined ?s)
1261 (?d (length gnus-newsgroup-dormant) ?d)
1262 (?t (length gnus-newsgroup-marked) ?d)
1263 (?h (length gnus-newsgroup-spam-marked) ?d)
1264 (?r (length gnus-newsgroup-reads) ?d)
1265 (?z (gnus-summary-article-score gnus-tmp-article-number) ?d)
1266 (?E gnus-newsgroup-expunged-tally ?d)
1267 (?s (gnus-current-score-file-nondirectory) ?s)))
1269 (defvar gnus-last-search-regexp nil
1270 "Default regexp for article search command.")
1272 (defvar gnus-last-shell-command nil
1273 "Default shell command on article.")
1275 (defvar gnus-newsgroup-agentized nil
1276 "Locally bound in each summary buffer to indicate whether the server has been agentized.")
1277 (defvar gnus-newsgroup-begin nil)
1278 (defvar gnus-newsgroup-end nil)
1279 (defvar gnus-newsgroup-last-rmail nil)
1280 (defvar gnus-newsgroup-last-mail nil)
1281 (defvar gnus-newsgroup-last-folder nil)
1282 (defvar gnus-newsgroup-last-file nil)
1283 (defvar gnus-newsgroup-auto-expire nil)
1284 (defvar gnus-newsgroup-active nil)
1286 (defvar gnus-newsgroup-data nil)
1287 (defvar gnus-newsgroup-data-reverse nil)
1288 (defvar gnus-newsgroup-limit nil)
1289 (defvar gnus-newsgroup-limits nil)
1290 (defvar gnus-summary-use-undownloaded-faces nil)
1292 (defvar gnus-newsgroup-unreads nil
1293 "Sorted list of unread articles in the current newsgroup.")
1295 (defvar gnus-newsgroup-unselected nil
1296 "Sorted list of unselected unread articles in the current newsgroup.")
1298 (defvar gnus-newsgroup-reads nil
1299 "Alist of read articles and article marks in the current newsgroup.")
1301 (defvar gnus-newsgroup-expunged-tally nil)
1303 (defvar gnus-newsgroup-marked nil
1304 "Sorted list of ticked articles in the current newsgroup (a subset of unread art).")
1306 (defvar gnus-newsgroup-spam-marked nil
1307 "List of ranges of articles that have been marked as spam.")
1309 (defvar gnus-newsgroup-killed nil
1310 "List of ranges of articles that have been through the scoring process.")
1312 (defvar gnus-newsgroup-cached nil
1313 "Sorted list of articles that come from the article cache.")
1315 (defvar gnus-newsgroup-saved nil
1316 "List of articles that have been saved.")
1318 (defvar gnus-newsgroup-kill-headers nil)
1320 (defvar gnus-newsgroup-replied nil
1321 "List of articles that have been replied to in the current newsgroup.")
1323 (defvar gnus-newsgroup-forwarded nil
1324 "List of articles that have been forwarded in the current newsgroup.")
1326 (defvar gnus-newsgroup-recent nil
1327 "List of articles that have are recent in the current newsgroup.")
1329 (defvar gnus-newsgroup-expirable nil
1330 "Sorted list of articles in the current newsgroup that can be expired.")
1332 (defvar gnus-newsgroup-processable nil
1333 "List of articles in the current newsgroup that can be processed.")
1335 (defvar gnus-newsgroup-downloadable nil
1336 "Sorted list of articles in the current newsgroup that can be processed.")
1338 (defvar gnus-newsgroup-unfetched nil
1339 "Sorted list of articles in the current newsgroup whose headers have
1340 not been fetched into the agent.
1342 This list will always be a subset of gnus-newsgroup-undownloaded.")
1344 (defvar gnus-newsgroup-undownloaded nil
1345 "List of articles in the current newsgroup that haven't been downloaded.")
1347 (defvar gnus-newsgroup-unsendable nil
1348 "List of articles in the current newsgroup that won't be sent.")
1350 (defvar gnus-newsgroup-bookmarks nil
1351 "List of articles in the current newsgroup that have bookmarks.")
1353 (defvar gnus-newsgroup-dormant nil
1354 "Sorted list of dormant articles in the current newsgroup.")
1356 (defvar gnus-newsgroup-unseen nil
1357 "List of unseen articles in the current newsgroup.")
1359 (defvar gnus-newsgroup-seen nil
1360 "Range of seen articles in the current newsgroup.")
1362 (defvar gnus-newsgroup-articles nil
1363 "List of articles in the current newsgroup.")
1365 (defvar gnus-newsgroup-scored nil
1366 "List of scored articles in the current newsgroup.")
1368 (defvar gnus-newsgroup-headers nil
1369 "List of article headers in the current newsgroup.")
1371 (defvar gnus-newsgroup-threads nil)
1373 (defvar gnus-newsgroup-prepared nil
1374 "Whether the current group has been prepared properly.")
1376 (defvar gnus-newsgroup-ancient nil
1377 "List of `gnus-fetch-old-headers' articles in the current newsgroup.")
1379 (defvar gnus-newsgroup-sparse nil)
1381 (defvar gnus-current-article nil)
1382 (defvar gnus-article-current nil)
1383 (defvar gnus-current-headers nil)
1384 (defvar gnus-have-all-headers nil)
1385 (defvar gnus-last-article nil)
1386 (defvar gnus-newsgroup-history nil)
1387 (defvar gnus-newsgroup-charset nil)
1388 (defvar gnus-newsgroup-ephemeral-charset nil)
1389 (defvar gnus-newsgroup-ephemeral-ignored-charsets nil)
1391 (defvar gnus-article-before-search nil)
1393 (defvar gnus-summary-local-variables
1394 '(gnus-newsgroup-name
1395 gnus-newsgroup-begin gnus-newsgroup-end
1396 gnus-newsgroup-last-rmail gnus-newsgroup-last-mail
1397 gnus-newsgroup-last-folder gnus-newsgroup-last-file
1398 gnus-newsgroup-auto-expire gnus-newsgroup-unreads
1399 gnus-newsgroup-unselected gnus-newsgroup-marked
1400 gnus-newsgroup-spam-marked
1401 gnus-newsgroup-reads gnus-newsgroup-saved
1402 gnus-newsgroup-replied gnus-newsgroup-forwarded
1403 gnus-newsgroup-recent
1404 gnus-newsgroup-expirable
1405 gnus-newsgroup-processable gnus-newsgroup-killed
1406 gnus-newsgroup-downloadable gnus-newsgroup-undownloaded
1407 gnus-newsgroup-unfetched
1408 gnus-newsgroup-unsendable gnus-newsgroup-unseen
1409 gnus-newsgroup-seen gnus-newsgroup-articles
1410 gnus-newsgroup-bookmarks gnus-newsgroup-dormant
1411 gnus-newsgroup-headers gnus-newsgroup-threads
1412 gnus-newsgroup-prepared gnus-summary-highlight-line-function
1413 gnus-current-article gnus-current-headers gnus-have-all-headers
1414 gnus-last-article gnus-article-internal-prepare-hook
1415 gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay
1416 gnus-newsgroup-scored gnus-newsgroup-kill-headers
1417 gnus-thread-expunge-below
1418 gnus-score-alist gnus-current-score-file
1419 (gnus-summary-expunge-below . global)
1420 (gnus-summary-mark-below . global)
1421 (gnus-orphan-score . global)
1422 gnus-newsgroup-active gnus-scores-exclude-files
1423 gnus-newsgroup-history gnus-newsgroup-ancient
1424 gnus-newsgroup-sparse gnus-newsgroup-process-stack
1425 (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring)
1426 gnus-newsgroup-adaptive-score-file (gnus-reffed-article-number . -1)
1427 (gnus-newsgroup-expunged-tally . 0)
1428 gnus-cache-removable-articles gnus-newsgroup-cached
1429 gnus-newsgroup-data gnus-newsgroup-data-reverse
1430 gnus-newsgroup-limit gnus-newsgroup-limits
1431 gnus-newsgroup-charset gnus-newsgroup-display
1432 gnus-summary-use-undownloaded-faces)
1433 "Variables that are buffer-local to the summary buffers.")
1435 (defvar gnus-newsgroup-variables nil
1436 "A list of variables that have separate values in different newsgroups.
1437 A list of newsgroup (summary buffer) local variables, or cons of
1438 variables and their default expressions to be evalled (when the default
1439 values are not nil), that should be made global while the summary buffer
1442 Note: The default expressions will be evaluated (using function `eval')
1443 before assignment to the local variable rather than just assigned to it.
1444 If the default expression is the symbol `global', that symbol will not
1445 be evaluated but the global value of the local variable will be used
1448 These variables can be used to set variables in the group parameters
1449 while still allowing them to affect operations done in other buffers.
1452 \(setq gnus-newsgroup-variables
1453 '(message-use-followup-to
1454 (gnus-visible-headers .
1455 \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))
1458 ;; Byte-compiler warning.
1460 ;; Bind features so that require will believe that gnus-sum has
1461 ;; already been loaded (avoids infinite recursion)
1462 (let ((features (cons 'gnus-sum features)))
1463 ;; Several of the declarations in gnus-sum are needed to load the
1464 ;; following files. Right now, these definitions have been
1465 ;; compiled but not defined (evaluated). We could either do a
1466 ;; eval-and-compile about all of the declarations or evaluate the
1468 (if (boundp 'gnus-newsgroup-variables)
1470 (load "gnus-sum.el" t t t))
1472 (require 'gnus-agent)
1473 (require 'gnus-art)))
1477 (defvar gnus-decode-encoded-word-methods
1478 '(mail-decode-encoded-word-string)
1479 "List of methods used to decode encoded words.
1481 This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item
1482 is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a
1483 \(REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups
1484 whose names match REGEXP.
1487 \((\"chinese\" . gnus-decode-encoded-word-string-by-guess)
1488 mail-decode-encoded-word-string
1489 (\"chinese\" . rfc1843-decode-string))")
1491 (defvar gnus-decode-encoded-word-methods-cache nil)
1493 (defun gnus-multi-decode-encoded-word-string (string)
1494 "Apply the functions from `gnus-encoded-word-methods' that match."
1495 (unless (and gnus-decode-encoded-word-methods-cache
1496 (eq gnus-newsgroup-name
1497 (car gnus-decode-encoded-word-methods-cache)))
1498 (setq gnus-decode-encoded-word-methods-cache (list gnus-newsgroup-name))
1501 (nconc gnus-decode-encoded-word-methods-cache (list x))
1502 (if (and gnus-newsgroup-name
1503 (string-match (car x) gnus-newsgroup-name))
1504 (nconc gnus-decode-encoded-word-methods-cache
1506 gnus-decode-encoded-word-methods))
1507 (let ((xlist gnus-decode-encoded-word-methods-cache))
1510 (setq string (funcall (pop xlist) string))))
1513 ;; Subject simplification.
1515 (defun gnus-simplify-whitespace (str)
1516 "Remove excessive whitespace from STR."
1518 (while (string-match "[ \t][ \t]+" str)
1519 (setq str (concat (substring str 0 (match-beginning 0))
1521 (substring str (match-end 0)))))
1523 (when (string-match "^[ \t]+" str)
1524 (setq str (substring str (match-end 0))))
1526 (when (string-match "[ \t]+$" str)
1527 (setq str (substring str 0 (match-beginning 0))))
1530 (defun gnus-simplify-all-whitespace (str)
1531 "Remove all whitespace from STR."
1532 (while (string-match "[ \t\n]+" str)
1533 (setq str (replace-match "" nil nil str)))
1536 (defsubst gnus-simplify-subject-re (subject)
1537 "Remove \"Re:\" from subject lines."
1538 (if (string-match message-subject-re-regexp subject)
1539 (substring subject (match-end 0))
1542 (defun gnus-simplify-subject (subject &optional re-only)
1543 "Remove `Re:' and words in parentheses.
1544 If RE-ONLY is non-nil, strip leading `Re:'s only."
1545 (let ((case-fold-search t)) ;Ignore case.
1546 ;; Remove `Re:', `Re^N:', `Re(n)', and `Re[n]:'.
1547 (when (string-match "\\`\\(re\\([[(^][0-9]+[])]?\\)?:[ \t]*\\)+" subject)
1548 (setq subject (substring subject (match-end 0))))
1549 ;; Remove uninteresting prefixes.
1550 (when (and (not re-only)
1551 gnus-simplify-ignored-prefixes
1552 (string-match gnus-simplify-ignored-prefixes subject))
1553 (setq subject (substring subject (match-end 0))))
1554 ;; Remove words in parentheses from end.
1556 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject)
1557 (setq subject (substring subject 0 (match-beginning 0)))))
1558 ;; Return subject string.
1561 ;; Remove any leading "re:"s, any trailing paren phrases, and simplify
1563 (defsubst gnus-simplify-buffer-fuzzy-step (regexp &optional newtext)
1564 (goto-char (point-min))
1565 (while (re-search-forward regexp nil t)
1566 (replace-match (or newtext ""))))
1568 (defun gnus-simplify-buffer-fuzzy ()
1569 "Simplify string in the buffer fuzzily.
1570 The string in the accessible portion of the current buffer is simplified.
1571 It is assumed to be a single-line subject.
1572 Whitespace is generally cleaned up, and miscellaneous leading/trailing
1573 matter is removed. Additional things can be deleted by setting
1574 `gnus-simplify-subject-fuzzy-regexp'."
1575 (let ((case-fold-search t)
1577 (gnus-simplify-buffer-fuzzy-step "\t" " ")
1579 (while (not (eq modified-tick (buffer-modified-tick)))
1580 (setq modified-tick (buffer-modified-tick))
1582 ((listp gnus-simplify-subject-fuzzy-regexp)
1583 (mapcar 'gnus-simplify-buffer-fuzzy-step
1584 gnus-simplify-subject-fuzzy-regexp))
1585 (gnus-simplify-subject-fuzzy-regexp
1586 (gnus-simplify-buffer-fuzzy-step gnus-simplify-subject-fuzzy-regexp)))
1587 (gnus-simplify-buffer-fuzzy-step "^ *\\[[-+?*!][-+?*!]\\] *")
1588 (gnus-simplify-buffer-fuzzy-step
1589 "^ *\\(re\\|fw\\|fwd\\)[[{(^0-9]*[])}]?[:;] *")
1590 (gnus-simplify-buffer-fuzzy-step "^[[].*:\\( .*\\)[]]$" "\\1"))
1592 (gnus-simplify-buffer-fuzzy-step " *[[{(][^()\n]*[]})] *$")
1593 (gnus-simplify-buffer-fuzzy-step " +" " ")
1594 (gnus-simplify-buffer-fuzzy-step " $")
1595 (gnus-simplify-buffer-fuzzy-step "^ +")))
1597 (defun gnus-simplify-subject-fuzzy (subject)
1598 "Simplify a subject string fuzzily.
1599 See `gnus-simplify-buffer-fuzzy' for details."
1601 (gnus-set-work-buffer)
1602 (let ((case-fold-search t))
1603 ;; Remove uninteresting prefixes.
1604 (when (and gnus-simplify-ignored-prefixes
1605 (string-match gnus-simplify-ignored-prefixes subject))
1606 (setq subject (substring subject (match-end 0))))
1608 (inline (gnus-simplify-buffer-fuzzy))
1611 (defsubst gnus-simplify-subject-fully (subject)
1612 "Simplify a subject string according to `gnus-summary-gather-subject-limit'."
1614 (gnus-simplify-subject-functions
1615 (gnus-map-function gnus-simplify-subject-functions subject))
1616 ((null gnus-summary-gather-subject-limit)
1617 (gnus-simplify-subject-re subject))
1618 ((eq gnus-summary-gather-subject-limit 'fuzzy)
1619 (gnus-simplify-subject-fuzzy subject))
1620 ((numberp gnus-summary-gather-subject-limit)
1621 (gnus-limit-string (gnus-simplify-subject-re subject)
1622 gnus-summary-gather-subject-limit))
1626 (defsubst gnus-subject-equal (s1 s2 &optional simple-first)
1627 "Check whether two subjects are equal.
1628 If optional argument SIMPLE-FIRST is t, first argument is already
1631 ((null simple-first)
1632 (equal (gnus-simplify-subject-fully s1)
1633 (gnus-simplify-subject-fully s2)))
1636 (gnus-simplify-subject-fully s2)))))
1638 (defun gnus-summary-bubble-group ()
1639 "Increase the score of the current group.
1640 This is a handy function to add to `gnus-summary-exit-hook' to
1641 increase the score of each group you read."
1642 (gnus-group-add-score gnus-newsgroup-name))
1646 ;;; Gnus summary mode
1649 (put 'gnus-summary-mode 'mode-class 'special)
1651 (defvar gnus-article-commands-menu)
1653 ;; Non-orthogonal keys
1655 (gnus-define-keys gnus-summary-mode-map
1656 " " gnus-summary-next-page
1657 "\177" gnus-summary-prev-page
1658 [delete] gnus-summary-prev-page
1659 [backspace] gnus-summary-prev-page
1660 "\r" gnus-summary-scroll-up
1661 "\M-\r" gnus-summary-scroll-down
1662 "n" gnus-summary-next-unread-article
1663 "p" gnus-summary-prev-unread-article
1664 "N" gnus-summary-next-article
1665 "P" gnus-summary-prev-article
1666 "\M-\C-n" gnus-summary-next-same-subject
1667 "\M-\C-p" gnus-summary-prev-same-subject
1668 "\M-n" gnus-summary-next-unread-subject
1669 "\M-p" gnus-summary-prev-unread-subject
1670 "." gnus-summary-first-unread-article
1671 "," gnus-summary-best-unread-article
1672 "\M-s" gnus-summary-search-article-forward
1673 "\M-r" gnus-summary-search-article-backward
1674 "<" gnus-summary-beginning-of-article
1675 ">" gnus-summary-end-of-article
1676 "j" gnus-summary-goto-article
1677 "^" gnus-summary-refer-parent-article
1678 "\M-^" gnus-summary-refer-article
1679 "u" gnus-summary-tick-article-forward
1680 "!" gnus-summary-tick-article-forward
1681 "U" gnus-summary-tick-article-backward
1682 "d" gnus-summary-mark-as-read-forward
1683 "D" gnus-summary-mark-as-read-backward
1684 "E" gnus-summary-mark-as-expirable
1685 "\M-u" gnus-summary-clear-mark-forward
1686 "\M-U" gnus-summary-clear-mark-backward
1687 "k" gnus-summary-kill-same-subject-and-select
1688 "\C-k" gnus-summary-kill-same-subject
1689 "\M-\C-k" gnus-summary-kill-thread
1690 "\M-\C-l" gnus-summary-lower-thread
1691 "e" gnus-summary-edit-article
1692 "#" gnus-summary-mark-as-processable
1693 "\M-#" gnus-summary-unmark-as-processable
1694 "\M-\C-t" gnus-summary-toggle-threads
1695 "\M-\C-s" gnus-summary-show-thread
1696 "\M-\C-h" gnus-summary-hide-thread
1697 "\M-\C-f" gnus-summary-next-thread
1698 "\M-\C-b" gnus-summary-prev-thread
1699 [(meta down)] gnus-summary-next-thread
1700 [(meta up)] gnus-summary-prev-thread
1701 "\M-\C-u" gnus-summary-up-thread
1702 "\M-\C-d" gnus-summary-down-thread
1703 "&" gnus-summary-execute-command
1704 "c" gnus-summary-catchup-and-exit
1705 "\C-w" gnus-summary-mark-region-as-read
1706 "\C-t" gnus-summary-toggle-truncation
1707 "?" gnus-summary-mark-as-dormant
1708 "\C-c\M-\C-s" gnus-summary-limit-include-expunged
1709 "\C-c\C-s\C-n" gnus-summary-sort-by-number
1710 "\C-c\C-s\C-l" gnus-summary-sort-by-lines
1711 "\C-c\C-s\C-c" gnus-summary-sort-by-chars
1712 "\C-c\C-s\C-a" gnus-summary-sort-by-author
1713 "\C-c\C-s\C-s" gnus-summary-sort-by-subject
1714 "\C-c\C-s\C-d" gnus-summary-sort-by-date
1715 "\C-c\C-s\C-i" gnus-summary-sort-by-score
1716 "\C-c\C-s\C-o" gnus-summary-sort-by-original
1717 "\C-c\C-s\C-r" gnus-summary-sort-by-random
1718 "=" gnus-summary-expand-window
1719 "\C-x\C-s" gnus-summary-reselect-current-group
1720 "\M-g" gnus-summary-rescan-group
1721 "w" gnus-summary-stop-page-breaking
1722 "\C-c\C-r" gnus-summary-caesar-message
1723 "f" gnus-summary-followup
1724 "F" gnus-summary-followup-with-original
1725 "C" gnus-summary-cancel-article
1726 "r" gnus-summary-reply
1727 "R" gnus-summary-reply-with-original
1728 "\C-c\C-f" gnus-summary-mail-forward
1729 "o" gnus-summary-save-article
1730 "\C-o" gnus-summary-save-article-mail
1731 "|" gnus-summary-pipe-output
1732 "\M-k" gnus-summary-edit-local-kill
1733 "\M-K" gnus-summary-edit-global-kill
1735 "\C-c\C-d" gnus-summary-describe-group
1736 "q" gnus-summary-exit
1737 "Q" gnus-summary-exit-no-update
1738 "\C-c\C-i" gnus-info-find-node
1739 gnus-mouse-2 gnus-mouse-pick-article
1740 "m" gnus-summary-mail-other-window
1741 "a" gnus-summary-post-news
1742 "i" gnus-summary-news-other-window
1743 "x" gnus-summary-limit-to-unread
1744 "s" gnus-summary-isearch-article
1745 "t" gnus-summary-toggle-header
1746 "g" gnus-summary-show-article
1747 "l" gnus-summary-goto-last-article
1748 "\C-c\C-v\C-v" gnus-uu-decode-uu-view
1749 "\C-d" gnus-summary-enter-digest-group
1750 "\M-\C-d" gnus-summary-read-document
1751 "\M-\C-e" gnus-summary-edit-parameters
1752 "\M-\C-a" gnus-summary-customize-parameters
1754 "*" gnus-cache-enter-article
1755 "\M-*" gnus-cache-remove-article
1756 "\M-&" gnus-summary-universal-argument
1757 "\C-l" gnus-recenter
1758 "I" gnus-summary-increase-score
1759 "L" gnus-summary-lower-score
1760 "\M-i" gnus-symbolic-argument
1761 "h" gnus-summary-select-article-buffer
1763 "b" gnus-article-view-part
1764 "\M-t" gnus-summary-toggle-display-buttonized
1766 "V" gnus-summary-score-map
1767 "X" gnus-uu-extract-map
1768 "S" gnus-summary-send-map)
1770 ;; Sort of orthogonal keymap
1771 (gnus-define-keys (gnus-summary-mark-map "M" gnus-summary-mode-map)
1772 "t" gnus-summary-tick-article-forward
1773 "!" gnus-summary-tick-article-forward
1774 "d" gnus-summary-mark-as-read-forward
1775 "r" gnus-summary-mark-as-read-forward
1776 "c" gnus-summary-clear-mark-forward
1777 " " gnus-summary-clear-mark-forward
1778 "e" gnus-summary-mark-as-expirable
1779 "x" gnus-summary-mark-as-expirable
1780 "?" gnus-summary-mark-as-dormant
1781 "b" gnus-summary-set-bookmark
1782 "B" gnus-summary-remove-bookmark
1783 "#" gnus-summary-mark-as-processable
1784 "\M-#" gnus-summary-unmark-as-processable
1785 "S" gnus-summary-limit-include-expunged
1786 "C" gnus-summary-catchup
1787 "H" gnus-summary-catchup-to-here
1788 "h" gnus-summary-catchup-from-here
1789 "\C-c" gnus-summary-catchup-all
1790 "k" gnus-summary-kill-same-subject-and-select
1791 "K" gnus-summary-kill-same-subject
1792 "P" gnus-uu-mark-map)
1794 (gnus-define-keys (gnus-summary-mscore-map "V" gnus-summary-mark-map)
1795 "c" gnus-summary-clear-above
1796 "u" gnus-summary-tick-above
1797 "m" gnus-summary-mark-above
1798 "k" gnus-summary-kill-below)
1800 (gnus-define-keys (gnus-summary-limit-map "/" gnus-summary-mode-map)
1801 "/" gnus-summary-limit-to-subject
1802 "n" gnus-summary-limit-to-articles
1803 "w" gnus-summary-pop-limit
1804 "s" gnus-summary-limit-to-subject
1805 "a" gnus-summary-limit-to-author
1806 "u" gnus-summary-limit-to-unread
1807 "m" gnus-summary-limit-to-marks
1808 "M" gnus-summary-limit-exclude-marks
1809 "v" gnus-summary-limit-to-score
1810 "*" gnus-summary-limit-include-cached
1811 "D" gnus-summary-limit-include-dormant
1812 "T" gnus-summary-limit-include-thread
1813 "d" gnus-summary-limit-exclude-dormant
1814 "t" gnus-summary-limit-to-age
1815 "." gnus-summary-limit-to-unseen
1816 "x" gnus-summary-limit-to-extra
1817 "p" gnus-summary-limit-to-display-predicate
1818 "E" gnus-summary-limit-include-expunged
1819 "c" gnus-summary-limit-exclude-childless-dormant
1820 "C" gnus-summary-limit-mark-excluded-as-read
1821 "o" gnus-summary-insert-old-articles
1822 "N" gnus-summary-insert-new-articles
1823 "r" gnus-summary-limit-to-replied)
1825 (gnus-define-keys (gnus-summary-goto-map "G" gnus-summary-mode-map)
1826 "n" gnus-summary-next-unread-article
1827 "p" gnus-summary-prev-unread-article
1828 "N" gnus-summary-next-article
1829 "P" gnus-summary-prev-article
1830 "\C-n" gnus-summary-next-same-subject
1831 "\C-p" gnus-summary-prev-same-subject
1832 "\M-n" gnus-summary-next-unread-subject
1833 "\M-p" gnus-summary-prev-unread-subject
1834 "f" gnus-summary-first-unread-article
1835 "b" gnus-summary-best-unread-article
1836 "j" gnus-summary-goto-article
1837 "g" gnus-summary-goto-subject
1838 "l" gnus-summary-goto-last-article
1839 "o" gnus-summary-pop-article)
1841 (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map)
1842 "k" gnus-summary-kill-thread
1843 "l" gnus-summary-lower-thread
1844 "i" gnus-summary-raise-thread
1845 "T" gnus-summary-toggle-threads
1846 "t" gnus-summary-rethread-current
1847 "^" gnus-summary-reparent-thread
1848 "s" gnus-summary-show-thread
1849 "S" gnus-summary-show-all-threads
1850 "h" gnus-summary-hide-thread
1851 "H" gnus-summary-hide-all-threads
1852 "n" gnus-summary-next-thread
1853 "p" gnus-summary-prev-thread
1854 "u" gnus-summary-up-thread
1855 "o" gnus-summary-top-thread
1856 "d" gnus-summary-down-thread
1857 "#" gnus-uu-mark-thread
1858 "\M-#" gnus-uu-unmark-thread)
1860 (gnus-define-keys (gnus-summary-buffer-map "Y" gnus-summary-mode-map)
1861 "g" gnus-summary-prepare
1862 "c" gnus-summary-insert-cached-articles
1863 "d" gnus-summary-insert-dormant-articles)
1865 (gnus-define-keys (gnus-summary-exit-map "Z" gnus-summary-mode-map)
1866 "c" gnus-summary-catchup-and-exit
1867 "C" gnus-summary-catchup-all-and-exit
1868 "E" gnus-summary-exit-no-update
1869 "Q" gnus-summary-exit
1870 "Z" gnus-summary-exit
1871 "n" gnus-summary-catchup-and-goto-next-group
1872 "R" gnus-summary-reselect-current-group
1873 "G" gnus-summary-rescan-group
1874 "N" gnus-summary-next-group
1875 "s" gnus-summary-save-newsrc
1876 "P" gnus-summary-prev-group)
1878 (gnus-define-keys (gnus-summary-article-map "A" gnus-summary-mode-map)
1879 " " gnus-summary-next-page
1880 "n" gnus-summary-next-page
1881 "\177" gnus-summary-prev-page
1882 [delete] gnus-summary-prev-page
1883 "p" gnus-summary-prev-page
1884 "\r" gnus-summary-scroll-up
1885 "\M-\r" gnus-summary-scroll-down
1886 "<" gnus-summary-beginning-of-article
1887 ">" gnus-summary-end-of-article
1888 "b" gnus-summary-beginning-of-article
1889 "e" gnus-summary-end-of-article
1890 "^" gnus-summary-refer-parent-article
1891 "r" gnus-summary-refer-parent-article
1892 "D" gnus-summary-enter-digest-group
1893 "R" gnus-summary-refer-references
1894 "T" gnus-summary-refer-thread
1895 "g" gnus-summary-show-article
1896 "s" gnus-summary-isearch-article
1897 "P" gnus-summary-print-article
1898 "M" gnus-mailing-list-insinuate
1899 "t" gnus-article-babel)
1901 (gnus-define-keys (gnus-summary-wash-map "W" gnus-summary-mode-map)
1902 "b" gnus-article-add-buttons
1903 "B" gnus-article-add-buttons-to-head
1904 "o" gnus-article-treat-overstrike
1905 "e" gnus-article-emphasize
1906 "w" gnus-article-fill-cited-article
1907 "Q" gnus-article-fill-long-lines
1908 "C" gnus-article-capitalize-sentences
1909 "c" gnus-article-remove-cr
1910 "q" gnus-article-de-quoted-unreadable
1911 "6" gnus-article-de-base64-unreadable
1912 "Z" gnus-article-decode-HZ
1913 "A" gnus-article-treat-ansi-sequences
1914 "h" gnus-article-wash-html
1915 "u" gnus-article-unsplit-urls
1916 "s" gnus-summary-force-verify-and-decrypt
1917 "f" gnus-article-display-x-face
1918 "l" gnus-summary-stop-page-breaking
1919 "r" gnus-summary-caesar-message
1920 "m" gnus-summary-morse-message
1921 "t" gnus-summary-toggle-header
1922 "g" gnus-treat-smiley
1923 "v" gnus-summary-verbose-headers
1924 "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
1925 "p" gnus-article-verify-x-pgp-sig
1926 "d" gnus-article-treat-dumbquotes)
1928 (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
1929 ;; mnemonic: deuglif*Y*
1930 "u" gnus-article-outlook-unwrap-lines
1931 "a" gnus-article-outlook-repair-attribution
1932 "c" gnus-article-outlook-rearrange-citation
1933 "f" gnus-article-outlook-deuglify-article) ;; mnemonic: full deuglify
1935 (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map)
1936 "a" gnus-article-hide
1937 "h" gnus-article-hide-headers
1938 "b" gnus-article-hide-boring-headers
1939 "s" gnus-article-hide-signature
1940 "c" gnus-article-hide-citation
1941 "C" gnus-article-hide-citation-in-followups
1942 "l" gnus-article-hide-list-identifiers
1943 "B" gnus-article-strip-banner
1944 "P" gnus-article-hide-pem
1945 "\C-c" gnus-article-hide-citation-maybe)
1947 (gnus-define-keys (gnus-summary-wash-highlight-map "H" gnus-summary-wash-map)
1948 "a" gnus-article-highlight
1949 "h" gnus-article-highlight-headers
1950 "c" gnus-article-highlight-citation
1951 "s" gnus-article-highlight-signature)
1953 (gnus-define-keys (gnus-summary-wash-header-map "G" gnus-summary-wash-map)
1954 "f" gnus-article-treat-fold-headers
1955 "u" gnus-article-treat-unfold-headers
1956 "n" gnus-article-treat-fold-newsgroups)
1958 (gnus-define-keys (gnus-summary-wash-display-map "D" gnus-summary-wash-map)
1959 "x" gnus-article-display-x-face
1960 "d" gnus-article-display-face
1961 "s" gnus-treat-smiley
1962 "D" gnus-article-remove-images
1963 "f" gnus-treat-from-picon
1964 "m" gnus-treat-mail-picon
1965 "n" gnus-treat-newsgroups-picon)
1967 (gnus-define-keys (gnus-summary-wash-mime-map "M" gnus-summary-wash-map)
1968 "w" gnus-article-decode-mime-words
1969 "c" gnus-article-decode-charset
1970 "v" gnus-mime-view-all-parts
1971 "b" gnus-article-view-part)
1973 (gnus-define-keys (gnus-summary-wash-time-map "T" gnus-summary-wash-map)
1974 "z" gnus-article-date-ut
1975 "u" gnus-article-date-ut
1976 "l" gnus-article-date-local
1977 "p" gnus-article-date-english
1978 "e" gnus-article-date-lapsed
1979 "o" gnus-article-date-original
1980 "i" gnus-article-date-iso8601
1981 "s" gnus-article-date-user)
1983 (gnus-define-keys (gnus-summary-wash-empty-map "E" gnus-summary-wash-map)
1984 "t" gnus-article-remove-trailing-blank-lines
1985 "l" gnus-article-strip-leading-blank-lines
1986 "m" gnus-article-strip-multiple-blank-lines
1987 "a" gnus-article-strip-blank-lines
1988 "A" gnus-article-strip-all-blank-lines
1989 "s" gnus-article-strip-leading-space
1990 "e" gnus-article-strip-trailing-space
1991 "w" gnus-article-remove-leading-whitespace)
1993 (gnus-define-keys (gnus-summary-help-map "H" gnus-summary-mode-map)
1995 "f" gnus-summary-fetch-faq
1996 "d" gnus-summary-describe-group
1997 "h" gnus-summary-describe-briefly
1998 "i" gnus-info-find-node
1999 "c" gnus-group-fetch-charter
2000 "C" gnus-group-fetch-control)
2002 (gnus-define-keys (gnus-summary-backend-map "B" gnus-summary-mode-map)
2003 "e" gnus-summary-expire-articles
2004 "\M-\C-e" gnus-summary-expire-articles-now
2005 "\177" gnus-summary-delete-article
2006 [delete] gnus-summary-delete-article
2007 [backspace] gnus-summary-delete-article
2008 "m" gnus-summary-move-article
2009 "r" gnus-summary-respool-article
2010 "w" gnus-summary-edit-article
2011 "c" gnus-summary-copy-article
2012 "B" gnus-summary-crosspost-article
2013 "q" gnus-summary-respool-query
2014 "t" gnus-summary-respool-trace
2015 "i" gnus-summary-import-article
2016 "I" gnus-summary-create-article
2017 "p" gnus-summary-article-posted-p)
2019 (gnus-define-keys (gnus-summary-save-map "O" gnus-summary-mode-map)
2020 "o" gnus-summary-save-article
2021 "m" gnus-summary-save-article-mail
2022 "F" gnus-summary-write-article-file
2023 "r" gnus-summary-save-article-rmail
2024 "f" gnus-summary-save-article-file
2025 "b" gnus-summary-save-article-body-file
2026 "h" gnus-summary-save-article-folder
2027 "v" gnus-summary-save-article-vm
2028 "p" gnus-summary-pipe-output
2029 "P" gnus-summary-muttprint
2030 "s" gnus-soup-add-article)
2032 (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
2033 "b" gnus-summary-display-buttonized
2034 "m" gnus-summary-repair-multipart
2035 "v" gnus-article-view-part
2036 "o" gnus-article-save-part
2037 "c" gnus-article-copy-part
2038 "C" gnus-article-view-part-as-charset
2039 "e" gnus-article-view-part-externally
2040 "E" gnus-article-encrypt-body
2041 "i" gnus-article-inline-part
2042 "|" gnus-article-pipe-part)
2044 (gnus-define-keys (gnus-uu-mark-map "P" gnus-summary-mark-map)
2045 "p" gnus-summary-mark-as-processable
2046 "u" gnus-summary-unmark-as-processable
2047 "U" gnus-summary-unmark-all-processable
2048 "v" gnus-uu-mark-over
2049 "s" gnus-uu-mark-series
2050 "r" gnus-uu-mark-region
2051 "g" gnus-uu-unmark-region
2052 "R" gnus-uu-mark-by-regexp
2053 "G" gnus-uu-unmark-by-regexp
2054 "t" gnus-uu-mark-thread
2055 "T" gnus-uu-unmark-thread
2056 "a" gnus-uu-mark-all
2057 "b" gnus-uu-mark-buffer
2058 "S" gnus-uu-mark-sparse
2059 "k" gnus-summary-kill-process-mark
2060 "y" gnus-summary-yank-process-mark
2061 "w" gnus-summary-save-process-mark
2062 "i" gnus-uu-invert-processable)
2064 (gnus-define-keys (gnus-uu-extract-map "X" gnus-summary-mode-map)
2065 ;;"x" gnus-uu-extract-any
2066 "m" gnus-summary-save-parts
2067 "u" gnus-uu-decode-uu
2068 "U" gnus-uu-decode-uu-and-save
2069 "s" gnus-uu-decode-unshar
2070 "S" gnus-uu-decode-unshar-and-save
2071 "o" gnus-uu-decode-save
2072 "O" gnus-uu-decode-save
2073 "b" gnus-uu-decode-binhex
2074 "B" gnus-uu-decode-binhex
2075 "p" gnus-uu-decode-postscript
2076 "P" gnus-uu-decode-postscript-and-save)
2079 (gnus-uu-extract-view-map "v" gnus-uu-extract-map)
2080 "u" gnus-uu-decode-uu-view
2081 "U" gnus-uu-decode-uu-and-save-view
2082 "s" gnus-uu-decode-unshar-view
2083 "S" gnus-uu-decode-unshar-and-save-view
2084 "o" gnus-uu-decode-save-view
2085 "O" gnus-uu-decode-save-view
2086 "b" gnus-uu-decode-binhex-view
2087 "B" gnus-uu-decode-binhex-view
2088 "p" gnus-uu-decode-postscript-view
2089 "P" gnus-uu-decode-postscript-and-save-view)
2091 (defvar gnus-article-post-menu nil)
2093 (defconst gnus-summary-menu-maxlen 20)
2095 (defun gnus-summary-menu-split (menu)
2096 ;; If we have lots of elements, divide them into groups of 20
2097 ;; and make a pane (or submenu) for each one.
2098 (if (> (length menu) (/ (* gnus-summary-menu-maxlen 3) 2))
2099 (let ((menu menu) sublists next
2102 ;; Pull off the next gnus-summary-menu-maxlen elements
2103 ;; and make them the next element of sublist.
2104 (setq next (nthcdr gnus-summary-menu-maxlen menu))
2106 (setcdr (nthcdr (1- gnus-summary-menu-maxlen) menu)
2108 (setq sublists (cons (cons (format "%s ... %s" (aref (car menu) 0)
2109 (aref (car (last menu)) 0)) menu)
2113 (nreverse sublists))
2114 ;; Few elements--put them all in one pane.
2117 (defun gnus-summary-make-menu-bar ()
2118 (gnus-turn-off-edit-menu 'summary)
2120 (unless (boundp 'gnus-summary-misc-menu)
2123 gnus-summary-kill-menu gnus-summary-mode-map ""
2128 ["Customize" gnus-score-customize t])
2129 (gnus-make-score-map 'increase)
2130 (gnus-make-score-map 'lower)
2132 ["Kill below" gnus-summary-kill-below t]
2133 ["Mark above" gnus-summary-mark-above t]
2134 ["Tick above" gnus-summary-tick-above t]
2135 ["Clear above" gnus-summary-clear-above t])
2136 ["Current score" gnus-summary-current-score t]
2137 ["Set score" gnus-summary-set-score t]
2138 ["Switch current score file..." gnus-score-change-score-file t]
2139 ["Set mark below..." gnus-score-set-mark-below t]
2140 ["Set expunge below..." gnus-score-set-expunge-below t]
2141 ["Edit current score file" gnus-score-edit-current-scores t]
2142 ["Edit score file" gnus-score-edit-file t]
2143 ["Trace score" gnus-score-find-trace t]
2144 ["Find words" gnus-score-find-favourite-words t]
2145 ["Rescore buffer" gnus-summary-rescore t]
2146 ["Increase score..." gnus-summary-increase-score t]
2147 ["Lower score..." gnus-summary-lower-score t]))))
2149 ;; Define both the Article menu in the summary buffer and the
2150 ;; equivalent Commands menu in the article buffer here for
2154 ["All" gnus-article-hide t]
2155 ["Headers" gnus-article-hide-headers t]
2156 ["Signature" gnus-article-hide-signature t]
2157 ["Citation" gnus-article-hide-citation t]
2158 ["List identifiers" gnus-article-hide-list-identifiers t]
2159 ["Banner" gnus-article-strip-banner t]
2160 ["Boring headers" gnus-article-hide-boring-headers t])
2162 ["All" gnus-article-highlight t]
2163 ["Headers" gnus-article-highlight-headers t]
2164 ["Signature" gnus-article-highlight-signature t]
2165 ["Citation" gnus-article-highlight-citation t])
2167 ["Words" gnus-article-decode-mime-words t]
2168 ["Charset" gnus-article-decode-charset t]
2169 ["QP" gnus-article-de-quoted-unreadable t]
2170 ["Base64" gnus-article-de-base64-unreadable t]
2171 ["View MIME buttons" gnus-summary-display-buttonized t]
2172 ["View all" gnus-mime-view-all-parts t]
2173 ["Verify and Decrypt" gnus-summary-force-verify-and-decrypt t]
2174 ["Encrypt body" gnus-article-encrypt-body
2175 :active (not (gnus-group-read-only-p))
2176 ,@(if (featurep 'xemacs) nil
2177 '(:help "Encrypt the message body on disk"))]
2178 ["Extract all parts..." gnus-summary-save-parts t]
2180 ["Repair multipart" gnus-summary-repair-multipart t]
2181 ["Pipe part..." gnus-article-pipe-part t]
2182 ["Inline part" gnus-article-inline-part t]
2183 ["Encrypt body" gnus-article-encrypt-body
2184 :active (not (gnus-group-read-only-p))
2185 ,@(if (featurep 'xemacs) nil
2186 '(:help "Encrypt the message body on disk"))]
2187 ["View part externally" gnus-article-view-part-externally t]
2188 ["View part with charset..." gnus-article-view-part-as-charset t]
2189 ["Copy part" gnus-article-copy-part t]
2190 ["Save part..." gnus-article-save-part t]
2191 ["View part" gnus-article-view-part t]))
2193 ["Local" gnus-article-date-local t]
2194 ["ISO8601" gnus-article-date-iso8601 t]
2195 ["UT" gnus-article-date-ut t]
2196 ["Original" gnus-article-date-original t]
2197 ["Lapsed" gnus-article-date-lapsed t]
2198 ["User-defined" gnus-article-date-user t])
2200 ["Remove images" gnus-article-remove-images t]
2201 ["Toggle smiley" gnus-treat-smiley t]
2202 ["Show X-Face" gnus-article-display-x-face t]
2203 ["Show picons in From" gnus-treat-from-picon t]
2204 ["Show picons in mail headers" gnus-treat-mail-picon t]
2205 ["Show picons in news headers" gnus-treat-newsgroups-picon t]
2206 ("View as different encoding"
2207 ,@(gnus-summary-menu-split
2210 ;; Since easymenu under Emacs doesn't allow
2211 ;; lambda forms for menu commands, we should
2212 ;; provide intern'ed function symbols.
2213 (let ((command (intern (format "\
2214 gnus-summary-show-article-from-menu-as-charset-%s" cs))))
2218 (let ((gnus-summary-show-article-charset-alist
2220 (gnus-summary-show-article 1))))
2221 `[,(symbol-name cs) ,command t]))
2222 (sort (if (fboundp 'coding-system-list)
2223 (coding-system-list)
2224 (mapcar 'car mm-mime-mule-charset-alist))
2228 ["Leading" gnus-article-strip-leading-blank-lines t]
2229 ["Multiple" gnus-article-strip-multiple-blank-lines t]
2230 ["Trailing" gnus-article-remove-trailing-blank-lines t]
2231 ["All of the above" gnus-article-strip-blank-lines t]
2232 ["All" gnus-article-strip-all-blank-lines t]
2233 ["Leading space" gnus-article-strip-leading-space t]
2234 ["Trailing space" gnus-article-strip-trailing-space t]
2235 ["Leading space in headers"
2236 gnus-article-remove-leading-whitespace t])
2237 ["Overstrike" gnus-article-treat-overstrike t]
2238 ["Dumb quotes" gnus-article-treat-dumbquotes t]
2239 ["Emphasis" gnus-article-emphasize t]
2240 ["Word wrap" gnus-article-fill-cited-article t]
2241 ["Fill long lines" gnus-article-fill-long-lines t]
2242 ["Capitalize sentences" gnus-article-capitalize-sentences t]
2243 ["Remove CR" gnus-article-remove-cr t]
2244 ["Quoted-Printable" gnus-article-de-quoted-unreadable t]
2245 ["Base64" gnus-article-de-base64-unreadable t]
2246 ["Rot 13" gnus-summary-caesar-message
2247 ,@(if (featurep 'xemacs) '(t)
2248 '(:help "\"Caesar rotate\" article by 13"))]
2249 ["Morse decode" gnus-summary-morse-message t]
2250 ["Unix pipe..." gnus-summary-pipe-message t]
2251 ["Add buttons" gnus-article-add-buttons t]
2252 ["Add buttons to head" gnus-article-add-buttons-to-head t]
2253 ["Stop page breaking" gnus-summary-stop-page-breaking t]
2254 ["Verbose header" gnus-summary-verbose-headers t]
2255 ["Toggle header" gnus-summary-toggle-header t]
2256 ["Unfold headers" gnus-article-treat-unfold-headers t]
2257 ["Fold newsgroups" gnus-article-treat-fold-newsgroups t]
2258 ["Html" gnus-article-wash-html t]
2259 ["Unsplit URLs" gnus-article-unsplit-urls t]
2260 ["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t]
2261 ["Decode HZ" gnus-article-decode-HZ t]
2262 ["ANSI sequences" gnus-article-treat-ansi-sequences t]
2263 ("(Outlook) Deuglify"
2264 ["Unwrap lines" gnus-article-outlook-unwrap-lines t]
2265 ["Repair attribution" gnus-article-outlook-repair-attribution t]
2266 ["Rearrange citation" gnus-article-outlook-rearrange-citation t]
2267 ["Full (Outlook) deuglify"
2268 gnus-article-outlook-deuglify-article t])
2271 ["Save in default format..." gnus-summary-save-article
2272 ,@(if (featurep 'xemacs) '(t)
2273 '(:help "Save article using default method"))]
2274 ["Save in file..." gnus-summary-save-article-file
2275 ,@(if (featurep 'xemacs) '(t)
2276 '(:help "Save article in file"))]
2277 ["Save in Unix mail format..." gnus-summary-save-article-mail t]
2278 ["Save in MH folder..." gnus-summary-save-article-folder t]
2279 ["Save in VM folder..." gnus-summary-save-article-vm t]
2280 ["Save in RMAIL mbox..." gnus-summary-save-article-rmail t]
2281 ["Save body in file..." gnus-summary-save-article-body-file t]
2282 ["Pipe through a filter..." gnus-summary-pipe-output t]
2283 ["Add to SOUP packet" gnus-soup-add-article t]
2284 ["Print with Muttprint..." gnus-summary-muttprint t]
2285 ["Print" gnus-summary-print-article t])
2287 ["Respool article..." gnus-summary-respool-article t]
2288 ["Move article..." gnus-summary-move-article
2289 (gnus-check-backend-function
2290 'request-move-article gnus-newsgroup-name)]
2291 ["Copy article..." gnus-summary-copy-article t]
2292 ["Crosspost article..." gnus-summary-crosspost-article
2293 (gnus-check-backend-function
2294 'request-replace-article gnus-newsgroup-name)]
2295 ["Import file..." gnus-summary-import-article
2296 (gnus-check-backend-function
2297 'request-accept-article gnus-newsgroup-name)]
2298 ["Create article..." gnus-summary-create-article
2299 (gnus-check-backend-function
2300 'request-accept-article gnus-newsgroup-name)]
2301 ["Check if posted" gnus-summary-article-posted-p t]
2302 ["Edit article" gnus-summary-edit-article
2303 (not (gnus-group-read-only-p))]
2304 ["Delete article" gnus-summary-delete-article
2305 (gnus-check-backend-function
2306 'request-expire-articles gnus-newsgroup-name)]
2307 ["Query respool" gnus-summary-respool-query t]
2308 ["Trace respool" gnus-summary-respool-trace t]
2309 ["Delete expirable articles" gnus-summary-expire-articles-now
2310 (gnus-check-backend-function
2311 'request-expire-articles gnus-newsgroup-name)])
2313 ["Uudecode" gnus-uu-decode-uu
2314 ,@(if (featurep 'xemacs) '(t)
2315 '(:help "Decode uuencoded article(s)"))]
2316 ["Uudecode and save" gnus-uu-decode-uu-and-save t]
2317 ["Unshar" gnus-uu-decode-unshar t]
2318 ["Unshar and save" gnus-uu-decode-unshar-and-save t]
2319 ["Save" gnus-uu-decode-save t]
2320 ["Binhex" gnus-uu-decode-binhex t]
2321 ["Postscript" gnus-uu-decode-postscript t]
2322 ["All MIME parts" gnus-summary-save-parts t])
2324 ["Enter article" gnus-cache-enter-article t]
2325 ["Remove article" gnus-cache-remove-article t])
2326 ["Translate" gnus-article-babel t]
2327 ["Select article buffer" gnus-summary-select-article-buffer t]
2328 ["Enter digest buffer" gnus-summary-enter-digest-group t]
2329 ["Isearch article..." gnus-summary-isearch-article t]
2330 ["Beginning of the article" gnus-summary-beginning-of-article t]
2331 ["End of the article" gnus-summary-end-of-article t]
2332 ["Fetch parent of article" gnus-summary-refer-parent-article t]
2333 ["Fetch referenced articles" gnus-summary-refer-references t]
2334 ["Fetch current thread" gnus-summary-refer-thread t]
2335 ["Fetch article with id..." gnus-summary-refer-article t]
2336 ["Setup Mailing List Params" gnus-mailing-list-insinuate t]
2337 ["Redisplay" gnus-summary-show-article t]
2338 ["Raw article" gnus-summary-show-raw-article :keys "C-u g"])))
2340 gnus-summary-article-menu gnus-summary-mode-map ""
2341 (cons "Article" innards))
2343 (if (not (keymapp gnus-summary-article-menu))
2345 gnus-article-commands-menu gnus-article-mode-map ""
2346 (cons "Commands" innards))
2347 ;; in Emacs, don't share menu.
2348 (setq gnus-article-commands-menu
2349 (copy-keymap gnus-summary-article-menu))
2350 (define-key gnus-article-mode-map [menu-bar commands]
2351 (cons "Commands" gnus-article-commands-menu))))
2354 gnus-summary-thread-menu gnus-summary-mode-map ""
2356 ["Find all messages in thread" gnus-summary-refer-thread t]
2357 ["Toggle threading" gnus-summary-toggle-threads t]
2358 ["Hide threads" gnus-summary-hide-all-threads t]
2359 ["Show threads" gnus-summary-show-all-threads t]
2360 ["Hide thread" gnus-summary-hide-thread t]
2361 ["Show thread" gnus-summary-show-thread t]
2362 ["Go to next thread" gnus-summary-next-thread t]
2363 ["Go to previous thread" gnus-summary-prev-thread t]
2364 ["Go down thread" gnus-summary-down-thread t]
2365 ["Go up thread" gnus-summary-up-thread t]
2366 ["Top of thread" gnus-summary-top-thread t]
2367 ["Mark thread as read" gnus-summary-kill-thread t]
2368 ["Lower thread score" gnus-summary-lower-thread t]
2369 ["Raise thread score" gnus-summary-raise-thread t]
2370 ["Rethread current" gnus-summary-rethread-current t]))
2373 gnus-summary-post-menu gnus-summary-mode-map ""
2375 ["Send a message (mail or news)" gnus-summary-post-news
2376 ,@(if (featurep 'xemacs) '(t)
2377 '(:help "Post an article"))]
2378 ["Followup" gnus-summary-followup
2379 ,@(if (featurep 'xemacs) '(t)
2380 '(:help "Post followup to this article"))]
2381 ["Followup and yank" gnus-summary-followup-with-original
2382 ,@(if (featurep 'xemacs) '(t)
2383 '(:help "Post followup to this article, quoting its contents"))]
2384 ["Supersede article" gnus-summary-supersede-article t]
2385 ["Cancel article" gnus-summary-cancel-article
2386 ,@(if (featurep 'xemacs) '(t)
2387 '(:help "Cancel an article you posted"))]
2388 ["Reply" gnus-summary-reply t]
2389 ["Reply and yank" gnus-summary-reply-with-original t]
2390 ["Wide reply" gnus-summary-wide-reply t]
2391 ["Wide reply and yank" gnus-summary-wide-reply-with-original
2392 ,@(if (featurep 'xemacs) '(t)
2393 '(:help "Mail a reply, quoting this article"))]
2394 ["Very wide reply" gnus-summary-very-wide-reply t]
2395 ["Very wide reply and yank" gnus-summary-very-wide-reply-with-original
2396 ,@(if (featurep 'xemacs) '(t)
2397 '(:help "Mail a very wide reply, quoting this article"))]
2398 ["Mail forward" gnus-summary-mail-forward t]
2399 ["Post forward" gnus-summary-post-forward t]
2400 ["Digest and mail" gnus-uu-digest-mail-forward t]
2401 ["Digest and post" gnus-uu-digest-post-forward t]
2402 ["Resend message" gnus-summary-resend-message t]
2403 ["Resend message edit" gnus-summary-resend-message-edit t]
2404 ["Send bounced mail" gnus-summary-resend-bounced-mail t]
2405 ["Send a mail" gnus-summary-mail-other-window t]
2406 ["Create a local message" gnus-summary-news-other-window t]
2407 ["Uuencode and post" gnus-uu-post-news
2408 ,@(if (featurep 'xemacs) '(t)
2409 '(:help "Post a uuencoded article"))]
2410 ["Followup via news" gnus-summary-followup-to-mail t]
2411 ["Followup via news and yank"
2412 gnus-summary-followup-to-mail-with-original t]
2414 ;;["Send" gnus-summary-send-draft t]
2415 ;;["Send bounced" gnus-resend-bounced-mail t])
2419 ((not (keymapp gnus-summary-post-menu))
2420 (setq gnus-article-post-menu gnus-summary-post-menu))
2421 ((not gnus-article-post-menu)
2422 ;; Don't share post menu.
2423 (setq gnus-article-post-menu
2424 (copy-keymap gnus-summary-post-menu))))
2425 (define-key gnus-article-mode-map [menu-bar post]
2426 (cons "Post" gnus-article-post-menu))
2429 gnus-summary-misc-menu gnus-summary-mode-map ""
2432 ["Mark as read" gnus-summary-mark-as-read-forward t]
2433 ["Mark same subject and select"
2434 gnus-summary-kill-same-subject-and-select t]
2435 ["Mark same subject" gnus-summary-kill-same-subject t]
2436 ["Catchup" gnus-summary-catchup
2437 ,@(if (featurep 'xemacs) '(t)
2438 '(:help "Mark unread articles in this group as read"))]
2439 ["Catchup all" gnus-summary-catchup-all t]
2440 ["Catchup to here" gnus-summary-catchup-to-here t]
2441 ["Catchup from here" gnus-summary-catchup-from-here t]
2442 ["Catchup region" gnus-summary-mark-region-as-read
2443 (gnus-mark-active-p)]
2444 ["Mark excluded" gnus-summary-limit-mark-excluded-as-read t])
2446 ["Tick" gnus-summary-tick-article-forward t]
2447 ["Mark as dormant" gnus-summary-mark-as-dormant t]
2448 ["Remove marks" gnus-summary-clear-mark-forward t]
2449 ["Set expirable mark" gnus-summary-mark-as-expirable t]
2450 ["Set bookmark" gnus-summary-set-bookmark t]
2451 ["Remove bookmark" gnus-summary-remove-bookmark t])
2453 ["Marks..." gnus-summary-limit-to-marks t]
2454 ["Subject..." gnus-summary-limit-to-subject t]
2455 ["Author..." gnus-summary-limit-to-author t]
2456 ["Age..." gnus-summary-limit-to-age t]
2457 ["Extra..." gnus-summary-limit-to-extra t]
2458 ["Score..." gnus-summary-limit-to-score t]
2459 ["Display Predicate" gnus-summary-limit-to-display-predicate t]
2460 ["Unread" gnus-summary-limit-to-unread t]
2461 ["Unseen" gnus-summary-limit-to-unseen t]
2462 ["Replied" gnus-summary-limit-to-replied t]
2463 ["Non-dormant" gnus-summary-limit-exclude-dormant t]
2464 ["Next articles" gnus-summary-limit-to-articles t]
2465 ["Pop limit" gnus-summary-pop-limit t]
2466 ["Show dormant" gnus-summary-limit-include-dormant t]
2467 ["Hide childless dormant"
2468 gnus-summary-limit-exclude-childless-dormant t]
2469 ;;["Hide thread" gnus-summary-limit-exclude-thread t]
2470 ["Hide marked" gnus-summary-limit-exclude-marks t]
2471 ["Show expunged" gnus-summary-limit-include-expunged t])
2473 ["Set mark" gnus-summary-mark-as-processable t]
2474 ["Remove mark" gnus-summary-unmark-as-processable t]
2475 ["Remove all marks" gnus-summary-unmark-all-processable t]
2476 ["Mark above" gnus-uu-mark-over t]
2477 ["Mark series" gnus-uu-mark-series t]
2478 ["Mark region" gnus-uu-mark-region (gnus-mark-active-p)]
2479 ["Unmark region" gnus-uu-unmark-region (gnus-mark-active-p)]
2480 ["Mark by regexp..." gnus-uu-mark-by-regexp t]
2481 ["Unmark by regexp..." gnus-uu-unmark-by-regexp t]
2482 ["Mark all" gnus-uu-mark-all t]
2483 ["Mark buffer" gnus-uu-mark-buffer t]
2484 ["Mark sparse" gnus-uu-mark-sparse t]
2485 ["Mark thread" gnus-uu-mark-thread t]
2486 ["Unmark thread" gnus-uu-unmark-thread t]
2487 ("Process Mark Sets"
2488 ["Kill" gnus-summary-kill-process-mark t]
2489 ["Yank" gnus-summary-yank-process-mark
2490 gnus-newsgroup-process-stack]
2491 ["Save" gnus-summary-save-process-mark t]
2492 ["Run command on marked..." gnus-summary-universal-argument t]))
2494 ["Page forward" gnus-summary-next-page
2495 ,@(if (featurep 'xemacs) '(t)
2496 '(:help "Show next page of article"))]
2497 ["Page backward" gnus-summary-prev-page
2498 ,@(if (featurep 'xemacs) '(t)
2499 '(:help "Show previous page of article"))]
2500 ["Line forward" gnus-summary-scroll-up t])
2502 ["Next unread article" gnus-summary-next-unread-article t]
2503 ["Previous unread article" gnus-summary-prev-unread-article t]
2504 ["Next article" gnus-summary-next-article t]
2505 ["Previous article" gnus-summary-prev-article t]
2506 ["Next unread subject" gnus-summary-next-unread-subject t]
2507 ["Previous unread subject" gnus-summary-prev-unread-subject t]
2508 ["Next article same subject" gnus-summary-next-same-subject t]
2509 ["Previous article same subject" gnus-summary-prev-same-subject t]
2510 ["First unread article" gnus-summary-first-unread-article t]
2511 ["Best unread article" gnus-summary-best-unread-article t]
2512 ["Go to subject number..." gnus-summary-goto-subject t]
2513 ["Go to article number..." gnus-summary-goto-article t]
2514 ["Go to the last article" gnus-summary-goto-last-article t]
2515 ["Pop article off history" gnus-summary-pop-article t])
2517 ["Sort by number" gnus-summary-sort-by-number t]
2518 ["Sort by author" gnus-summary-sort-by-author t]
2519 ["Sort by subject" gnus-summary-sort-by-subject t]
2520 ["Sort by date" gnus-summary-sort-by-date t]
2521 ["Sort by score" gnus-summary-sort-by-score t]
2522 ["Sort by lines" gnus-summary-sort-by-lines t]
2523 ["Sort by characters" gnus-summary-sort-by-chars t]
2524 ["Randomize" gnus-summary-sort-by-random t]
2525 ["Original sort" gnus-summary-sort-by-original t])
2527 ["Fetch group FAQ" gnus-summary-fetch-faq t]
2528 ["Describe group" gnus-summary-describe-group t]
2529 ["Fetch charter" gnus-group-fetch-charter
2530 ,@(if (featurep 'xemacs) nil
2531 '(:help "Display the charter of the current group"))]
2532 ["Fetch control message" gnus-group-fetch-control
2533 ,@(if (featurep 'xemacs) nil
2534 '(:help "Display the archived control message for the current group"))]
2535 ["Read manual" gnus-info-find-node t])
2537 ["Pick and read" gnus-pick-mode t]
2538 ["Binary" gnus-binary-mode t])
2540 ["Regenerate" gnus-summary-prepare t]
2541 ["Insert cached articles" gnus-summary-insert-cached-articles t]
2542 ["Insert dormant articles" gnus-summary-insert-dormant-articles t]
2543 ["Toggle threading" gnus-summary-toggle-threads t])
2544 ["See old articles" gnus-summary-insert-old-articles t]
2545 ["See new articles" gnus-summary-insert-new-articles t]
2546 ["Filter articles..." gnus-summary-execute-command t]
2547 ["Run command on articles..." gnus-summary-universal-argument t]
2548 ["Search articles forward..." gnus-summary-search-article-forward t]
2549 ["Search articles backward..." gnus-summary-search-article-backward t]
2550 ["Toggle line truncation" gnus-summary-toggle-truncation t]
2551 ["Expand window" gnus-summary-expand-window t]
2552 ["Expire expirable articles" gnus-summary-expire-articles
2553 (gnus-check-backend-function
2554 'request-expire-articles gnus-newsgroup-name)]
2555 ["Edit local kill file" gnus-summary-edit-local-kill t]
2556 ["Edit main kill file" gnus-summary-edit-global-kill t]
2557 ["Edit group parameters" gnus-summary-edit-parameters t]
2558 ["Customize group parameters" gnus-summary-customize-parameters t]
2559 ["Send a bug report" gnus-bug t]
2561 ["Catchup and exit" gnus-summary-catchup-and-exit
2562 ,@(if (featurep 'xemacs) '(t)
2563 '(:help "Mark unread articles in this group as read, then exit"))]
2564 ["Catchup all and exit" gnus-summary-catchup-all-and-exit t]
2565 ["Catchup and goto next" gnus-summary-catchup-and-goto-next-group t]
2566 ["Exit group" gnus-summary-exit
2567 ,@(if (featurep 'xemacs) '(t)
2568 '(:help "Exit current group, return to group selection mode"))]
2569 ["Exit group without updating" gnus-summary-exit-no-update t]
2570 ["Exit and goto next group" gnus-summary-next-group t]
2571 ["Exit and goto prev group" gnus-summary-prev-group t]
2572 ["Reselect group" gnus-summary-reselect-current-group t]
2573 ["Rescan group" gnus-summary-rescan-group t]
2574 ["Update dribble" gnus-summary-save-newsrc t])))
2576 (gnus-run-hooks 'gnus-summary-menu-hook)))
2578 (defvar gnus-summary-tool-bar-map nil)
2580 ;; Emacs 21 tool bar. Should be no-op otherwise.
2581 (defun gnus-summary-make-tool-bar ()
2582 (if (and (fboundp 'tool-bar-add-item-from-menu)
2583 (default-value 'tool-bar-mode)
2584 (not gnus-summary-tool-bar-map))
2585 (setq gnus-summary-tool-bar-map
2586 (let ((tool-bar-map (make-sparse-keymap))
2587 (load-path (mm-image-load-path)))
2588 (tool-bar-add-item-from-menu
2589 'gnus-summary-prev-unread "prev-ur" gnus-summary-mode-map)
2590 (tool-bar-add-item-from-menu
2591 'gnus-summary-next-unread "next-ur" gnus-summary-mode-map)
2592 (tool-bar-add-item-from-menu
2593 'gnus-summary-post-news "post" gnus-summary-mode-map)
2594 (tool-bar-add-item-from-menu
2595 'gnus-summary-followup-with-original "fuwo" gnus-summary-mode-map)
2596 (tool-bar-add-item-from-menu
2597 'gnus-summary-followup "followup" gnus-summary-mode-map)
2598 (tool-bar-add-item-from-menu
2599 'gnus-summary-reply-with-original "reply-wo" gnus-summary-mode-map)
2600 (tool-bar-add-item-from-menu
2601 'gnus-summary-reply "reply" gnus-summary-mode-map)
2602 (tool-bar-add-item-from-menu
2603 'gnus-summary-caesar-message "rot13" gnus-summary-mode-map)
2604 (tool-bar-add-item-from-menu
2605 'gnus-uu-decode-uu "uu-decode" gnus-summary-mode-map)
2606 (tool-bar-add-item-from-menu
2607 'gnus-summary-save-article-file "save-aif" gnus-summary-mode-map)
2608 (tool-bar-add-item-from-menu
2609 'gnus-summary-save-article "save-art" gnus-summary-mode-map)
2610 (tool-bar-add-item-from-menu
2611 'gnus-uu-post-news "uu-post" gnus-summary-mode-map)
2612 (tool-bar-add-item-from-menu
2613 'gnus-summary-catchup "catchup" gnus-summary-mode-map)
2614 (tool-bar-add-item-from-menu
2615 'gnus-summary-catchup-and-exit "cu-exit" gnus-summary-mode-map)
2616 (tool-bar-add-item-from-menu
2617 'gnus-summary-exit "exit-summ" gnus-summary-mode-map)
2619 (if gnus-summary-tool-bar-map
2620 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map)))
2622 (defun gnus-score-set-default (var value)
2623 "A version of set that updates the GNU Emacs menu-bar."
2625 ;; It is the message that forces the active status to be updated.
2628 (defun gnus-make-score-map (type)
2629 "Make a summary score map of type TYPE."
2632 (let ((headers '(("author" "from" string)
2633 ("subject" "subject" string)
2634 ("article body" "body" string)
2635 ("article head" "head" string)
2636 ("xref" "xref" string)
2637 ("extra header" "extra" string)
2638 ("lines" "lines" number)
2639 ("followups to author" "followup" string)))
2640 (types '((number ("less than" <)
2643 (string ("substring" s)
2647 (perms '(("temporary" (current-time-string))
2655 (if (eq type 'lower)
2660 (setq header (car headers))
2666 (let ((ts (cdr (assoc (nth 2 header) types)))
2682 'gnus-summary-score-entry
2684 (if (or (string= (nth 1 header)
2686 (string= (nth 1 header)
2689 (list 'gnus-summary-header
2691 (list 'quote (nth 1 (car ts)))
2692 (list 'gnus-score-delta-default
2699 (list (nreverse outp))))
2702 (list (nreverse outt))))
2704 (setq headers (cdr headers)))
2705 (list (nreverse outh))))))))
2709 (defun gnus-summary-mode (&optional group)
2710 "Major mode for reading articles.
2712 All normal editing commands are switched off.
2713 \\<gnus-summary-mode-map>
2714 Each line in this buffer represents one article. To read an
2715 article, you can, for instance, type `\\[gnus-summary-next-page]'. To move forwards
2716 and backwards while displaying articles, type `\\[gnus-summary-next-unread-article]' and `\\[gnus-summary-prev-unread-article]',
2719 You can also post articles and send mail from this buffer. To
2720 follow up an article, type `\\[gnus-summary-followup]'. To mail a reply to the author
2721 of an article, type `\\[gnus-summary-reply]'.
2723 There are approx. one gazillion commands you can execute in this
2724 buffer; read the info pages for more information (`\\[gnus-info-find-node]').
2726 The following commands are available:
2728 \\{gnus-summary-mode-map}"
2730 (kill-all-local-variables)
2731 (when (gnus-visual-p 'summary-menu 'menu)
2732 (gnus-summary-make-menu-bar)
2733 (gnus-summary-make-tool-bar))
2734 (gnus-summary-make-local-variables)
2735 (let ((gnus-summary-local-variables gnus-newsgroup-variables))
2736 (gnus-summary-make-local-variables))
2737 (gnus-make-thread-indent-array)
2738 (gnus-simplify-mode-line)
2739 (setq major-mode 'gnus-summary-mode)
2740 (setq mode-name "Summary")
2741 (make-local-variable 'minor-mode-alist)
2742 (use-local-map gnus-summary-mode-map)
2743 (buffer-disable-undo)
2744 (setq buffer-read-only t) ;Disable modification
2745 (setq truncate-lines t)
2746 (setq selective-display t)
2747 (setq selective-display-ellipses t) ;Display `...'
2748 (gnus-summary-set-display-table)
2749 (gnus-set-default-directory)
2750 (setq gnus-newsgroup-name group)
2751 (make-local-variable 'gnus-summary-line-format)
2752 (make-local-variable 'gnus-summary-line-format-spec)
2753 (make-local-variable 'gnus-summary-dummy-line-format)
2754 (make-local-variable 'gnus-summary-dummy-line-format-spec)
2755 (make-local-variable 'gnus-summary-mark-positions)
2756 (gnus-make-local-hook 'pre-command-hook)
2757 (add-hook 'pre-command-hook 'gnus-set-global-variables nil t)
2758 (gnus-run-hooks 'gnus-summary-mode-hook)
2759 (turn-on-gnus-mailing-list-mode)
2760 (mm-enable-multibyte)
2761 (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy)
2762 (gnus-update-summary-mark-positions))
2764 (defun gnus-summary-make-local-variables ()
2765 "Make all the local summary buffer variables."
2767 (dolist (local gnus-summary-local-variables)
2770 (if (eq (cdr local) 'global)
2771 ;; Copy the global value of the variable.
2772 (setq global (symbol-value (car local)))
2773 ;; Use the value from the list.
2774 (setq global (eval (cdr local))))
2775 (set (make-local-variable (car local)) global))
2776 ;; Simple nil-valued local variable.
2777 (set (make-local-variable local) nil)))))
2779 (defun gnus-summary-clear-local-variables ()
2780 (let ((locals gnus-summary-local-variables))
2782 (if (consp (car locals))
2783 (and (vectorp (caar locals))
2784 (set (caar locals) nil))
2785 (and (vectorp (car locals))
2786 (set (car locals) nil)))
2787 (setq locals (cdr locals)))))
2789 ;; Summary data functions.
2791 (defmacro gnus-data-number (data)
2794 (defmacro gnus-data-set-number (data number)
2795 `(setcar ,data ,number))
2797 (defmacro gnus-data-mark (data)
2800 (defmacro gnus-data-set-mark (data mark)
2801 `(setcar (nthcdr 1 ,data) ,mark))
2803 (defmacro gnus-data-pos (data)
2806 (defmacro gnus-data-set-pos (data pos)
2807 `(setcar (nthcdr 2 ,data) ,pos))
2809 (defmacro gnus-data-header (data)
2812 (defmacro gnus-data-set-header (data header)
2813 `(setf (nth 3 ,data) ,header))
2815 (defmacro gnus-data-level (data)
2818 (defmacro gnus-data-unread-p (data)
2819 `(= (nth 1 ,data) gnus-unread-mark))
2821 (defmacro gnus-data-read-p (data)
2822 `(/= (nth 1 ,data) gnus-unread-mark))
2824 (defmacro gnus-data-pseudo-p (data)
2825 `(consp (nth 3 ,data)))
2827 (defmacro gnus-data-find (number)
2828 `(assq ,number gnus-newsgroup-data))
2830 (defmacro gnus-data-find-list (number &optional data)
2831 `(let ((bdata ,(or data 'gnus-newsgroup-data)))
2832 (memq (assq ,number bdata)
2835 (defmacro gnus-data-make (number mark pos header level)
2836 `(list ,number ,mark ,pos ,header ,level))
2838 (defun gnus-data-enter (after-article number mark pos header level offset)
2839 (let ((data (gnus-data-find-list after-article)))
2841 (error "No such article: %d" after-article))
2842 (setcdr data (cons (gnus-data-make number mark pos header level)
2844 (setq gnus-newsgroup-data-reverse nil)
2845 (gnus-data-update-list (cddr data) offset)))
2847 (defun gnus-data-enter-list (after-article list &optional offset)
2849 (let ((data (and after-article (gnus-data-find-list after-article)))
2853 (let ((odata gnus-newsgroup-data))
2854 (setq gnus-newsgroup-data (nconc list gnus-newsgroup-data))
2856 (gnus-data-update-list odata offset)))
2857 ;; Find the last element in the list to be spliced into the main
2860 (setq list (cdr list)))
2863 (setcdr list gnus-newsgroup-data)
2864 (setq gnus-newsgroup-data ilist)
2866 (gnus-data-update-list (cdr list) offset)))
2867 (setcdr list (cdr data))
2870 (gnus-data-update-list (cdr list) offset))))
2871 (setq gnus-newsgroup-data-reverse nil))))
2873 (defun gnus-data-remove (article &optional offset)
2874 (let ((data gnus-newsgroup-data))
2875 (if (= (gnus-data-number (car data)) article)
2877 (setq gnus-newsgroup-data (cdr gnus-newsgroup-data)
2878 gnus-newsgroup-data-reverse nil)
2880 (gnus-data-update-list gnus-newsgroup-data offset)))
2882 (when (= (gnus-data-number (cadr data)) article)
2883 (setcdr data (cddr data))
2885 (gnus-data-update-list (cdr data) offset))
2887 gnus-newsgroup-data-reverse nil))
2888 (setq data (cdr data))))))
2890 (defmacro gnus-data-list (backward)
2892 (or gnus-newsgroup-data-reverse
2893 (setq gnus-newsgroup-data-reverse
2894 (reverse gnus-newsgroup-data)))
2895 gnus-newsgroup-data))
2897 (defun gnus-data-update-list (data offset)
2898 "Add OFFSET to the POS of all data entries in DATA."
2899 (setq gnus-newsgroup-data-reverse nil)
2901 (setcar (nthcdr 2 (car data)) (+ offset (nth 2 (car data))))
2902 (setq data (cdr data))))
2904 (defun gnus-summary-article-pseudo-p (article)
2905 "Say whether this article is a pseudo article or not."
2906 (not (vectorp (gnus-data-header (gnus-data-find article)))))
2908 (defmacro gnus-summary-article-sparse-p (article)
2909 "Say whether this article is a sparse article or not."
2910 `(memq ,article gnus-newsgroup-sparse))
2912 (defmacro gnus-summary-article-ancient-p (article)
2913 "Say whether this article is a sparse article or not."
2914 `(memq ,article gnus-newsgroup-ancient))
2916 (defun gnus-article-parent-p (number)
2917 "Say whether this article is a parent or not."
2918 (let ((data (gnus-data-find-list number)))
2919 (and (cdr data) ; There has to be an article after...
2920 (< (gnus-data-level (car data)) ; And it has to have a higher level.
2921 (gnus-data-level (nth 1 data))))))
2923 (defun gnus-article-children (number)
2924 "Return a list of all children to NUMBER."
2925 (let* ((data (gnus-data-find-list number))
2926 (level (gnus-data-level (car data)))
2928 (setq data (cdr data))
2930 (= (gnus-data-level (car data)) (1+ level)))
2931 (push (gnus-data-number (car data)) children)
2932 (setq data (cdr data)))
2935 (defmacro gnus-summary-skip-intangible ()
2936 "If the current article is intangible, then jump to a different article."
2937 '(let ((to (get-text-property (point) 'gnus-intangible)))
2938 (and to (gnus-summary-goto-subject to))))
2940 (defmacro gnus-summary-article-intangible-p ()
2941 "Say whether this article is intangible or not."
2942 '(get-text-property (point) 'gnus-intangible))
2944 (defun gnus-article-read-p (article)
2945 "Say whether ARTICLE is read or not."
2946 (not (or (memq article gnus-newsgroup-marked)
2947 (memq article gnus-newsgroup-spam-marked)
2948 (memq article gnus-newsgroup-unreads)
2949 (memq article gnus-newsgroup-unselected)
2950 (memq article gnus-newsgroup-dormant))))
2952 ;; Some summary mode macros.
2954 (defmacro gnus-summary-article-number ()
2955 "The article number of the article on the current line.
2956 If there isn't an article number here, then we return the current
2959 (gnus-summary-skip-intangible)
2960 (or (get-text-property (point) 'gnus-number)
2961 (gnus-summary-last-subject))))
2963 (defmacro gnus-summary-article-header (&optional number)
2964 "Return the header of article NUMBER."
2965 `(gnus-data-header (gnus-data-find
2966 ,(or number '(gnus-summary-article-number)))))
2968 (defmacro gnus-summary-thread-level (&optional number)
2969 "Return the level of thread that starts with article NUMBER."
2970 `(if (and (eq gnus-summary-make-false-root 'dummy)
2971 (get-text-property (point) 'gnus-intangible))
2973 (gnus-data-level (gnus-data-find
2974 ,(or number '(gnus-summary-article-number))))))
2976 (defmacro gnus-summary-article-mark (&optional number)
2977 "Return the mark of article NUMBER."
2978 `(gnus-data-mark (gnus-data-find
2979 ,(or number '(gnus-summary-article-number)))))
2981 (defmacro gnus-summary-article-pos (&optional number)
2982 "Return the position of the line of article NUMBER."
2983 `(gnus-data-pos (gnus-data-find
2984 ,(or number '(gnus-summary-article-number)))))
2986 (defalias 'gnus-summary-subject-string 'gnus-summary-article-subject)
2987 (defmacro gnus-summary-article-subject (&optional number)
2988 "Return current subject string or nil if nothing."
2991 `(gnus-data-header (assq ,number gnus-newsgroup-data))
2992 '(gnus-data-header (assq (gnus-summary-article-number)
2993 gnus-newsgroup-data)))))
2996 (mail-header-subject headers))))
2998 (defmacro gnus-summary-article-score (&optional number)
2999 "Return current article score."
3000 `(or (cdr (assq ,(or number '(gnus-summary-article-number))
3001 gnus-newsgroup-scored))
3002 gnus-summary-default-score 0))
3004 (defun gnus-summary-article-children (&optional number)
3005 "Return a list of article numbers that are children of article NUMBER."
3006 (let* ((data (gnus-data-find-list (or number (gnus-summary-article-number))))
3007 (level (gnus-data-level (car data)))
3009 (while (and (setq data (cdr data))
3010 (> (setq l (gnus-data-level (car data))) level))
3011 (and (= (1+ level) l)
3012 (push (gnus-data-number (car data))
3014 (nreverse children)))
3016 (defun gnus-summary-article-parent (&optional number)
3017 "Return the article number of the parent of article NUMBER."
3018 (let* ((data (gnus-data-find-list (or number (gnus-summary-article-number))
3019 (gnus-data-list t)))
3020 (level (gnus-data-level (car data))))
3022 () ; This is a root.
3023 ;; We search until we find an article with a level less than
3024 ;; this one. That function has to be the parent.
3025 (while (and (setq data (cdr data))
3026 (not (< (gnus-data-level (car data)) level))))
3027 (and data (gnus-data-number (car data))))))
3029 (defun gnus-unread-mark-p (mark)
3030 "Say whether MARK is the unread mark."
3031 (= mark gnus-unread-mark))
3033 (defun gnus-read-mark-p (mark)
3034 "Say whether MARK is one of the marks that mark as read.
3035 This is all marks except unread, ticked, dormant, and expirable."
3036 (not (or (= mark gnus-unread-mark)
3037 (= mark gnus-ticked-mark)
3038 (= mark gnus-spam-mark)
3039 (= mark gnus-dormant-mark)
3040 (= mark gnus-expirable-mark))))
3042 (defmacro gnus-article-mark (number)
3043 "Return the MARK of article NUMBER.
3044 This macro should only be used when computing the mark the \"first\"
3045 time; i.e., when generating the summary lines. After that,
3046 `gnus-summary-article-mark' should be used to examine the
3049 ((memq ,number gnus-newsgroup-unsendable) gnus-unsendable-mark)
3050 ((memq ,number gnus-newsgroup-downloadable) gnus-downloadable-mark)
3051 ((memq ,number gnus-newsgroup-unreads) gnus-unread-mark)
3052 ((memq ,number gnus-newsgroup-marked) gnus-ticked-mark)
3053 ((memq ,number gnus-newsgroup-spam-marked) gnus-spam-mark)
3054 ((memq ,number gnus-newsgroup-dormant) gnus-dormant-mark)
3055 ((memq ,number gnus-newsgroup-expirable) gnus-expirable-mark)
3056 (t (or (cdr (assq ,number gnus-newsgroup-reads))
3057 gnus-ancient-mark))))
3059 ;; Saving hidden threads.
3061 (defmacro gnus-save-hidden-threads (&rest forms)
3062 "Save hidden threads, eval FORMS, and restore the hidden threads."
3063 (let ((config (make-symbol "config")))
3064 `(let ((,config (gnus-hidden-threads-configuration)))
3068 (gnus-restore-hidden-threads-configuration ,config)))))
3069 (put 'gnus-save-hidden-threads 'lisp-indent-function 0)
3070 (put 'gnus-save-hidden-threads 'edebug-form-spec '(body))
3072 (defun gnus-data-compute-positions ()
3073 "Compute the positions of all articles."
3074 (setq gnus-newsgroup-data-reverse nil)
3075 (let ((data gnus-newsgroup-data))
3077 (gnus-save-hidden-threads
3078 (gnus-summary-show-all-threads)
3079 (goto-char (point-min))
3081 (while (get-text-property (point) 'gnus-intangible)
3083 (gnus-data-set-pos (car data) (+ (point) 3))
3084 (setq data (cdr data))
3085 (forward-line 1))))))
3087 (defun gnus-hidden-threads-configuration ()
3088 "Return the current hidden threads configuration."
3091 (goto-char (point-min))
3092 (while (search-forward "\r" nil t)
3093 (push (1- (point)) config))
3096 (defun gnus-restore-hidden-threads-configuration (config)
3097 "Restore hidden threads configuration from CONFIG."
3099 (let (point buffer-read-only)
3100 (while (setq point (pop config))
3101 (when (and (< point (point-max))
3103 (eq (char-after) ?\n))
3104 (subst-char-in-region point (1+ point) ?\n ?\r))))))
3106 ;; Various summary mode internalish functions.
3108 (defun gnus-mouse-pick-article (e)
3111 (gnus-summary-next-page nil t))
3113 (defun gnus-summary-set-display-table ()
3114 "Change the display table.
3115 Odd characters have a tendency to mess
3116 up nicely formatted displays - we make all possible glyphs
3117 display only a single character."
3119 ;; We start from the standard display table, if any.
3120 (let ((table (or (copy-sequence standard-display-table)
3121 (make-display-table)))
3123 ;; Nix out all the control chars...
3124 (while (>= (setq i (1- i)) 0)
3125 (aset table i [??]))
3126 ;; ... but not newline and cr, of course. (cr is necessary for the
3127 ;; selective display).
3128 (aset table ?\n nil)
3129 (aset table ?\r nil)