1 ;;; gnus-sum.el --- summary mode commands for Gnus
3 ;; Copyright (C) 1996-2011 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 3 of the License, or
13 ;; (at your option) any later version.
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. If not, see <http://www.gnu.org/licenses/>.
27 ;; For Emacs <22.2 and XEmacs.
29 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
33 (when (featurep 'xemacs)
34 (require 'easy-mmode))) ; for `define-minor-mode'
36 (defvar tool-bar-mode)
37 (defvar gnus-tmp-header)
50 (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t)
51 (autoload 'gnus-cache-write-active "gnus-cache")
52 (autoload 'gnus-mailing-list-insinuate "gnus-ml" nil t)
53 (autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" nil t)
54 (autoload 'gnus-pick-line-number "gnus-salt" nil t)
55 (autoload 'mm-uu-dissect "mm-uu")
56 (autoload 'gnus-article-outlook-deuglify-article "deuglify"
57 "Deuglify broken Outlook (Express) articles and redisplay."
59 (autoload 'gnus-article-outlook-unwrap-lines "deuglify" nil t)
60 (autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t)
61 (autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t)
62 (autoload 'nnir-article-rsv "nnir" nil nil 'macro)
63 (autoload 'nnir-article-group "nnir" nil nil 'macro)
65 (defcustom gnus-kill-summary-on-exit t
66 "*If non-nil, kill the summary buffer when you exit from it.
67 If nil, the summary will become a \"*Dead Summary*\" buffer, and
68 it will be killed sometime later."
69 :group 'gnus-summary-exit
72 (defcustom gnus-summary-next-group-on-exit t
73 "If non-nil, go to the next unread newsgroup on summary exit.
74 See `gnus-group-goto-unread'."
75 :link '(custom-manual "(gnus)Group Maneuvering")
76 :group 'gnus-summary-exit
77 :version "23.1" ;; No Gnus
80 (defcustom gnus-summary-stop-at-end-of-message nil
81 "If non-nil, don't select the next message when using `SPC'."
82 :link '(custom-manual "(gnus)Group Maneuvering")
83 :group 'gnus-summary-maneuvering
87 (defcustom gnus-fetch-old-headers nil
88 "*Non-nil means that Gnus will try to build threads by grabbing old headers.
89 If an unread article in the group refers to an older, already
90 read (or just marked as read) article, the old article will not
91 normally be displayed in the Summary buffer. If this variable is
92 t, Gnus will attempt to grab the headers to the old articles, and
93 thereby build complete threads. If it has the value `some', all
94 old headers will be fetched but only enough headers to connect
95 otherwise loose threads will be displayed. This variable can
96 also be a number. In that case, no more than that number of old
97 headers will be fetched. If it has the value `invisible', all
98 old headers will be fetched, but none will be displayed.
100 The server has to support NOV for any of this to work.
102 This feature can seriously impact performance it ignores all
103 locally cached header entries. Setting it to t for groups for a
104 server that doesn't expire articles (such as news.gmane.org),
105 leads to very slow summary generation."
107 :type '(choice (const :tag "off" nil)
112 (sexp :menu-tag "other" t)))
114 (defcustom gnus-refer-thread-limit 500
115 "*The number of old headers to fetch when doing \\<gnus-summary-mode-map>\\[gnus-summary-refer-thread].
116 If t, fetch all the available old headers."
118 :type '(choice number
119 (sexp :menu-tag "other" t)))
121 (defcustom gnus-summary-make-false-root 'adopt
122 "*nil means that Gnus won't gather loose threads.
123 If the root of a thread has expired or been read in a previous
124 session, the information necessary to build a complete thread has been
125 lost. Instead of having many small sub-threads from this original thread
126 scattered all over the summary buffer, Gnus can gather them.
128 If non-nil, Gnus will try to gather all loose sub-threads from an
129 original thread into one large thread.
131 If this variable is non-nil, it should be one of `none', `adopt',
134 If this variable is `none', Gnus will not make a false root, but just
135 present the sub-threads after another.
136 If this variable is `dummy', Gnus will create a dummy root that will
137 have all the sub-threads as children.
138 If this variable is `adopt', Gnus will make one of the \"children\"
139 the parent and mark all the step-children as such.
140 If this variable is `empty', the \"children\" are printed with empty
141 subject fields. (Or rather, they will be printed with a string
142 given by the `gnus-summary-same-subject' variable.)"
144 :type '(choice (const :tag "off" nil)
150 (defcustom gnus-summary-make-false-root-always nil
151 "Always make a false dummy root."
156 (defcustom gnus-summary-gather-exclude-subject "^ *$\\|^(none)$"
157 "*A regexp to match subjects to be excluded from loose thread gathering.
158 As loose thread gathering is done on subjects only, that means that
159 there can be many false gatherings performed. By rooting out certain
160 common subjects, gathering might become saner."
164 (defcustom gnus-summary-gather-subject-limit nil
165 "*Maximum length of subject comparisons when gathering loose threads.
166 Use nil to compare full subjects. Setting this variable to a low
167 number will help gather threads that have been corrupted by
168 newsreaders chopping off subject lines, but it might also mean that
169 unrelated articles that have subject that happen to begin with the
170 same few characters will be incorrectly gathered.
172 If this variable is `fuzzy', Gnus will use a fuzzy algorithm when
175 :type '(choice (const :tag "off" nil)
177 (sexp :menu-tag "on" t)))
179 (defcustom gnus-simplify-subject-functions nil
180 "List of functions taking a string argument that simplify subjects.
181 The functions are applied recursively.
183 Useful functions to put in this list include:
184 `gnus-simplify-subject-re', `gnus-simplify-subject-fuzzy',
185 `gnus-simplify-whitespace', and `gnus-simplify-all-whitespace'."
187 :type '(repeat function))
189 (defcustom gnus-simplify-ignored-prefixes nil
190 "*Remove matches for this regexp from subject lines when simplifying fuzzily."
192 :type '(choice (const :tag "off" nil)
195 (defcustom gnus-build-sparse-threads nil
196 "*If non-nil, fill in the gaps in threads.
197 If `some', only fill in the gaps that are needed to tie loose threads
198 together. If `more', fill in all leaf nodes that Gnus can find. If
199 non-nil and non-`some', fill in all gaps that Gnus manages to guess."
201 :type '(choice (const :tag "off" nil)
204 (sexp :menu-tag "all" t)))
206 (defcustom gnus-summary-thread-gathering-function
207 'gnus-gather-threads-by-subject
208 "*Function used for gathering loose threads.
209 There are two pre-defined functions: `gnus-gather-threads-by-subject',
210 which only takes Subjects into consideration; and
211 `gnus-gather-threads-by-references', which compared the References
212 headers of the articles to find matches."
214 :type '(radio (function-item gnus-gather-threads-by-subject)
215 (function-item gnus-gather-threads-by-references)
216 (function :tag "other")))
218 (defcustom gnus-summary-same-subject ""
219 "*String indicating that the current article has the same subject as the previous.
220 This variable will only be used if the value of
221 `gnus-summary-make-false-root' is `empty'."
222 :group 'gnus-summary-format
225 (defcustom gnus-summary-goto-unread nil
226 "*If t, many commands will go to the next unread article.
227 This applies to marking commands as well as other commands that
228 \"naturally\" select the next article, like, for instance, `SPC' at
229 the end of an article.
231 If nil, the marking commands do NOT go to the next unread article
232 \(they go to the next article instead). If `never', commands that
233 usually go to the next unread article, will go to the next article,
234 whether it is read or not."
236 :group 'gnus-summary-marks
237 :link '(custom-manual "(gnus)Setting Marks")
238 :type '(choice (const :tag "off" nil)
240 (sexp :menu-tag "on" t)))
242 (defcustom gnus-summary-default-score 0
243 "*Default article score level.
244 All scores generated by the score files will be added to this score.
245 If this variable is nil, scoring will be disabled."
246 :group 'gnus-score-default
247 :type '(choice (const :tag "disable")
250 (defcustom gnus-summary-default-high-score 0
251 "*Default threshold for a high scored article.
252 An article will be highlighted as high scored if its score is greater
255 :group 'gnus-score-default
258 (defcustom gnus-summary-default-low-score 0
259 "*Default threshold for a low scored article.
260 An article will be highlighted as low scored if its score is smaller
263 :group 'gnus-score-default
266 (defcustom gnus-summary-zcore-fuzz 0
267 "*Fuzziness factor for the zcore in the summary buffer.
268 Articles with scores closer than this to `gnus-summary-default-score'
270 :group 'gnus-summary-format
273 (defcustom gnus-simplify-subject-fuzzy-regexp nil
274 "*Strings to be removed when doing fuzzy matches.
275 This can either be a regular expression or list of regular expressions
276 that will be removed from subject strings if fuzzy subject
277 simplification is selected."
279 :type '(repeat regexp))
281 (defcustom gnus-show-threads t
282 "*If non-nil, display threads in summary mode."
286 (defcustom gnus-thread-hide-subtree nil
287 "*If non-nil, hide all threads initially.
288 This can be a predicate specifier which says which threads to hide.
289 If threads are hidden, you have to run the command
290 `gnus-summary-show-thread' by hand or select an article."
292 :type '(radio (sexp :format "Non-nil\n"
293 :match (lambda (widget value)
294 (not (or (consp value) (functionp value))))
297 (sexp :tag "Predicate specifier")))
299 (defcustom gnus-thread-hide-killed t
300 "*If non-nil, hide killed threads automatically."
304 (defcustom gnus-thread-ignore-subject t
305 "*If non-nil, which is the default, ignore subjects and do all threading based on the Reference header.
306 If nil, articles that have different subjects from their parents will
307 start separate threads."
311 (defcustom gnus-thread-operation-ignore-subject t
312 "*If non-nil, subjects will be ignored when doing thread commands.
313 This affects commands like `gnus-summary-kill-thread' and
314 `gnus-summary-lower-thread'.
316 If this variable is nil, articles in the same thread with different
317 subjects will not be included in the operation in question. If this
318 variable is `fuzzy', only articles that have subjects that are fuzzily
319 equal will be included."
321 :type '(choice (const :tag "off" nil)
325 (defcustom gnus-thread-indent-level 4
326 "*Number that says how much each sub-thread should be indented."
330 (defcustom gnus-auto-extend-newsgroup t
331 "*If non-nil, extend newsgroup forward and backward when requested."
332 :group 'gnus-summary-choose
335 (defcustom gnus-auto-select-first t
336 "If non-nil, select an article on group entry.
337 An article is selected automatically when entering a group
338 e.g. with \\<gnus-group-mode-map>\\[gnus-group-read-group], or via `gnus-summary-next-page' or
339 `gnus-summary-catchup-and-goto-next-group'.
341 Which article is selected is controlled by the variable
342 `gnus-auto-select-subject'.
344 If you want to prevent automatic selection of articles in some
345 newsgroups, set the variable to nil in `gnus-select-group-hook'."
346 ;; Commands include...
347 ;; \\<gnus-group-mode-map>\\[gnus-group-read-group]
348 ;; \\<gnus-summary-mode-map>\\[gnus-summary-next-page]
349 ;; \\<gnus-summary-mode-map>\\[gnus-summary-catchup-and-goto-next-group]
350 :group 'gnus-group-select
351 :type '(choice (const :tag "none" nil)
352 (sexp :menu-tag "first" t)))
354 (defcustom gnus-auto-select-subject 'unseen-or-unread
355 "*Says what subject to place under point when entering a group.
357 This variable can either be the symbols `first' (place point on the
358 first subject), `unread' (place point on the subject line of the first
359 unread article), `best' (place point on the subject line of the
360 higest-scored article), `unseen' (place point on the subject line of
361 the first unseen article), `unseen-or-unread' (place point on the subject
362 line of the first unseen article or, if all articles have been seen, on the
363 subject line of the first unread article), or a function to be called to
364 place point on some subject line."
366 :group 'gnus-group-select
367 :type '(choice (const best)
371 (const unseen-or-unread)))
373 (defcustom gnus-auto-select-next t
374 "*If non-nil, offer to go to the next group from the end of the previous.
375 If the value is t and the next newsgroup is empty, Gnus will exit
376 summary mode and go back to group mode. If the value is neither nil
377 nor t, Gnus will select the following unread newsgroup. In
378 particular, if the value is the symbol `quietly', the next unread
379 newsgroup will be selected without any confirmation, and if it is
380 `almost-quietly', the next group will be selected without any
381 confirmation if you are located on the last article in the group.
382 Finally, if this variable is `slightly-quietly', the `\\<gnus-summary-mode-map>\\[gnus-summary-catchup-and-goto-next-group]' command
383 will go to the next group without confirmation."
384 :group 'gnus-summary-maneuvering
385 :type '(choice (const :tag "off" nil)
387 (const almost-quietly)
388 (const slightly-quietly)
389 (sexp :menu-tag "on" t)))
391 (defcustom gnus-auto-select-same nil
392 "*If non-nil, select the next article with the same subject.
393 If there are no more articles with the same subject, go to
394 the first unread article."
395 :group 'gnus-summary-maneuvering
398 (defcustom gnus-auto-select-on-ephemeral-exit 'next-noselect
399 "What article should be selected after exiting an ephemeral group.
400 Valid values include:
403 Select the next article.
405 Select the next unread article.
407 Move the cursor to the next article. This is the default.
408 `next-unread-noselect'
409 Move the cursor to the next unread article.
411 If it has any other value or there is no next (unread) article, the
412 article selected before entering to the ephemeral group will appear."
413 :version "23.1" ;; No Gnus
414 :group 'gnus-summary-maneuvering
415 :type '(choice :format "%{%t%}:\n %[Value Menu%] %v"
416 (const next) (const next-unread)
417 (const next-noselect) (const next-unread-noselect)
418 (sexp :tag "other" :value nil)))
420 (defcustom gnus-auto-goto-ignores 'unfetched
421 "*Says how to handle unfetched articles when maneuvering.
423 This variable can either be the symbols nil (maneuver to any
424 article), `undownloaded' (maneuvering while unplugged ignores articles
425 that have not been fetched), `always-undownloaded' (maneuvering always
426 ignores articles that have not been fetched), `unfetched' (maneuvering
427 ignores articles whose headers have not been fetched).
429 NOTE: The list of unfetched articles will always be nil when plugged
430 and, when unplugged, a subset of the undownloaded article list."
432 :group 'gnus-summary-maneuvering
433 :type '(choice (const :tag "None" nil)
434 (const :tag "Undownloaded when unplugged" undownloaded)
435 (const :tag "Undownloaded" always-undownloaded)
436 (const :tag "Unfetched" unfetched)))
438 (defcustom gnus-summary-check-current nil
439 "*If non-nil, consider the current article when moving.
440 The \"unread\" movement commands will stay on the same line if the
441 current article is unread."
442 :group 'gnus-summary-maneuvering
445 (defcustom gnus-auto-center-summary 2
446 "*If non-nil, always center the current summary buffer.
447 In particular, if `vertical' do only vertical recentering. If non-nil
448 and non-`vertical', do both horizontal and vertical recentering."
449 :group 'gnus-summary-maneuvering
450 :type '(choice (const :tag "none" nil)
452 (integer :tag "height")
453 (sexp :menu-tag "both" t)))
455 (defcustom gnus-auto-center-group t
456 "If non-nil, always center the group buffer."
457 :group 'gnus-summary-maneuvering
460 (defcustom gnus-show-all-headers nil
461 "*If non-nil, don't hide any headers."
462 :group 'gnus-article-hiding
463 :group 'gnus-article-headers
466 (defcustom gnus-summary-ignore-duplicates nil
467 "*If non-nil, ignore articles with identical Message-ID headers."
471 (defcustom gnus-single-article-buffer nil
472 "*If non-nil, display all articles in the same buffer.
473 If nil, each group will get its own article buffer."
475 :group 'gnus-article-various
478 (defcustom gnus-widen-article-window nil
479 "If non-nil, selecting the article buffer will display only the article buffer."
481 :group 'gnus-article-various
484 (defcustom gnus-break-pages t
485 "*If non-nil, do page breaking on articles.
486 The page delimiter is specified by the `gnus-page-delimiter'
488 :group 'gnus-article-various
491 (defcustom gnus-move-split-methods nil
492 "*Variable used to suggest where articles are to be moved to.
493 It uses the same syntax as the `gnus-split-methods' variable.
494 However, whereas `gnus-split-methods' specifies file names as targets,
495 this variable specifies group names."
496 :group 'gnus-summary-mail
497 :type '(repeat (choice (list :value (fun) function)
498 (cons :value ("" "") regexp (repeat string))
501 (defcustom gnus-move-group-prefix-function 'gnus-group-real-prefix
502 "Function used to compute default prefix for article move/copy/etc prompts.
503 The function should take one argument, a group name, and return a
504 string with the suggested prefix."
505 :group 'gnus-summary-mail
508 ;; FIXME: Although the custom type is `character' for the following variables,
509 ;; using multibyte characters (Latin-1, UTF-8) doesn't work. -- rs
511 (defcustom gnus-unread-mark ? ;Whitespace
512 "*Mark used for unread articles."
513 :group 'gnus-summary-marks
516 (defcustom gnus-ticked-mark ?!
517 "*Mark used for ticked articles."
518 :group 'gnus-summary-marks
521 (defcustom gnus-dormant-mark ??
522 "*Mark used for dormant articles."
523 :group 'gnus-summary-marks
526 (defcustom gnus-del-mark ?r
527 "*Mark used for del'd articles."
528 :group 'gnus-summary-marks
531 (defcustom gnus-read-mark ?R
532 "*Mark used for read articles."
533 :group 'gnus-summary-marks
536 (defcustom gnus-expirable-mark ?E
537 "*Mark used for expirable articles."
538 :group 'gnus-summary-marks
541 (defcustom gnus-killed-mark ?K
542 "*Mark used for killed articles."
543 :group 'gnus-summary-marks
546 (defcustom gnus-spam-mark ?$
547 "*Mark used for spam articles."
549 :group 'gnus-summary-marks
552 (defcustom gnus-kill-file-mark ?X
553 "*Mark used for articles killed by kill files."
554 :group 'gnus-summary-marks
557 (defcustom gnus-low-score-mark ?Y
558 "*Mark used for articles with a low score."
559 :group 'gnus-summary-marks
562 (defcustom gnus-catchup-mark ?C
563 "*Mark used for articles that are caught up."
564 :group 'gnus-summary-marks
567 (defcustom gnus-replied-mark ?A
568 "*Mark used for articles that have been replied to."
569 :group 'gnus-summary-marks
572 (defcustom gnus-forwarded-mark ?F
573 "*Mark used for articles that have been forwarded."
575 :group 'gnus-summary-marks
578 (defcustom gnus-recent-mark ?N
579 "*Mark used for articles that are recent."
581 :group 'gnus-summary-marks
584 (defcustom gnus-cached-mark ?*
585 "*Mark used for articles that are in the cache."
586 :group 'gnus-summary-marks
589 (defcustom gnus-saved-mark ?S
590 "*Mark used for articles that have been saved."
591 :group 'gnus-summary-marks
594 (defcustom gnus-unseen-mark ?.
595 "*Mark used for articles that haven't been seen."
597 :group 'gnus-summary-marks
600 (defcustom gnus-no-mark ? ;Whitespace
601 "*Mark used for articles that have no other secondary mark."
603 :group 'gnus-summary-marks
606 (defcustom gnus-ancient-mark ?O
607 "*Mark used for ancient articles."
608 :group 'gnus-summary-marks
611 (defcustom gnus-sparse-mark ?Q
612 "*Mark used for sparsely reffed articles."
613 :group 'gnus-summary-marks
616 (defcustom gnus-canceled-mark ?G
617 "*Mark used for canceled articles."
618 :group 'gnus-summary-marks
621 (defcustom gnus-duplicate-mark ?M
622 "*Mark used for duplicate articles."
623 :group 'gnus-summary-marks
626 (defcustom gnus-undownloaded-mark ?-
627 "*Mark used for articles that weren't downloaded."
629 :group 'gnus-summary-marks
632 (defcustom gnus-downloaded-mark ?+
633 "*Mark used for articles that were downloaded."
634 :group 'gnus-summary-marks
637 (defcustom gnus-downloadable-mark ?%
638 "*Mark used for articles that are to be downloaded."
639 :group 'gnus-summary-marks
642 (defcustom gnus-unsendable-mark ?=
643 "*Mark used for articles that won't be sent."
644 :group 'gnus-summary-marks
647 (defcustom gnus-score-over-mark ?+
648 "*Score mark used for articles with high scores."
649 :group 'gnus-summary-marks
652 (defcustom gnus-score-below-mark ?-
653 "*Score mark used for articles with low scores."
654 :group 'gnus-summary-marks
657 (defcustom gnus-empty-thread-mark ? ;Whitespace
658 "*There is no thread under the article."
659 :group 'gnus-summary-marks
662 (defcustom gnus-not-empty-thread-mark ?=
663 "*There is a thread under the article."
664 :group 'gnus-summary-marks
667 (defcustom gnus-view-pseudo-asynchronously nil
668 "*If non-nil, Gnus will view pseudo-articles asynchronously."
669 :group 'gnus-extract-view
672 (defcustom gnus-auto-expirable-marks
673 (list gnus-killed-mark gnus-del-mark gnus-catchup-mark
674 gnus-low-score-mark gnus-ancient-mark gnus-read-mark
676 "*The list of marks converted into expiration if a group is auto-expirable."
679 :type '(repeat character))
681 (defcustom gnus-inhibit-user-auto-expire t
682 "*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on."
687 (defcustom gnus-mark-copied-or-moved-articles-as-expirable nil
688 "If non-nil, mark articles copied or moved to auto-expire group as expirable.
689 If nil, the expirable marks will be unchanged except that the marks
690 will be removed when copying or moving articles to a group that has
691 not turned auto-expire on. If non-nil, articles that have been read
692 will be marked as expirable when being copied or moved to a group in
693 which auto-expire is turned on."
696 :group 'gnus-summary-marks)
698 (defcustom gnus-view-pseudos nil
699 "*If `automatic', pseudo-articles will be viewed automatically.
700 If `not-confirm', pseudos will be viewed automatically, and the user
701 will not be asked to confirm the command."
702 :group 'gnus-extract-view
703 :type '(choice (const :tag "off" nil)
705 (const not-confirm)))
707 (defcustom gnus-view-pseudos-separately t
708 "*If non-nil, one pseudo-article will be created for each file to be viewed.
709 If nil, all files that use the same viewing command will be given as a
710 list of parameters to that command."
711 :group 'gnus-extract-view
714 (defcustom gnus-insert-pseudo-articles t
715 "*If non-nil, insert pseudo-articles when decoding articles."
716 :group 'gnus-extract-view
719 (defcustom gnus-summary-dummy-line-format
721 "*The format specification for the dummy roots in the summary buffer.
722 It works along the same lines as a normal formatting string,
723 with some simple extensions.
727 General format specifiers can also be used.
728 See `(gnus)Formatting Variables'."
729 :link '(custom-manual "(gnus)Formatting Variables")
730 :group 'gnus-threading
733 (defcustom gnus-summary-mode-line-format "Gnus: %g [%A] %Z"
734 "*The format specification for the summary mode line.
735 It works along the same lines as a normal formatting string,
736 with some simple extensions:
739 %p Unprefixed group name
740 %A Current article number
741 %z Current article score
743 %U Number of unread articles in the group
744 %e Number of unselected articles in the group
745 %Z A string with unread/unselected article counts
746 %g Shortish group name
747 %S Subject of the current article
749 %s Current score file name
750 %d Number of dormant articles
751 %r Number of articles that have been marked as read in this session
752 %E Number of articles expunged by the score files"
753 :group 'gnus-summary-format
756 (defcustom gnus-list-identifiers nil
757 "Regexp that matches list identifiers to be removed from subject.
758 This can also be a list of regexps."
760 :group 'gnus-summary-format
761 :group 'gnus-article-hiding
762 :type '(choice (const :tag "none" nil)
764 (repeat :value (".*") regexp)))
766 (defcustom gnus-summary-mark-below 0
767 "*Mark all articles with a score below this variable as read.
768 This variable is local to each summary buffer and usually set by the
770 :group 'gnus-score-default
773 (defun gnus-widget-reversible-match (widget value)
774 "Ignoring WIDGET, convert VALUE to internal form.
775 VALUE should have the form `FOO' or `(not FOO)', where FOO is an symbol."
779 (eq (length value) 2)
780 (eq (nth 0 value) 'not)
781 (symbolp (nth 1 value)))))
783 (defun gnus-widget-reversible-to-internal (widget value)
784 "Ignoring WIDGET, convert VALUE to internal form.
785 VALUE should have the form `FOO' or `(not FOO)', where FOO is an atom.
786 FOO is converted to (FOO nil) and (not FOO) is converted to (FOO t)."
790 (list (nth 1 value) t)))
792 (defun gnus-widget-reversible-to-external (widget value)
793 "Ignoring WIDGET, convert VALUE to external form.
794 VALUE should have the form `(FOO nil)' or `(FOO t)', where FOO is an atom.
795 \(FOO nil) is converted to FOO and (FOO t) is converted to (not FOO)."
798 (list 'not (nth 0 value))
801 (define-widget 'gnus-widget-reversible 'group
802 "A `group' that convert values."
803 :match 'gnus-widget-reversible-match
804 :value-to-internal 'gnus-widget-reversible-to-internal
805 :value-to-external 'gnus-widget-reversible-to-external)
807 (defcustom gnus-article-sort-functions '(gnus-article-sort-by-number)
808 "*List of functions used for sorting articles in the summary buffer.
810 Each function takes two articles and returns non-nil if the first
811 article should be sorted before the other. If you use more than one
812 function, the primary sort function should be the last. You should
813 probably always include `gnus-article-sort-by-number' in the list of
814 sorting functions -- preferably first. Also note that sorting by date
815 is often much slower than sorting by number, and the sorting order is
816 very similar. (Sorting by date means sorting by the time the message
817 was sent, sorting by number means sorting by arrival time.)
819 Each item can also be a list `(not F)' where F is a function;
820 this reverses the sort order.
822 Ready-made functions include `gnus-article-sort-by-number',
823 `gnus-article-sort-by-author', `gnus-article-sort-by-subject',
824 `gnus-article-sort-by-date', `gnus-article-sort-by-random'
825 and `gnus-article-sort-by-score'.
827 When threading is turned on, the variable `gnus-thread-sort-functions'
828 controls how articles are sorted."
829 :group 'gnus-summary-sort
830 :type '(repeat (gnus-widget-reversible
831 (choice (function-item gnus-article-sort-by-number)
832 (function-item gnus-article-sort-by-author)
833 (function-item gnus-article-sort-by-subject)
834 (function-item gnus-article-sort-by-date)
835 (function-item gnus-article-sort-by-score)
836 (function-item gnus-article-sort-by-random)
837 (function :tag "other"))
838 (boolean :tag "Reverse order"))))
841 (defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number)
842 "*List of functions used for sorting threads in the summary buffer.
843 By default, threads are sorted by article number.
845 Each function takes two threads and returns non-nil if the first
846 thread should be sorted before the other. If you use more than one
847 function, the primary sort function should be the last. You should
848 probably always include `gnus-thread-sort-by-number' in the list of
849 sorting functions -- preferably first. Also note that sorting by date
850 is often much slower than sorting by number, and the sorting order is
851 very similar. (Sorting by date means sorting by the time the message
852 was sent, sorting by number means sorting by arrival time.)
854 Each list item can also be a list `(not F)' where F is a
855 function; this specifies reversed sort order.
857 Ready-made functions include `gnus-thread-sort-by-number',
858 `gnus-thread-sort-by-author', `gnus-thread-sort-by-recipient'
859 `gnus-thread-sort-by-subject', `gnus-thread-sort-by-date',
860 `gnus-thread-sort-by-score', `gnus-thread-sort-by-most-recent-number',
861 `gnus-thread-sort-by-most-recent-date', `gnus-thread-sort-by-random',
862 and `gnus-thread-sort-by-total-score' (see
863 `gnus-thread-score-function').
865 When threading is turned off, the variable
866 `gnus-article-sort-functions' controls how articles are sorted."
867 :group 'gnus-summary-sort
869 (gnus-widget-reversible
870 (choice (function-item gnus-thread-sort-by-number)
871 (function-item gnus-thread-sort-by-author)
872 (function-item gnus-thread-sort-by-recipient)
873 (function-item gnus-thread-sort-by-subject)
874 (function-item gnus-thread-sort-by-date)
875 (function-item gnus-thread-sort-by-score)
876 (function-item gnus-thread-sort-by-most-recent-number)
877 (function-item gnus-thread-sort-by-most-recent-date)
878 (function-item gnus-thread-sort-by-random)
879 (function-item gnus-thread-sort-by-total-score)
880 (function :tag "other"))
881 (boolean :tag "Reverse order"))))
883 (defcustom gnus-thread-score-function '+
884 "*Function used for calculating the total score of a thread.
886 The function is called with the scores of the article and each
887 subthread and should then return the score of the thread.
889 Some functions you can use are `+', `max', or `min'."
890 :group 'gnus-summary-sort
893 (defcustom gnus-summary-expunge-below nil
894 "All articles that have a score less than this variable will be expunged.
895 This variable is local to the summary buffers."
896 :group 'gnus-score-default
897 :type '(choice (const :tag "off" nil)
900 (defcustom gnus-thread-expunge-below nil
901 "All threads that have a total score less than this variable will be expunged.
902 See `gnus-thread-score-function' for en explanation of what a
905 This variable is local to the summary buffers."
906 :group 'gnus-threading
907 :group 'gnus-score-default
908 :type '(choice (const :tag "off" nil)
911 (defcustom gnus-summary-mode-hook nil
912 "*A hook for Gnus summary mode.
913 This hook is run before any variables are set in the summary buffer."
914 :options '(turn-on-gnus-mailing-list-mode gnus-pick-mode)
915 :group 'gnus-summary-various
918 ;; Extracted from gnus-xmas-redefine in order to preserve user settings
919 (when (featurep 'xemacs)
920 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
921 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
922 (add-hook 'gnus-summary-mode-hook
923 'gnus-xmas-switch-horizontal-scrollbar-off))
925 (defcustom gnus-summary-menu-hook nil
926 "*Hook run after the creation of the summary mode menu."
927 :group 'gnus-summary-visual
930 (defcustom gnus-summary-exit-hook nil
931 "*A hook called on exit from the summary buffer.
932 It will be called with point in the group buffer."
933 :group 'gnus-summary-exit
936 (defcustom gnus-summary-prepare-hook nil
937 "*A hook called after the summary buffer has been generated.
938 If you want to modify the summary buffer, you can use this hook."
939 :group 'gnus-summary-various
942 (defcustom gnus-summary-prepared-hook nil
943 "*A hook called as the last thing after the summary buffer has been generated."
944 :group 'gnus-summary-various
947 (defcustom gnus-summary-generate-hook nil
948 "*A hook run just before generating the summary buffer.
949 This hook is commonly used to customize threading variables and the
951 :group 'gnus-summary-various
954 (defcustom gnus-select-group-hook nil
955 "*A hook called when a newsgroup is selected.
957 If you'd like to simplify subjects like the
958 `gnus-summary-next-same-subject' command does, you can use the
961 (add-hook gnus-select-group-hook
963 (mapcar (lambda (header)
964 (mail-header-set-subject
966 (gnus-simplify-subject
967 (mail-header-subject header) 're-only)))
968 gnus-newsgroup-headers)))"
969 :group 'gnus-group-select
972 (defcustom gnus-select-article-hook nil
973 "*A hook called when an article is selected."
974 :group 'gnus-summary-choose
975 :options '(gnus-agent-fetch-selected-article)
978 (defcustom gnus-visual-mark-article-hook
979 (list 'gnus-highlight-selected-summary)
980 "*Hook run after selecting an article in the summary buffer.
981 It is meant to be used for highlighting the article in some way. It
982 is not run if `gnus-visual' is nil."
983 :group 'gnus-summary-visual
986 (defcustom gnus-parse-headers-hook nil
987 "*A hook called before parsing the headers."
991 (defcustom gnus-exit-group-hook nil
992 "*A hook called when exiting summary mode.
993 This hook is not called from the non-updating exit commands like `Q'."
997 (defcustom gnus-summary-update-hook nil
998 "*A hook called when a summary line is changed.
999 The hook will not be called if `gnus-visual' is nil.
1001 The default function `gnus-summary-highlight-line' will
1002 highlight the line according to the `gnus-summary-highlight'
1004 :group 'gnus-summary-visual
1007 (defcustom gnus-mark-article-hook '(gnus-summary-mark-read-and-unread-as-read)
1008 "*A hook called when an article is selected for the first time.
1009 The hook is intended to mark an article as read (or unread)
1010 automatically when it is selected."
1011 :group 'gnus-summary-choose
1014 (defcustom gnus-group-no-more-groups-hook nil
1015 "*A hook run when returning to group mode having no more (unread) groups."
1016 :group 'gnus-group-select
1019 (defcustom gnus-ps-print-hook nil
1020 "*A hook run before ps-printing something from Gnus."
1021 :group 'gnus-summary
1024 (defcustom gnus-summary-article-move-hook nil
1025 "*A hook called after an article is moved, copied, respooled, or crossposted."
1027 :group 'gnus-summary
1030 (defcustom gnus-summary-article-delete-hook nil
1031 "*A hook called after an article is deleted."
1033 :group 'gnus-summary
1036 (defcustom gnus-summary-article-expire-hook nil
1037 "*A hook called after an article is expired."
1039 :group 'gnus-summary
1042 (defcustom gnus-summary-display-arrow
1043 (and (fboundp 'display-graphic-p)
1044 (display-graphic-p))
1045 "*If non-nil, display an arrow highlighting the current article."
1047 :group 'gnus-summary
1050 (defcustom gnus-summary-selected-face 'gnus-summary-selected
1051 "Face used for highlighting the current article in the summary buffer."
1052 :group 'gnus-summary-visual
1055 (defvar gnus-tmp-downloaded nil)
1057 (defcustom gnus-summary-highlight
1058 '(((eq mark gnus-canceled-mark)
1059 . gnus-summary-cancelled)
1060 ((and uncached (> score default-high))
1061 . gnus-summary-high-undownloaded)
1062 ((and uncached (< score default-low))
1063 . gnus-summary-low-undownloaded)
1065 . gnus-summary-normal-undownloaded)
1066 ((and (> score default-high)
1067 (or (eq mark gnus-dormant-mark)
1068 (eq mark gnus-ticked-mark)))
1069 . gnus-summary-high-ticked)
1070 ((and (< score default-low)
1071 (or (eq mark gnus-dormant-mark)
1072 (eq mark gnus-ticked-mark)))
1073 . gnus-summary-low-ticked)
1074 ((or (eq mark gnus-dormant-mark)
1075 (eq mark gnus-ticked-mark))
1076 . gnus-summary-normal-ticked)
1077 ((and (> score default-high) (eq mark gnus-ancient-mark))
1078 . gnus-summary-high-ancient)
1079 ((and (< score default-low) (eq mark gnus-ancient-mark))
1080 . gnus-summary-low-ancient)
1081 ((eq mark gnus-ancient-mark)
1082 . gnus-summary-normal-ancient)
1083 ((and (> score default-high) (eq mark gnus-unread-mark))
1084 . gnus-summary-high-unread)
1085 ((and (< score default-low) (eq mark gnus-unread-mark))
1086 . gnus-summary-low-unread)
1087 ((eq mark gnus-unread-mark)
1088 . gnus-summary-normal-unread)
1089 ((> score default-high)
1090 . gnus-summary-high-read)
1091 ((< score default-low)
1092 . gnus-summary-low-read)
1094 . gnus-summary-normal-read))
1095 "*Controls the highlighting of summary buffer lines.
1097 A list of (FORM . FACE) pairs. When deciding how a particular
1098 summary line should be displayed, each form is evaluated. The content
1099 of the face field after the first true form is used. You can change
1100 how those summary lines are displayed, by editing the face field.
1102 You can use the following variables in the FORM field.
1104 score: The article's score.
1105 default: The default article score.
1106 default-high: The default score for high scored articles.
1107 default-low: The default score for low scored articles.
1108 below: The score below which articles are automatically marked as read.
1109 mark: The article's mark.
1110 uncached: Non-nil if the article is uncached."
1111 :group 'gnus-summary-visual
1112 :type '(repeat (cons (sexp :tag "Form" nil)
1114 (put 'gnus-summary-highlight 'risky-local-variable t)
1116 (defcustom gnus-alter-header-function nil
1117 "Function called to allow alteration of article header structures.
1118 The function is called with one parameter, the article header vector,
1119 which it may alter in any way."
1120 :type '(choice (const :tag "None" nil)
1122 :group 'gnus-summary)
1124 (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
1125 "Function used to decode a string with encoded words.")
1127 (defvar gnus-decode-encoded-address-function
1128 'mail-decode-encoded-address-string
1129 "Function used to decode addresses with encoded words.")
1131 (defcustom gnus-extra-headers '(To Newsgroups)
1132 "*Extra headers to parse."
1134 :group 'gnus-summary
1135 :type '(repeat symbol))
1137 (defcustom gnus-ignored-from-addresses
1138 (and user-mail-address
1139 (not (string= user-mail-address ""))
1140 (regexp-quote user-mail-address))
1141 "*From headers that may be suppressed in favor of To headers.
1142 This can be a regexp or a list of regexps."
1144 :group 'gnus-summary
1145 :type '(choice regexp
1146 (repeat :tag "Regexp List" regexp)))
1148 (defsubst gnus-ignored-from-addresses ()
1149 (gmm-regexp-concat gnus-ignored-from-addresses))
1151 (defcustom gnus-summary-to-prefix "-> "
1152 "*String prefixed to the To field in the summary line when
1153 using `gnus-ignored-from-addresses'."
1155 :group 'gnus-summary
1158 (defcustom gnus-summary-newsgroup-prefix "=> "
1159 "*String prefixed to the Newsgroup field in the summary
1160 line when using `gnus-ignored-from-addresses'."
1162 :group 'gnus-summary
1165 (defcustom gnus-newsgroup-ignored-charsets '(unknown-8bit x-unknown)
1166 "List of charsets that should be ignored.
1167 When these charsets are used in the \"charset\" parameter, the
1168 default charset will be used instead."
1170 :type '(repeat symbol)
1171 :group 'gnus-charset)
1173 (defcustom gnus-newsgroup-maximum-articles nil
1174 "The maximum number of articles a newsgroup.
1175 If this is a number, old articles in a newsgroup exceeding this number
1176 are silently ignored. If it is nil, no article is ignored. Note that
1177 setting this variable to a number might prevent you from reading very
1179 :group 'gnus-group-select
1181 :type '(choice (const :tag "No limit" nil)
1184 (gnus-define-group-parameter
1188 "Return the ignored charsets of GROUP."
1189 :variable gnus-group-ignored-charsets-alist
1191 '(("alt\\.chinese\\.text" iso-8859-1))
1193 "Alist of regexps (to match group names) and charsets that should be ignored.
1194 When these charsets are used in the \"charset\" parameter, the
1195 default charset will be used instead."
1196 :variable-group gnus-charset
1197 :variable-type '(repeat (cons (regexp :tag "Group")
1199 :parameter-type '(choice :tag "Ignored charsets"
1202 :parameter-document "\
1203 List of charsets that should be ignored.
1205 When these charsets are used in the \"charset\" parameter, the
1206 default charset will be used instead.")
1208 (defcustom gnus-group-highlight-words-alist nil
1209 "Alist of group regexps and highlight regexps.
1210 This variable uses the same syntax as `gnus-emphasis-alist'."
1212 :type '(repeat (cons (regexp :tag "Group")
1213 (repeat (list (regexp :tag "Highlight regexp")
1214 (number :tag "Group for entire word" 0)
1215 (number :tag "Group for displayed part" 0)
1217 gnus-emphasis-highlight-words)))))
1218 :group 'gnus-summary-visual)
1220 (defcustom gnus-summary-show-article-charset-alist
1222 "Alist of number and charset.
1223 The article will be shown with the charset corresponding to the
1225 For example: ((1 . cn-gb-2312) (2 . big5))."
1227 :type '(repeat (cons (number :tag "Argument" 1)
1228 (symbol :tag "Charset")))
1229 :group 'gnus-charset)
1231 (defcustom gnus-preserve-marks t
1232 "Whether marks are preserved when moving, copying and respooling messages."
1235 :group 'gnus-summary-marks)
1237 (defcustom gnus-propagate-marks t
1238 "If non-nil, do not propagate marks to the backends."
1239 :version "23.1" ;; No Gnus
1241 :group 'gnus-summary-marks)
1243 (defcustom gnus-alter-articles-to-read-function nil
1244 "Function to be called to alter the list of articles to be selected."
1245 :type '(choice (const nil) function)
1246 :group 'gnus-summary)
1248 (defcustom gnus-orphan-score nil
1249 "*All orphans get this score added. Set in the score file."
1250 :group 'gnus-score-default
1251 :type '(choice (const nil)
1254 (defcustom gnus-summary-save-parts-default-mime "image/.*"
1255 "*A regexp to match MIME parts when saving multiple parts of a
1256 message with `gnus-summary-save-parts' (\\<gnus-summary-mode-map>\\[gnus-summary-save-parts]).
1257 This regexp will be used by default when prompting the user for which
1258 type of files to save."
1259 :group 'gnus-summary
1262 (defcustom gnus-read-all-available-headers nil
1263 "Whether Gnus should parse all headers made available to it.
1264 This is mostly relevant for slow back ends where the user may
1265 wish to widen the summary buffer to include all headers
1268 :group 'gnus-summary
1269 :type '(choice boolean regexp))
1271 (defcustom gnus-summary-pipe-output-default-command nil
1272 "Command (and optional arguments) used to pipe article to subprocess.
1273 This will be used as the default command if it is non-nil. The value
1274 will be updated if you modify it when executing the command
1275 `gnus-summary-pipe-output' or the function `gnus-summary-save-in-pipe'."
1276 :version "23.1" ;; No Gnus
1277 :group 'gnus-summary
1278 :type '(radio (const :tag "None" nil) (string :tag "Command")))
1280 (defcustom gnus-summary-muttprint-program "muttprint"
1281 "Command (and optional arguments) used to run Muttprint.
1282 The value will be updated if you modify it when executing the command
1283 `gnus-summary-muttprint'."
1285 :group 'gnus-summary
1288 (defcustom gnus-article-loose-mime t
1289 "If non-nil, don't require MIME-Version header.
1290 Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not
1291 supply the MIME-Version header or deliberately strip it from the mail.
1292 If non-nil (the default), Gnus will treat some articles as MIME
1293 even if the MIME-Version header is missing."
1296 :group 'gnus-article-mime)
1298 (defcustom gnus-article-emulate-mime t
1299 "If non-nil, use MIME emulation for uuencode and the like.
1300 This means that Gnus will search message bodies for text that look
1301 like uuencoded bits, yEncoded bits, and so on, and present that using
1302 the normal Gnus MIME machinery."
1305 :group 'gnus-article-mime)
1307 ;;; Internal variables
1309 (defvar gnus-summary-display-cache nil)
1310 (defvar gnus-article-mime-handles nil)
1311 (defvar gnus-article-decoded-p nil)
1312 (defvar gnus-article-charset nil)
1313 (defvar gnus-article-ignored-charsets nil)
1314 (defvar gnus-scores-exclude-files nil)
1315 (defvar gnus-page-broken nil)
1317 (defvar gnus-original-article nil)
1318 (defvar gnus-article-internal-prepare-hook nil)
1319 (defvar gnus-newsgroup-process-stack nil)
1321 (defvar gnus-thread-indent-array nil)
1322 (defvar gnus-thread-indent-array-level gnus-thread-indent-level)
1323 (defvar gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number
1324 "Function called to sort the articles within a thread after it has been gathered together.")
1326 (defvar gnus-summary-save-parts-type-history nil)
1327 (defvar gnus-summary-save-parts-last-directory mm-default-directory)
1329 ;; Avoid highlighting in kill files.
1330 (defvar gnus-summary-inhibit-highlight nil)
1331 (defvar gnus-newsgroup-selected-overlay nil)
1332 (defvar gnus-inhibit-limiting nil)
1333 (defvar gnus-newsgroup-adaptive-score-file nil)
1334 (defvar gnus-current-score-file nil)
1335 (defvar gnus-current-move-group nil)
1336 (defvar gnus-current-copy-group nil)
1337 (defvar gnus-current-crosspost-group nil)
1338 (defvar gnus-newsgroup-display nil)
1340 (defvar gnus-newsgroup-dependencies nil)
1341 (defvar gnus-newsgroup-adaptive nil)
1342 (defvar gnus-summary-display-article-function nil)
1343 (defvar gnus-summary-highlight-line-function nil
1344 "Function called after highlighting a summary line.")
1346 (defvar gnus-summary-line-format-alist
1347 `((?N ,(macroexpand '(mail-header-number gnus-tmp-header)) ?d)
1348 (?S ,(macroexpand '(mail-header-subject gnus-tmp-header)) ?s)
1349 (?s gnus-tmp-subject-or-nil ?s)
1350 (?n gnus-tmp-name ?s)
1351 (?A (car (cdr (funcall gnus-extract-address-components gnus-tmp-from)))
1353 (?a (or (car (funcall gnus-extract-address-components gnus-tmp-from))
1355 (?F gnus-tmp-from ?s)
1356 (?x ,(macroexpand '(mail-header-xref gnus-tmp-header)) ?s)
1357 (?D ,(macroexpand '(mail-header-date gnus-tmp-header)) ?s)
1358 (?d (gnus-dd-mmm (mail-header-date gnus-tmp-header)) ?s)
1359 (?o (gnus-date-iso8601 (mail-header-date gnus-tmp-header)) ?s)
1360 (?M ,(macroexpand '(mail-header-id gnus-tmp-header)) ?s)
1361 (?r ,(macroexpand '(mail-header-references gnus-tmp-header)) ?s)
1362 (?c (or (mail-header-chars gnus-tmp-header) 0) ?d)
1363 (?k (gnus-summary-line-message-size gnus-tmp-header) ?s)
1364 (?L gnus-tmp-lines ?s)
1365 (?Z (or ,(gnus-macroexpand-all
1366 '(nnir-article-rsv (mail-header-number gnus-tmp-header)))
1368 (?G (or ,(gnus-macroexpand-all
1369 '(nnir-article-group (mail-header-number gnus-tmp-header)))
1371 (?g (or ,(gnus-macroexpand-all
1372 '(gnus-group-short-name
1373 (nnir-article-group (mail-header-number gnus-tmp-header))))
1375 (?O gnus-tmp-downloaded ?c)
1376 (?I gnus-tmp-indentation ?s)
1377 (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s)
1378 (?R gnus-tmp-replied ?c)
1379 (?\[ gnus-tmp-opening-bracket ?c)
1380 (?\] gnus-tmp-closing-bracket ?c)
1381 (?\> (make-string gnus-tmp-level ? ) ?s)
1382 (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
1383 (?i gnus-tmp-score ?d)
1384 (?z gnus-tmp-score-char ?c)
1385 (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d)
1386 (?U gnus-tmp-unread ?c)
1387 (?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)
1389 (?t (gnus-summary-number-of-articles-in-thread
1390 (and (boundp 'thread) (car thread)) gnus-tmp-level)
1392 (?e (gnus-summary-number-of-articles-in-thread
1393 (and (boundp 'thread) (car thread)) gnus-tmp-level t)
1395 (?u gnus-tmp-user-defined ?s)
1396 (?P (gnus-pick-line-number) ?d)
1397 (?B gnus-tmp-thread-tree-header-string ?s)
1398 (user-date (gnus-user-date
1399 ,(macroexpand '(mail-header-date gnus-tmp-header))) ?s))
1400 "An alist of format specifications that can appear in summary lines.
1401 These are paired with what variables they correspond with, along with
1402 the type of the variable (string, integer, character, etc).")
1404 (defvar gnus-summary-dummy-line-format-alist
1405 `((?S gnus-tmp-subject ?s)
1406 (?N gnus-tmp-number ?d)
1407 (?u gnus-tmp-user-defined ?s)))
1409 (defvar gnus-summary-mode-line-format-alist
1410 `((?G gnus-tmp-group-name ?s)
1411 (?g (gnus-short-group-name gnus-tmp-group-name) ?s)
1412 (?p (gnus-group-real-name gnus-tmp-group-name) ?s)
1413 (?A gnus-tmp-article-number ?d)
1414 (?Z gnus-tmp-unread-and-unselected ?s)
1415 (?V gnus-version ?s)
1416 (?U gnus-tmp-unread-and-unticked ?d)
1417 (?S gnus-tmp-subject ?s)
1418 (?e gnus-tmp-unselected ?d)
1419 (?u gnus-tmp-user-defined ?s)
1420 (?d (length gnus-newsgroup-dormant) ?d)
1421 (?t (length gnus-newsgroup-marked) ?d)
1422 (?h (length gnus-newsgroup-spam-marked) ?d)
1423 (?r (length gnus-newsgroup-reads) ?d)
1424 (?z (gnus-summary-article-score gnus-tmp-article-number) ?d)
1425 (?E gnus-newsgroup-expunged-tally ?d)
1426 (?s (gnus-current-score-file-nondirectory) ?s)))
1428 ;; This is here rather than in gnus-art for compilation reasons.
1429 (defvar gnus-article-mode-line-format-alist
1430 (nconc '((?w (gnus-article-wash-status) ?s)
1431 (?m (gnus-article-mime-part-status) ?s))
1432 gnus-summary-mode-line-format-alist))
1434 (defvar gnus-last-search-regexp nil
1435 "Default regexp for article search command.")
1437 (defvar gnus-last-shell-command nil
1438 "Default shell command on article.")
1440 (defvar gnus-newsgroup-agentized nil
1441 "Locally bound in each summary buffer to indicate whether the server has been agentized.")
1442 (defvar gnus-newsgroup-begin nil)
1443 (defvar gnus-newsgroup-end nil)
1444 (defvar gnus-newsgroup-last-rmail nil)
1445 (defvar gnus-newsgroup-last-mail nil)
1446 (defvar gnus-newsgroup-last-folder nil)
1447 (defvar gnus-newsgroup-last-file nil)
1448 (defvar gnus-newsgroup-last-directory nil)
1449 (defvar gnus-newsgroup-auto-expire nil)
1450 (defvar gnus-newsgroup-active nil)
1451 (defvar gnus-newsgroup-highest nil)
1453 (defvar gnus-newsgroup-data nil)
1454 (defvar gnus-newsgroup-data-reverse nil)
1455 (defvar gnus-newsgroup-limit nil)
1456 (defvar gnus-newsgroup-limits nil)
1457 (defvar gnus-summary-use-undownloaded-faces nil)
1459 (defvar gnus-newsgroup-unreads nil
1460 "Sorted list of unread articles in the current newsgroup.")
1462 (defvar gnus-newsgroup-unselected nil
1463 "Sorted list of unselected unread articles in the current newsgroup.")
1465 (defvar gnus-newsgroup-reads nil
1466 "Alist of read articles and article marks in the current newsgroup.")
1468 (defvar gnus-newsgroup-expunged-tally nil)
1470 (defvar gnus-newsgroup-marked nil
1471 "Sorted list of ticked articles in the current newsgroup (a subset of unread art).")
1473 (defvar gnus-newsgroup-spam-marked nil
1474 "List of ranges of articles that have been marked as spam.")
1476 (defvar gnus-newsgroup-killed nil
1477 "List of ranges of articles that have been through the scoring process.")
1479 (defvar gnus-newsgroup-cached nil
1480 "Sorted list of articles that come from the article cache.")
1482 (defvar gnus-newsgroup-saved nil
1483 "List of articles that have been saved.")
1485 (defvar gnus-newsgroup-kill-headers nil)
1487 (defvar gnus-newsgroup-replied nil
1488 "List of articles that have been replied to in the current newsgroup.")
1490 (defvar gnus-newsgroup-forwarded nil
1491 "List of articles that have been forwarded in the current newsgroup.")
1493 (defvar gnus-newsgroup-recent nil
1494 "List of articles that have are recent in the current newsgroup.")
1496 (defvar gnus-newsgroup-expirable nil
1497 "Sorted list of articles in the current newsgroup that can be expired.")
1499 (defvar gnus-newsgroup-processable nil
1500 "List of articles in the current newsgroup that can be processed.")
1502 (defvar gnus-newsgroup-downloadable nil
1503 "Sorted list of articles in the current newsgroup that can be processed.")
1505 (defvar gnus-newsgroup-unfetched nil
1506 "Sorted list of articles in the current newsgroup whose headers have
1507 not been fetched into the agent.
1509 This list will always be a subset of gnus-newsgroup-undownloaded.")
1511 (defvar gnus-newsgroup-undownloaded nil
1512 "List of articles in the current newsgroup that haven't been downloaded.")
1514 (defvar gnus-newsgroup-unsendable nil
1515 "List of articles in the current newsgroup that won't be sent.")
1517 (defvar gnus-newsgroup-bookmarks nil
1518 "List of articles in the current newsgroup that have bookmarks.")
1520 (defvar gnus-newsgroup-dormant nil
1521 "Sorted list of dormant articles in the current newsgroup.")
1523 (defvar gnus-newsgroup-unseen nil
1524 "List of unseen articles in the current newsgroup.")
1526 (defvar gnus-newsgroup-seen nil
1527 "Range of seen articles in the current newsgroup.")
1529 (defvar gnus-newsgroup-articles nil
1530 "List of articles in the current newsgroup.")
1532 (defvar gnus-newsgroup-scored nil
1533 "List of scored articles in the current newsgroup.")
1535 (defvar gnus-newsgroup-headers nil
1536 "List of article headers in the current newsgroup.")
1538 (defvar gnus-newsgroup-threads nil)
1540 (defvar gnus-newsgroup-prepared nil
1541 "Whether the current group has been prepared properly.")
1543 (defvar gnus-newsgroup-ancient nil
1544 "List of `gnus-fetch-old-headers' articles in the current newsgroup.")
1546 (defvar gnus-newsgroup-sparse nil)
1548 (defvar gnus-current-article nil)
1549 (defvar gnus-article-current nil)
1550 (defvar gnus-current-headers nil)
1551 (defvar gnus-have-all-headers nil)
1552 (defvar gnus-last-article nil)
1553 (defvar gnus-newsgroup-history nil)
1554 (defvar gnus-newsgroup-charset nil)
1555 (defvar gnus-newsgroup-ephemeral-charset nil)
1556 (defvar gnus-newsgroup-ephemeral-ignored-charsets nil)
1558 (defvar gnus-article-before-search nil)
1560 (defvar gnus-summary-local-variables
1561 '(gnus-newsgroup-name
1564 gnus-newsgroup-unreads
1565 gnus-newsgroup-unselected
1566 gnus-newsgroup-marked
1567 gnus-newsgroup-spam-marked
1568 gnus-newsgroup-reads
1569 gnus-newsgroup-saved
1570 gnus-newsgroup-replied
1571 gnus-newsgroup-forwarded
1572 gnus-newsgroup-recent
1573 gnus-newsgroup-expirable
1574 gnus-newsgroup-killed
1575 gnus-newsgroup-unseen
1577 gnus-newsgroup-cached
1578 gnus-newsgroup-downloadable
1579 gnus-newsgroup-undownloaded
1580 gnus-newsgroup-unsendable
1582 gnus-newsgroup-begin gnus-newsgroup-end
1583 gnus-newsgroup-last-rmail gnus-newsgroup-last-mail
1584 gnus-newsgroup-last-folder gnus-newsgroup-last-file
1585 gnus-newsgroup-last-directory
1586 gnus-newsgroup-auto-expire
1587 gnus-newsgroup-processable
1588 gnus-newsgroup-unfetched
1589 gnus-newsgroup-articles
1590 gnus-newsgroup-bookmarks gnus-newsgroup-dormant
1591 gnus-newsgroup-headers gnus-newsgroup-threads
1592 gnus-newsgroup-prepared gnus-summary-highlight-line-function
1593 gnus-current-article gnus-current-headers gnus-have-all-headers
1594 gnus-last-article gnus-article-internal-prepare-hook
1595 (gnus-summary-article-delete-hook . global)
1596 (gnus-summary-article-move-hook . global)
1597 gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay
1598 gnus-newsgroup-scored gnus-newsgroup-kill-headers
1599 gnus-thread-expunge-below
1600 gnus-score-alist gnus-current-score-file
1601 (gnus-summary-expunge-below . global)
1602 (gnus-summary-mark-below . global)
1603 (gnus-orphan-score . global)
1604 gnus-newsgroup-active gnus-scores-exclude-files
1605 gnus-newsgroup-highest
1606 gnus-newsgroup-history gnus-newsgroup-ancient
1607 gnus-newsgroup-sparse gnus-newsgroup-process-stack
1608 (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring)
1609 gnus-newsgroup-adaptive-score-file (gnus-reffed-article-number . -1)
1610 (gnus-newsgroup-expunged-tally . 0)
1611 gnus-cache-removable-articles
1612 gnus-newsgroup-data gnus-newsgroup-data-reverse
1613 gnus-newsgroup-limit gnus-newsgroup-limits
1614 gnus-newsgroup-charset gnus-newsgroup-display
1615 gnus-summary-use-undownloaded-faces)
1616 "Variables that are buffer-local to the summary buffers.")
1618 (defvar gnus-newsgroup-variables nil
1619 "A list of variables that have separate values in different newsgroups.
1620 A list of newsgroup (summary buffer) local variables, or cons of
1621 variables and their default expressions to be evalled (when the default
1622 values are not nil), that should be made global while the summary buffer
1625 Note: The default expressions will be evaluated (using function `eval')
1626 before assignment to the local variable rather than just assigned to it.
1627 If the default expression is the symbol `global', that symbol will not
1628 be evaluated but the global value of the local variable will be used
1631 These variables can be used to set variables in the group parameters
1632 while still allowing them to affect operations done in other buffers.
1635 \(setq gnus-newsgroup-variables
1636 '(message-use-followup-to
1637 (gnus-visible-headers .
1638 \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))
1642 ;; Bind features so that require will believe that gnus-sum has
1643 ;; already been loaded (avoids infinite recursion)
1644 (let ((features (cons 'gnus-sum features)))
1645 (require 'gnus-art)))
1649 (defvar gnus-decode-encoded-word-methods
1650 '(mail-decode-encoded-word-string)
1651 "List of methods used to decode encoded words.
1653 This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item
1654 is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a
1655 \(REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups
1656 whose names match REGEXP.
1659 \((\"chinese\" . gnus-decode-encoded-word-string-by-guess)
1660 mail-decode-encoded-word-string
1661 (\"chinese\" . rfc1843-decode-string))")
1663 (defvar gnus-decode-encoded-word-methods-cache nil)
1665 (defun gnus-multi-decode-encoded-word-string (string)
1666 "Apply the functions from `gnus-encoded-word-methods' that match."
1667 (unless (and gnus-decode-encoded-word-methods-cache
1668 (eq gnus-newsgroup-name
1669 (car gnus-decode-encoded-word-methods-cache)))
1670 (setq gnus-decode-encoded-word-methods-cache (list gnus-newsgroup-name))
1671 (dolist (method gnus-decode-encoded-word-methods)
1672 (if (symbolp method)
1673 (nconc gnus-decode-encoded-word-methods-cache (list method))
1674 (if (and gnus-newsgroup-name
1675 (string-match (car method) gnus-newsgroup-name))
1676 (nconc gnus-decode-encoded-word-methods-cache
1677 (list (cdr method)))))))
1678 (dolist (method (cdr gnus-decode-encoded-word-methods-cache) string)
1679 (setq string (funcall method string))))
1681 ;; Subject simplification.
1683 (defun gnus-simplify-whitespace (str)
1684 "Remove excessive whitespace from STR."
1686 (while (string-match "[ \t][ \t]+" str)
1687 (setq str (concat (substring str 0 (match-beginning 0))
1689 (substring str (match-end 0)))))
1691 (when (string-match "^[ \t]+" str)
1692 (setq str (substring str (match-end 0))))
1694 (when (string-match "[ \t]+$" str)
1695 (setq str (substring str 0 (match-beginning 0))))
1698 (defun gnus-simplify-all-whitespace (str)
1699 "Remove all whitespace from STR."
1700 (while (string-match "[ \t\n]+" str)
1701 (setq str (replace-match "" nil nil str)))
1704 (defsubst gnus-simplify-subject-re (subject)
1705 "Remove \"Re:\" from subject lines."
1706 (if (string-match message-subject-re-regexp subject)
1707 (substring subject (match-end 0))
1710 (defun gnus-simplify-subject (subject &optional re-only)
1711 "Remove `Re:' and words in parentheses.
1712 If RE-ONLY is non-nil, strip leading `Re:'s only."
1713 (let ((case-fold-search t)) ;Ignore case.
1714 ;; Remove `Re:', `Re^N:', `Re(n)', and `Re[n]:'.
1715 (when (string-match "\\`\\(re\\([[(^][0-9]+[])]?\\)?:[ \t]*\\)+" subject)
1716 (setq subject (substring subject (match-end 0))))
1717 ;; Remove uninteresting prefixes.
1718 (when (and (not re-only)
1719 gnus-simplify-ignored-prefixes
1720 (string-match gnus-simplify-ignored-prefixes subject))
1721 (setq subject (substring subject (match-end 0))))
1722 ;; Remove words in parentheses from end.
1724 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject)
1725 (setq subject (substring subject 0 (match-beginning 0)))))
1726 ;; Return subject string.
1729 ;; Remove any leading "re:"s, any trailing paren phrases, and simplify
1731 (defsubst gnus-simplify-buffer-fuzzy-step (regexp &optional newtext)
1732 (goto-char (point-min))
1733 (while (re-search-forward regexp nil t)
1734 (replace-match (or newtext ""))))
1736 (defun gnus-simplify-buffer-fuzzy ()
1737 "Simplify string in the buffer fuzzily.
1738 The string in the accessible portion of the current buffer is simplified.
1739 It is assumed to be a single-line subject.
1740 Whitespace is generally cleaned up, and miscellaneous leading/trailing
1741 matter is removed. Additional things can be deleted by setting
1742 `gnus-simplify-subject-fuzzy-regexp'."
1743 (let ((case-fold-search t)
1745 (gnus-simplify-buffer-fuzzy-step "\t" " ")
1747 (while (not (eq modified-tick (buffer-modified-tick)))
1748 (setq modified-tick (buffer-modified-tick))
1750 ((listp gnus-simplify-subject-fuzzy-regexp)
1751 (mapc 'gnus-simplify-buffer-fuzzy-step
1752 gnus-simplify-subject-fuzzy-regexp))
1753 (gnus-simplify-subject-fuzzy-regexp
1754 (gnus-simplify-buffer-fuzzy-step gnus-simplify-subject-fuzzy-regexp)))
1755 (gnus-simplify-buffer-fuzzy-step "^ *\\[[-+?*!][-+?*!]\\] *")
1756 (gnus-simplify-buffer-fuzzy-step
1757 "^ *\\(re\\|fw\\|fwd\\)[[{(^0-9]*[])}]?[:;] *")
1758 (gnus-simplify-buffer-fuzzy-step "^[[].*:\\( .*\\)[]]$" "\\1"))
1760 (gnus-simplify-buffer-fuzzy-step " *[[{(][^()\n]*[]})] *$")
1761 (gnus-simplify-buffer-fuzzy-step " +" " ")
1762 (gnus-simplify-buffer-fuzzy-step " $")
1763 (gnus-simplify-buffer-fuzzy-step "^ +")))
1765 (defun gnus-simplify-subject-fuzzy (subject)
1766 "Simplify a subject string fuzzily.
1767 See `gnus-simplify-buffer-fuzzy' for details."
1769 (gnus-set-work-buffer)
1770 (let ((case-fold-search t))
1771 ;; Remove uninteresting prefixes.
1772 (when (and gnus-simplify-ignored-prefixes
1773 (string-match gnus-simplify-ignored-prefixes subject))
1774 (setq subject (substring subject (match-end 0))))
1776 (inline (gnus-simplify-buffer-fuzzy))
1779 (defsubst gnus-simplify-subject-fully (subject)
1780 "Simplify a subject string according to `gnus-summary-gather-subject-limit'."
1782 (gnus-simplify-subject-functions
1783 (gnus-map-function gnus-simplify-subject-functions subject))
1784 ((null gnus-summary-gather-subject-limit)
1785 (gnus-simplify-subject-re subject))
1786 ((eq gnus-summary-gather-subject-limit 'fuzzy)
1787 (gnus-simplify-subject-fuzzy subject))
1788 ((numberp gnus-summary-gather-subject-limit)
1789 (truncate-string-to-width (gnus-simplify-subject-re subject)
1790 gnus-summary-gather-subject-limit))
1794 (defsubst gnus-subject-equal (s1 s2 &optional simple-first)
1795 "Check whether two subjects are equal.
1796 If optional argument SIMPLE-FIRST is t, first argument is already
1799 ((null simple-first)
1800 (equal (gnus-simplify-subject-fully s1)
1801 (gnus-simplify-subject-fully s2)))
1804 (gnus-simplify-subject-fully s2)))))
1806 (defun gnus-summary-bubble-group ()
1807 "Increase the score of the current group.
1808 This is a handy function to add to `gnus-summary-exit-hook' to
1809 increase the score of each group you read."
1810 (gnus-group-add-score gnus-newsgroup-name))
1814 ;;; Gnus summary mode
1817 (put 'gnus-summary-mode 'mode-class 'special)
1819 (defvar gnus-article-commands-menu)
1821 ;; Non-orthogonal keys
1823 (gnus-define-keys gnus-summary-mode-map
1824 " " gnus-summary-next-page
1825 "\177" gnus-summary-prev-page
1826 [delete] gnus-summary-prev-page
1827 [backspace] gnus-summary-prev-page
1828 "\r" gnus-summary-scroll-up
1829 "\M-\r" gnus-summary-scroll-down
1830 "n" gnus-summary-next-unread-article
1831 "p" gnus-summary-prev-unread-article
1832 "N" gnus-summary-next-article
1833 "P" gnus-summary-prev-article
1834 "\M-\C-n" gnus-summary-next-same-subject
1835 "\M-\C-p" gnus-summary-prev-same-subject
1836 "\M-n" gnus-summary-next-unread-subject
1837 "\M-p" gnus-summary-prev-unread-subject
1838 "." gnus-summary-first-unread-article
1839 "," gnus-summary-best-unread-article
1840 "\M-s" gnus-summary-search-article-forward
1841 "\M-r" gnus-summary-search-article-backward
1842 "\M-S" gnus-summary-repeat-search-article-forward
1843 "\M-R" gnus-summary-repeat-search-article-backward
1844 "<" gnus-summary-beginning-of-article
1845 ">" gnus-summary-end-of-article
1846 "j" gnus-summary-goto-article
1847 "^" gnus-summary-refer-parent-article
1848 "\M-^" gnus-summary-refer-article
1849 "u" gnus-summary-tick-article-forward
1850 "!" gnus-summary-tick-article-forward
1851 "U" gnus-summary-tick-article-backward
1852 "d" gnus-summary-mark-as-read-forward
1853 "D" gnus-summary-mark-as-read-backward
1854 "E" gnus-summary-mark-as-expirable
1855 "\M-u" gnus-summary-clear-mark-forward
1856 "\M-U" gnus-summary-clear-mark-backward
1857 "k" gnus-summary-kill-same-subject-and-select
1858 "\C-k" gnus-summary-kill-same-subject
1859 "\M-\C-k" gnus-summary-kill-thread
1860 "\M-\C-l" gnus-summary-lower-thread
1861 "e" gnus-summary-edit-article
1862 "#" gnus-summary-mark-as-processable
1863 "\M-#" gnus-summary-unmark-as-processable
1864 "\M-\C-t" gnus-summary-toggle-threads
1865 "\M-\C-s" gnus-summary-show-thread
1866 "\M-\C-h" gnus-summary-hide-thread
1867 "\M-\C-f" gnus-summary-next-thread
1868 "\M-\C-b" gnus-summary-prev-thread
1869 [(meta down)] gnus-summary-next-thread
1870 [(meta up)] gnus-summary-prev-thread
1871 "\M-\C-u" gnus-summary-up-thread
1872 "\M-\C-d" gnus-summary-down-thread
1873 "&" gnus-summary-execute-command
1874 "c" gnus-summary-catchup-and-exit
1875 "\C-w" gnus-summary-mark-region-as-read
1876 "\C-t" gnus-summary-toggle-truncation
1877 "?" gnus-summary-mark-as-dormant
1878 "\C-c\M-\C-s" gnus-summary-limit-include-expunged
1879 "\C-c\C-s\C-n" gnus-summary-sort-by-number
1880 "\C-c\C-s\C-m\C-n" gnus-summary-sort-by-most-recent-number
1881 "\C-c\C-s\C-l" gnus-summary-sort-by-lines
1882 "\C-c\C-s\C-c" gnus-summary-sort-by-chars
1883 "\C-c\C-s\C-a" gnus-summary-sort-by-author
1884 "\C-c\C-s\C-t" gnus-summary-sort-by-recipient
1885 "\C-c\C-s\C-s" gnus-summary-sort-by-subject
1886 "\C-c\C-s\C-d" gnus-summary-sort-by-date
1887 "\C-c\C-s\C-m\C-d" gnus-summary-sort-by-most-recent-date
1888 "\C-c\C-s\C-i" gnus-summary-sort-by-score
1889 "\C-c\C-s\C-o" gnus-summary-sort-by-original
1890 "\C-c\C-s\C-r" gnus-summary-sort-by-random
1891 "=" gnus-summary-expand-window
1892 "\C-x\C-s" gnus-summary-reselect-current-group
1893 "\M-g" gnus-summary-rescan-group
1894 "\C-c\C-r" gnus-summary-caesar-message
1895 "f" gnus-summary-followup
1896 "F" gnus-summary-followup-with-original
1897 "C" gnus-summary-cancel-article
1898 "r" gnus-summary-reply
1899 "R" gnus-summary-reply-with-original
1900 "\C-c\C-f" gnus-summary-mail-forward
1901 "o" gnus-summary-save-article
1902 "\C-o" gnus-summary-save-article-mail
1903 "|" gnus-summary-pipe-output
1904 "\M-k" gnus-summary-edit-local-kill
1905 "\M-K" gnus-summary-edit-global-kill
1907 "\C-c\C-d" gnus-summary-describe-group
1908 "q" gnus-summary-exit
1909 "Q" gnus-summary-exit-no-update
1910 "\C-c\C-i" gnus-info-find-node
1911 gnus-mouse-2 gnus-mouse-pick-article
1912 [follow-link] mouse-face
1913 "m" gnus-summary-mail-other-window
1914 "a" gnus-summary-post-news
1915 "x" gnus-summary-limit-to-unread
1916 "s" gnus-summary-isearch-article
1917 [tab] gnus-summary-widget-forward
1918 "t" gnus-summary-toggle-header
1919 "g" gnus-summary-show-article
1920 "l" gnus-summary-goto-last-article
1921 "\C-c\C-v\C-v" gnus-uu-decode-uu-view
1922 "\C-d" gnus-summary-enter-digest-group
1923 "\M-\C-d" gnus-summary-read-document
1924 "\M-\C-e" gnus-summary-edit-parameters
1925 "\M-\C-a" gnus-summary-customize-parameters
1927 "*" gnus-cache-enter-article
1928 "\M-*" gnus-cache-remove-article
1929 "\M-&" gnus-summary-universal-argument
1930 "\C-l" gnus-recenter
1931 "I" gnus-summary-increase-score
1932 "L" gnus-summary-lower-score
1933 "\M-i" gnus-symbolic-argument
1934 "h" gnus-summary-select-article-buffer
1936 "b" gnus-article-view-part
1937 "\M-t" gnus-summary-toggle-display-buttonized
1939 "V" gnus-summary-score-map
1940 "X" gnus-uu-extract-map
1941 "S" gnus-summary-send-map)
1943 ;; Sort of orthogonal keymap
1944 (gnus-define-keys (gnus-summary-mark-map "M" gnus-summary-mode-map)
1945 "t" gnus-summary-tick-article-forward
1946 "!" gnus-summary-tick-article-forward
1947 "d" gnus-summary-mark-as-read-forward
1948 "r" gnus-summary-mark-as-read-forward
1949 "c" gnus-summary-clear-mark-forward
1950 " " gnus-summary-clear-mark-forward
1951 "e" gnus-summary-mark-as-expirable
1952 "x" gnus-summary-mark-as-expirable
1953 "?" gnus-summary-mark-as-dormant
1954 "b" gnus-summary-set-bookmark
1955 "B" gnus-summary-remove-bookmark
1956 "#" gnus-summary-mark-as-processable
1957 "\M-#" gnus-summary-unmark-as-processable
1958 "S" gnus-summary-limit-include-expunged
1959 "C" gnus-summary-catchup
1960 "H" gnus-summary-catchup-to-here
1961 "h" gnus-summary-catchup-from-here
1962 "\C-c" gnus-summary-catchup-all
1963 "k" gnus-summary-kill-same-subject-and-select
1964 "K" gnus-summary-kill-same-subject
1965 "P" gnus-uu-mark-map)
1967 (gnus-define-keys (gnus-summary-mscore-map "V" gnus-summary-mark-map)
1968 "c" gnus-summary-clear-above
1969 "u" gnus-summary-tick-above
1970 "m" gnus-summary-mark-above
1971 "k" gnus-summary-kill-below)
1973 (gnus-define-keys (gnus-summary-limit-map "/" gnus-summary-mode-map)
1974 "/" gnus-summary-limit-to-subject
1975 "n" gnus-summary-limit-to-articles
1976 "b" gnus-summary-limit-to-bodies
1977 "h" gnus-summary-limit-to-headers
1978 "w" gnus-summary-pop-limit
1979 "s" gnus-summary-limit-to-subject
1980 "a" gnus-summary-limit-to-author
1981 "u" gnus-summary-limit-to-unread
1982 "m" gnus-summary-limit-to-marks
1983 "M" gnus-summary-limit-exclude-marks
1984 "v" gnus-summary-limit-to-score
1985 "*" gnus-summary-limit-include-cached
1986 "D" gnus-summary-limit-include-dormant
1987 "T" gnus-summary-limit-include-thread
1988 "d" gnus-summary-limit-exclude-dormant
1989 "t" gnus-summary-limit-to-age
1990 "." gnus-summary-limit-to-unseen
1991 "x" gnus-summary-limit-to-extra
1992 "p" gnus-summary-limit-to-display-predicate
1993 "E" gnus-summary-limit-include-expunged
1994 "c" gnus-summary-limit-exclude-childless-dormant
1995 "C" gnus-summary-limit-mark-excluded-as-read
1996 "o" gnus-summary-insert-old-articles
1997 "N" gnus-summary-insert-new-articles
1998 "S" gnus-summary-limit-to-singletons
1999 "r" gnus-summary-limit-to-replied
2000 "R" gnus-summary-limit-to-recipient
2001 "A" gnus-summary-limit-to-address)
2003 (gnus-define-keys (gnus-summary-goto-map "G" gnus-summary-mode-map)
2004 "n" gnus-summary-next-unread-article
2005 "p" gnus-summary-prev-unread-article
2006 "N" gnus-summary-next-article
2007 "P" gnus-summary-prev-article
2008 "\C-n" gnus-summary-next-same-subject
2009 "\C-p" gnus-summary-prev-same-subject
2010 "\M-n" gnus-summary-next-unread-subject
2011 "\M-p" gnus-summary-prev-unread-subject
2012 "f" gnus-summary-first-unread-article
2013 "b" gnus-summary-best-unread-article
2014 "j" gnus-summary-goto-article
2015 "g" gnus-summary-goto-subject
2016 "l" gnus-summary-goto-last-article
2017 "o" gnus-summary-pop-article)
2019 (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map)
2020 "k" gnus-summary-kill-thread
2021 "E" gnus-summary-expire-thread
2022 "l" gnus-summary-lower-thread
2023 "i" gnus-summary-raise-thread
2024 "T" gnus-summary-toggle-threads
2025 "t" gnus-summary-rethread-current
2026 "^" gnus-summary-reparent-thread
2027 "\M-^" gnus-summary-reparent-children
2028 "s" gnus-summary-show-thread
2029 "S" gnus-summary-show-all-threads
2030 "h" gnus-summary-hide-thread
2031 "H" gnus-summary-hide-all-threads
2032 "n" gnus-summary-next-thread
2033 "p" gnus-summary-prev-thread
2034 "u" gnus-summary-up-thread
2035 "o" gnus-summary-top-thread
2036 "d" gnus-summary-down-thread
2037 "#" gnus-uu-mark-thread
2038 "\M-#" gnus-uu-unmark-thread)
2040 (gnus-define-keys (gnus-summary-buffer-map "Y" gnus-summary-mode-map)
2041 "g" gnus-summary-prepare
2042 "c" gnus-summary-insert-cached-articles
2043 "d" gnus-summary-insert-dormant-articles
2044 "t" gnus-summary-insert-ticked-articles)
2046 (gnus-define-keys (gnus-summary-exit-map "Z" gnus-summary-mode-map)
2047 "c" gnus-summary-catchup-and-exit
2048 "C" gnus-summary-catchup-all-and-exit
2049 "E" gnus-summary-exit-no-update
2050 "Q" gnus-summary-exit
2051 "Z" gnus-summary-exit
2052 "n" gnus-summary-catchup-and-goto-next-group
2053 "p" gnus-summary-catchup-and-goto-prev-group
2054 "R" gnus-summary-reselect-current-group
2055 "G" gnus-summary-rescan-group
2056 "N" gnus-summary-next-group
2057 "s" gnus-summary-save-newsrc
2058 "P" gnus-summary-prev-group)
2060 (gnus-define-keys (gnus-summary-article-map "A" gnus-summary-mode-map)
2061 " " gnus-summary-next-page
2062 "n" gnus-summary-next-page
2063 "\177" gnus-summary-prev-page
2064 [delete] gnus-summary-prev-page
2065 "p" gnus-summary-prev-page
2066 "\r" gnus-summary-scroll-up
2067 "\M-\r" gnus-summary-scroll-down
2068 "<" gnus-summary-beginning-of-article
2069 ">" gnus-summary-end-of-article
2070 "b" gnus-summary-beginning-of-article
2071 "e" gnus-summary-end-of-article
2072 "^" gnus-summary-refer-parent-article
2073 "r" gnus-summary-refer-parent-article
2074 "C" gnus-summary-show-complete-article
2075 "D" gnus-summary-enter-digest-group
2076 "R" gnus-summary-refer-references
2077 "T" gnus-summary-refer-thread
2078 "W" gnus-warp-to-article
2079 "g" gnus-summary-show-article
2080 "s" gnus-summary-isearch-article
2081 [tab] gnus-summary-widget-forward
2082 "P" gnus-summary-print-article
2083 "S" gnus-sticky-article
2084 "M" gnus-mailing-list-insinuate
2085 "t" gnus-article-babel)
2087 (gnus-define-keys (gnus-summary-wash-map "W" gnus-summary-mode-map)
2088 "b" gnus-article-add-buttons
2089 "B" gnus-article-add-buttons-to-head
2090 "o" gnus-article-treat-overstrike
2091 "e" gnus-article-emphasize
2092 "w" gnus-article-fill-cited-article
2093 "Q" gnus-article-fill-long-lines
2094 "L" gnus-article-toggle-truncate-lines
2095 "C" gnus-article-capitalize-sentences
2096 "c" gnus-article-remove-cr
2097 "q" gnus-article-de-quoted-unreadable
2098 "6" gnus-article-de-base64-unreadable
2099 "Z" gnus-article-decode-HZ
2100 "A" gnus-article-treat-ansi-sequences
2101 "h" gnus-article-wash-html
2102 "u" gnus-article-unsplit-urls
2103 "s" gnus-summary-force-verify-and-decrypt
2104 "f" gnus-article-display-x-face
2105 "l" gnus-summary-stop-page-breaking
2106 "r" gnus-summary-caesar-message
2107 "m" gnus-summary-morse-message
2108 "t" gnus-summary-toggle-header
2109 "g" gnus-treat-smiley
2110 "v" gnus-summary-verbose-headers
2111 "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
2112 "p" gnus-article-verify-x-pgp-sig
2113 "d" gnus-article-treat-dumbquotes
2114 "U" gnus-article-treat-non-ascii
2115 "i" gnus-summary-idna-message)
2117 (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
2118 ;; mnemonic: deuglif*Y*
2119 "u" gnus-article-outlook-unwrap-lines
2120 "a" gnus-article-outlook-repair-attribution
2121 "c" gnus-article-outlook-rearrange-citation
2122 "f" gnus-article-outlook-deuglify-article) ;; mnemonic: full deuglify
2124 (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map)
2125 "a" gnus-article-hide
2126 "h" gnus-article-hide-headers
2127 "b" gnus-article-hide-boring-headers
2128 "s" gnus-article-hide-signature
2129 "c" gnus-article-hide-citation
2130 "C" gnus-article-hide-citation-in-followups
2131 "l" gnus-article-hide-list-identifiers
2132 "B" gnus-article-strip-banner
2133 "P" gnus-article-hide-pem
2134 "\C-c" gnus-article-hide-citation-maybe)
2136 (gnus-define-keys (gnus-summary-wash-highlight-map "H" gnus-summary-wash-map)
2137 "a" gnus-article-highlight
2138 "h" gnus-article-highlight-headers
2139 "c" gnus-article-highlight-citation
2140 "s" gnus-article-highlight-signature)
2142 (gnus-define-keys (gnus-summary-wash-header-map "G" gnus-summary-wash-map)
2143 "f" gnus-article-treat-fold-headers
2144 "u" gnus-article-treat-unfold-headers
2145 "n" gnus-article-treat-fold-newsgroups)
2147 (gnus-define-keys (gnus-summary-wash-display-map "D" gnus-summary-wash-map)
2148 "x" gnus-article-display-x-face
2149 "d" gnus-article-display-face
2150 "s" gnus-treat-smiley
2151 "D" gnus-article-remove-images
2152 "W" gnus-article-show-images
2153 "f" gnus-treat-from-picon
2154 "m" gnus-treat-mail-picon
2155 "n" gnus-treat-newsgroups-picon
2156 "g" gnus-treat-from-gravatar
2157 "h" gnus-treat-mail-gravatar)
2159 (gnus-define-keys (gnus-summary-wash-mime-map "M" gnus-summary-wash-map)
2160 "w" gnus-article-decode-mime-words
2161 "c" gnus-article-decode-charset
2162 "v" gnus-mime-view-all-parts
2163 "b" gnus-article-view-part)
2165 (gnus-define-keys (gnus-summary-wash-time-map "T" gnus-summary-wash-map)
2166 "z" gnus-article-date-ut
2167 "u" gnus-article-date-ut
2168 "l" gnus-article-date-local
2169 "p" gnus-article-date-english
2170 "e" gnus-article-date-lapsed
2171 "o" gnus-article-date-original
2172 "i" gnus-article-date-iso8601
2173 "s" gnus-article-date-user)
2175 (gnus-define-keys (gnus-summary-wash-empty-map "E" gnus-summary-wash-map)
2176 "t" gnus-article-remove-trailing-blank-lines
2177 "l" gnus-article-strip-leading-blank-lines
2178 "m" gnus-article-strip-multiple-blank-lines
2179 "a" gnus-article-strip-blank-lines
2180 "A" gnus-article-strip-all-blank-lines
2181 "s" gnus-article-strip-leading-space
2182 "e" gnus-article-strip-trailing-space
2183 "w" gnus-article-remove-leading-whitespace)
2185 (gnus-define-keys (gnus-summary-help-map "H" gnus-summary-mode-map)
2187 "d" gnus-summary-describe-group
2188 "h" gnus-summary-describe-briefly
2189 "i" gnus-info-find-node)
2191 (gnus-define-keys (gnus-summary-backend-map "B" gnus-summary-mode-map)
2192 "e" gnus-summary-expire-articles
2193 "\M-\C-e" gnus-summary-expire-articles-now
2194 "\177" gnus-summary-delete-article
2195 [delete] gnus-summary-delete-article
2196 [backspace] gnus-summary-delete-article
2197 "m" gnus-summary-move-article
2198 "r" gnus-summary-respool-article
2199 "w" gnus-summary-edit-article
2200 "c" gnus-summary-copy-article
2201 "B" gnus-summary-crosspost-article
2202 "q" gnus-summary-respool-query
2203 "t" gnus-summary-respool-trace
2204 "i" gnus-summary-import-article
2205 "I" gnus-summary-create-article
2206 "p" gnus-summary-article-posted-p)
2208 (gnus-define-keys (gnus-summary-save-map "O" gnus-summary-mode-map)
2209 "o" gnus-summary-save-article
2210 "m" gnus-summary-save-article-mail
2211 "F" gnus-summary-write-article-file
2212 "r" gnus-summary-save-article-rmail
2213 "f" gnus-summary-save-article-file
2214 "b" gnus-summary-save-article-body-file
2215 "B" gnus-summary-write-article-body-file
2216 "h" gnus-summary-save-article-folder
2217 "v" gnus-summary-save-article-vm
2218 "p" gnus-summary-pipe-output
2219 "P" gnus-summary-muttprint)
2221 (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
2222 "b" gnus-summary-display-buttonized
2223 "m" gnus-summary-repair-multipart
2224 "v" gnus-article-view-part
2225 "o" gnus-article-save-part
2226 "O" gnus-article-save-part-and-strip
2227 "r" gnus-article-replace-part
2228 "d" gnus-article-delete-part
2229 "t" gnus-article-view-part-as-type
2230 "j" gnus-article-jump-to-part
2231 "c" gnus-article-copy-part
2232 "C" gnus-article-view-part-as-charset
2233 "e" gnus-article-view-part-externally
2234 "H" gnus-article-browse-html-article
2235 "E" gnus-article-encrypt-body
2236 "i" gnus-article-inline-part
2237 "|" gnus-article-pipe-part)
2239 (gnus-define-keys (gnus-uu-mark-map "P" gnus-summary-mark-map)
2240 "p" gnus-summary-mark-as-processable
2241 "u" gnus-summary-unmark-as-processable
2242 "U" gnus-summary-unmark-all-processable
2243 "v" gnus-uu-mark-over
2244 "s" gnus-uu-mark-series
2245 "r" gnus-uu-mark-region
2246 "g" gnus-uu-unmark-region
2247 "R" gnus-uu-mark-by-regexp
2248 "G" gnus-uu-unmark-by-regexp
2249 "t" gnus-uu-mark-thread
2250 "T" gnus-uu-unmark-thread
2251 "a" gnus-uu-mark-all
2252 "b" gnus-uu-mark-buffer
2253 "S" gnus-uu-mark-sparse
2254 "k" gnus-summary-kill-process-mark
2255 "y" gnus-summary-yank-process-mark
2256 "w" gnus-summary-save-process-mark
2257 "i" gnus-uu-invert-processable)
2259 (gnus-define-keys (gnus-uu-extract-map "X" gnus-summary-mode-map)
2260 ;;"x" gnus-uu-extract-any
2261 "m" gnus-summary-save-parts
2262 "u" gnus-uu-decode-uu
2263 "U" gnus-uu-decode-uu-and-save
2264 "s" gnus-uu-decode-unshar
2265 "S" gnus-uu-decode-unshar-and-save
2266 "o" gnus-uu-decode-save
2267 "O" gnus-uu-decode-save
2268 "b" gnus-uu-decode-binhex
2269 "B" gnus-uu-decode-binhex
2270 "Y" gnus-uu-decode-yenc
2271 "p" gnus-uu-decode-postscript
2272 "P" gnus-uu-decode-postscript-and-save)
2275 (gnus-uu-extract-view-map "v" gnus-uu-extract-map)
2276 "u" gnus-uu-decode-uu-view
2277 "U" gnus-uu-decode-uu-and-save-view
2278 "s" gnus-uu-decode-unshar-view
2279 "S" gnus-uu-decode-unshar-and-save-view
2280 "o" gnus-uu-decode-save-view
2281 "O" gnus-uu-decode-save-view
2282 "b" gnus-uu-decode-binhex-view
2283 "B" gnus-uu-decode-binhex-view
2284 "p" gnus-uu-decode-postscript-view
2285 "P" gnus-uu-decode-postscript-and-save-view)
2287 (defvar gnus-article-post-menu nil)
2289 (defconst gnus-summary-menu-maxlen 20)
2291 (defun gnus-summary-menu-split (menu)
2292 ;; If we have lots of elements, divide them into groups of 20
2293 ;; and make a pane (or submenu) for each one.
2294 (if (> (length menu) (/ (* gnus-summary-menu-maxlen 3) 2))
2295 (let ((menu menu) sublists next
2298 ;; Pull off the next gnus-summary-menu-maxlen elements
2299 ;; and make them the next element of sublist.
2300 (setq next (nthcdr gnus-summary-menu-maxlen menu))
2302 (setcdr (nthcdr (1- gnus-summary-menu-maxlen) menu)
2304 (setq sublists (cons (cons (format "%s ... %s" (aref (car menu) 0)
2305 (aref (car (last menu)) 0)) menu)
2309 (nreverse sublists))
2310 ;; Few elements--put them all in one pane.
2313 (defun gnus-summary-make-menu-bar ()
2314 (gnus-turn-off-edit-menu 'summary)
2316 (unless (boundp 'gnus-summary-misc-menu)
2319 gnus-summary-kill-menu gnus-summary-mode-map ""
2324 ["Customize" gnus-score-customize t])
2325 (gnus-make-score-map 'increase)
2326 (gnus-make-score-map 'lower)
2328 ["Kill below" gnus-summary-kill-below t]
2329 ["Mark above" gnus-summary-mark-above t]
2330 ["Tick above" gnus-summary-tick-above t]
2331 ["Clear above" gnus-summary-clear-above t])
2332 ["Current score" gnus-summary-current-score t]
2333 ["Set score" gnus-summary-set-score t]
2334 ["Switch current score file..." gnus-score-change-score-file t]
2335 ["Set mark below..." gnus-score-set-mark-below t]
2336 ["Set expunge below..." gnus-score-set-expunge-below t]
2337 ["Edit current score file" gnus-score-edit-current-scores t]
2338 ["Edit score file..." gnus-score-edit-file t]
2339 ["Trace score" gnus-score-find-trace t]
2340 ["Find words" gnus-score-find-favourite-words t]
2341 ["Rescore buffer" gnus-summary-rescore t]
2342 ["Increase score..." gnus-summary-increase-score t]
2343 ["Lower score..." gnus-summary-lower-score t]))))
2345 ;; Define both the Article menu in the summary buffer and the
2346 ;; equivalent Commands menu in the article buffer here for
2350 ["All" gnus-article-hide t]
2351 ["Headers" gnus-article-hide-headers t]
2352 ["Signature" gnus-article-hide-signature t]
2353 ["Citation" gnus-article-hide-citation t]
2354 ["List identifiers" gnus-article-hide-list-identifiers t]
2355 ["Banner" gnus-article-strip-banner t]
2356 ["Boring headers" gnus-article-hide-boring-headers t])
2358 ["All" gnus-article-highlight t]
2359 ["Headers" gnus-article-highlight-headers t]
2360 ["Signature" gnus-article-highlight-signature t]
2361 ["Citation" gnus-article-highlight-citation t])
2363 ["Words" gnus-article-decode-mime-words t]
2364 ["Charset" gnus-article-decode-charset t]
2365 ["QP" gnus-article-de-quoted-unreadable t]
2366 ["Base64" gnus-article-de-base64-unreadable t]
2367 ["View MIME buttons" gnus-summary-display-buttonized t]
2368 ["View all" gnus-mime-view-all-parts t]
2369 ["Verify and Decrypt" gnus-summary-force-verify-and-decrypt t]
2370 ["Encrypt body" gnus-article-encrypt-body
2371 :active (not (gnus-group-read-only-p))
2372 ,@(if (featurep 'xemacs) nil
2373 '(:help "Encrypt the message body on disk"))]
2374 ["Extract all parts..." gnus-summary-save-parts t]
2376 ["Repair multipart" gnus-summary-repair-multipart t]
2377 ["Pipe part..." gnus-article-pipe-part t]
2378 ["Inline part" gnus-article-inline-part t]
2379 ["View part as type..." gnus-article-view-part-as-type t]
2380 ["Encrypt body" gnus-article-encrypt-body
2381 :active (not (gnus-group-read-only-p))
2382 ,@(if (featurep 'xemacs) nil
2383 '(:help "Encrypt the message body on disk"))]
2384 ["View part externally" gnus-article-view-part-externally t]
2385 ["View HTML parts in browser" gnus-article-browse-html-article t]
2386 ["View part with charset..." gnus-article-view-part-as-charset t]
2387 ["Copy part" gnus-article-copy-part t]
2388 ["Save part..." gnus-article-save-part t]
2389 ["View part" gnus-article-view-part t]))
2391 ["Local" gnus-article-date-local t]
2392 ["ISO8601" gnus-article-date-iso8601 t]
2393 ["UT" gnus-article-date-ut t]
2394 ["Original" gnus-article-date-original t]
2395 ["Lapsed" gnus-article-date-lapsed t]
2396 ["User-defined" gnus-article-date-user t])
2398 ["Remove images" gnus-article-remove-images t]
2399 ["Toggle smiley" gnus-treat-smiley t]
2400 ["Show X-Face" gnus-article-display-x-face t]
2401 ["Show picons in From" gnus-treat-from-picon t]
2402 ["Show picons in mail headers" gnus-treat-mail-picon t]
2403 ["Show picons in news headers" gnus-treat-newsgroups-picon t]
2404 ["Show Gravatars in From" gnus-treat-from-gravatar t]
2405 ["Show Gravatars in mail headers" gnus-treat-mail-gravatar t]
2406 ("View as different encoding"
2407 ,@(gnus-summary-menu-split
2410 ;; Since easymenu under Emacs doesn't allow
2411 ;; lambda forms for menu commands, we should
2412 ;; provide intern'ed function symbols.
2413 (let ((command (intern (format "\
2414 gnus-summary-show-article-from-menu-as-charset-%s" cs))))
2418 (let ((gnus-summary-show-article-charset-alist
2420 (gnus-summary-show-article 1))))
2421 `[,(symbol-name cs) ,command t]))
2422 (sort (if (fboundp 'coding-system-list)
2423 (coding-system-list)
2424 (mapcar 'car mm-mime-mule-charset-alist))
2428 ["Leading" gnus-article-strip-leading-blank-lines t]
2429 ["Multiple" gnus-article-strip-multiple-blank-lines t]
2430 ["Trailing" gnus-article-remove-trailing-blank-lines t]
2431 ["All of the above" gnus-article-strip-blank-lines t]
2432 ["All" gnus-article-strip-all-blank-lines t]
2433 ["Leading space" gnus-article-strip-leading-space t]
2434 ["Trailing space" gnus-article-strip-trailing-space t]
2435 ["Leading space in headers"
2436 gnus-article-remove-leading-whitespace t])
2437 ["Overstrike" gnus-article-treat-overstrike t]
2438 ["Dumb quotes" gnus-article-treat-dumbquotes t]
2439 ["Non-ASCII" gnus-article-treat-non-ascii t]
2440 ["Emphasis" gnus-article-emphasize t]
2441 ["Word wrap" gnus-article-fill-cited-article t]
2442 ["Fill long lines" gnus-article-fill-long-lines t]
2443 ["Toggle truncate long lines" gnus-article-toggle-truncate-lines t]
2444 ["Capitalize sentences" gnus-article-capitalize-sentences t]
2445 ["Remove CR" gnus-article-remove-cr t]
2446 ["Quoted-Printable" gnus-article-de-quoted-unreadable t]
2447 ["Base64" gnus-article-de-base64-unreadable t]
2448 ["Rot 13" gnus-summary-caesar-message
2449 ,@(if (featurep 'xemacs) '(t)
2450 '(:help "\"Caesar rotate\" article by 13"))]
2451 ["De-IDNA" gnus-summary-idna-message t]
2452 ["Morse decode" gnus-summary-morse-message t]
2453 ["Unix pipe..." gnus-summary-pipe-message t]
2454 ["Add buttons" gnus-article-add-buttons t]
2455 ["Add buttons to head" gnus-article-add-buttons-to-head t]
2456 ["Stop page breaking" gnus-summary-stop-page-breaking t]
2457 ["Verbose header" gnus-summary-verbose-headers t]
2458 ["Toggle header" gnus-summary-toggle-header t]
2459 ["Unfold headers" gnus-article-treat-unfold-headers t]
2460 ["Fold newsgroups" gnus-article-treat-fold-newsgroups t]
2461 ["Html" gnus-article-wash-html t]
2462 ["Unsplit URLs" gnus-article-unsplit-urls t]
2463 ["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t]
2464 ["Decode HZ" gnus-article-decode-HZ t]
2465 ["ANSI sequences" gnus-article-treat-ansi-sequences t]
2466 ("(Outlook) Deuglify"
2467 ["Unwrap lines" gnus-article-outlook-unwrap-lines t]
2468 ["Repair attribution" gnus-article-outlook-repair-attribution t]
2469 ["Rearrange citation" gnus-article-outlook-rearrange-citation t]
2470 ["Full (Outlook) deuglify"
2471 gnus-article-outlook-deuglify-article t])
2474 ["Save in default format..." gnus-summary-save-article
2475 ,@(if (featurep 'xemacs) '(t)
2476 '(:help "Save article using default method"))]
2477 ["Save in file..." gnus-summary-save-article-file
2478 ,@(if (featurep 'xemacs) '(t)
2479 '(:help "Save article in file"))]
2480 ["Save in Unix mail format..." gnus-summary-save-article-mail t]
2481 ["Save in MH folder..." gnus-summary-save-article-folder t]
2482 ["Save in VM folder..." gnus-summary-save-article-vm t]
2483 ["Save in RMAIL mbox..." gnus-summary-save-article-rmail t]
2484 ["Save body in file..." gnus-summary-save-article-body-file t]
2485 ["Pipe through a filter..." gnus-summary-pipe-output t]
2486 ["Print with Muttprint..." gnus-summary-muttprint t]
2487 ["Print" gnus-summary-print-article
2488 ,@(if (featurep 'xemacs) '(t)
2489 '(:help "Generate and print a PostScript image"))])
2490 ("Copy, move,... (Backend)"
2491 ,@(if (featurep 'xemacs) nil
2492 '(:help "Copying, moving, expiring articles..."))
2493 ["Respool article..." gnus-summary-respool-article t]
2494 ["Move article..." gnus-summary-move-article
2495 (gnus-check-backend-function
2496 'request-move-article gnus-newsgroup-name)]
2497 ["Copy article..." gnus-summary-copy-article t]
2498 ["Crosspost article..." gnus-summary-crosspost-article
2499 (gnus-check-backend-function
2500 'request-replace-article gnus-newsgroup-name)]
2501 ["Import file..." gnus-summary-import-article
2502 (gnus-check-backend-function
2503 'request-accept-article gnus-newsgroup-name)]
2504 ["Create article..." gnus-summary-create-article
2505 (gnus-check-backend-function
2506 'request-accept-article gnus-newsgroup-name)]
2507 ["Check if posted" gnus-summary-article-posted-p t]
2508 ["Edit article" gnus-summary-edit-article
2509 (not (gnus-group-read-only-p))]
2510 ["Delete article" gnus-summary-delete-article
2511 (gnus-check-backend-function
2512 'request-expire-articles gnus-newsgroup-name)]
2513 ["Query respool" gnus-summary-respool-query t]
2514 ["Trace respool" gnus-summary-respool-trace t]
2515 ["Delete expirable articles" gnus-summary-expire-articles-now
2516 (gnus-check-backend-function
2517 'request-expire-articles gnus-newsgroup-name)])
2519 ["Uudecode" gnus-uu-decode-uu
2520 ,@(if (featurep 'xemacs) '(t)
2521 '(:help "Decode uuencoded article(s)"))]
2522 ["Uudecode and save" gnus-uu-decode-uu-and-save t]
2523 ["Unshar" gnus-uu-decode-unshar t]
2524 ["Unshar and save" gnus-uu-decode-unshar-and-save t]
2525 ["Save" gnus-uu-decode-save t]
2526 ["Binhex" gnus-uu-decode-binhex t]
2527 ["Postscript" gnus-uu-decode-postscript t]
2528 ["All MIME parts" gnus-summary-save-parts t])
2530 ["Enter article" gnus-cache-enter-article t]
2531 ["Remove article" gnus-cache-remove-article t])
2532 ["Translate" gnus-article-babel t]
2533 ["Select article buffer" gnus-summary-select-article-buffer t]
2534 ["Make article buffer sticky" gnus-sticky-article t]
2535 ["Enter digest buffer" gnus-summary-enter-digest-group t]
2536 ["Isearch article..." gnus-summary-isearch-article t]
2537 ["Beginning of the article" gnus-summary-beginning-of-article t]
2538 ["End of the article" gnus-summary-end-of-article t]
2539 ["Fetch parent of article" gnus-summary-refer-parent-article t]
2540 ["Fetch referenced articles" gnus-summary-refer-references t]
2541 ["Fetch current thread" gnus-summary-refer-thread t]
2542 ["Fetch article with id..." gnus-summary-refer-article t]
2543 ["Setup Mailing List Params" gnus-mailing-list-insinuate t]
2544 ["Redisplay" gnus-summary-show-article t]
2545 ["Raw article" gnus-summary-show-raw-article :keys "C-u g"])))
2547 gnus-summary-article-menu gnus-summary-mode-map ""
2548 (cons "Article" innards))
2550 (if (not (keymapp gnus-summary-article-menu))
2552 gnus-article-commands-menu gnus-article-mode-map ""
2553 (cons "Commands" innards))
2554 ;; in Emacs, don't share menu.
2555 (setq gnus-article-commands-menu
2556 (copy-keymap gnus-summary-article-menu))
2557 (define-key gnus-article-mode-map [menu-bar commands]
2558 (cons "Commands" gnus-article-commands-menu))))
2561 gnus-summary-thread-menu gnus-summary-mode-map ""
2563 ["Find all messages in thread" gnus-summary-refer-thread t]
2564 ["Toggle threading" gnus-summary-toggle-threads t]
2565 ["Hide threads" gnus-summary-hide-all-threads t]
2566 ["Show threads" gnus-summary-show-all-threads t]
2567 ["Hide thread" gnus-summary-hide-thread t]
2568 ["Show thread" gnus-summary-show-thread t]
2569 ["Go to next thread" gnus-summary-next-thread t]
2570 ["Go to previous thread" gnus-summary-prev-thread t]
2571 ["Go down thread" gnus-summary-down-thread t]
2572 ["Go up thread" gnus-summary-up-thread t]
2573 ["Top of thread" gnus-summary-top-thread t]
2574 ["Mark thread as read" gnus-summary-kill-thread t]
2575 ["Mark thread as expired" gnus-summary-expire-thread t]
2576 ["Lower thread score" gnus-summary-lower-thread t]
2577 ["Raise thread score" gnus-summary-raise-thread t]
2578 ["Rethread current" gnus-summary-rethread-current t]))
2581 gnus-summary-post-menu gnus-summary-mode-map ""
2583 ["Send a message (mail or news)" gnus-summary-post-news
2584 ,@(if (featurep 'xemacs) '(t)
2585 '(:help "Compose a new message (mail or news)"))]
2586 ["Followup" gnus-summary-followup
2587 ,@(if (featurep 'xemacs) '(t)
2588 '(:help "Post followup to this article"))]
2589 ["Followup and yank" gnus-summary-followup-with-original
2590 ,@(if (featurep 'xemacs) '(t)
2591 '(:help "Post followup to this article, quoting its contents"))]
2592 ["Supersede article" gnus-summary-supersede-article t]
2593 ["Cancel article" gnus-summary-cancel-article
2594 ,@(if (featurep 'xemacs) '(t)
2595 '(:help "Cancel an article you posted"))]
2596 ["Reply" gnus-summary-reply t]
2597 ["Reply and yank" gnus-summary-reply-with-original t]
2598 ["Wide reply" gnus-summary-wide-reply t]
2599 ["Wide reply and yank" gnus-summary-wide-reply-with-original
2600 ,@(if (featurep 'xemacs) '(t)
2601 '(:help "Mail a reply, quoting this article"))]
2602 ["Very wide reply" gnus-summary-very-wide-reply t]
2603 ["Very wide reply and yank" gnus-summary-very-wide-reply-with-original
2604 ,@(if (featurep 'xemacs) '(t)
2605 '(:help "Mail a very wide reply, quoting this article"))]
2606 ["Mail forward" gnus-summary-mail-forward t]
2607 ["Post forward" gnus-summary-post-forward t]
2608 ["Digest and mail" gnus-uu-digest-mail-forward t]
2609 ["Digest and post" gnus-uu-digest-post-forward t]
2610 ["Resend message" gnus-summary-resend-message t]
2611 ["Resend message edit" gnus-summary-resend-message-edit t]
2612 ["Send bounced mail" gnus-summary-resend-bounced-mail t]
2613 ["Send a mail" gnus-summary-mail-other-window t]
2614 ["Create a local message" gnus-summary-news-other-window t]
2615 ["Uuencode and post" gnus-uu-post-news
2616 ,@(if (featurep 'xemacs) '(t)
2617 '(:help "Post a uuencoded article"))]
2618 ["Followup via news" gnus-summary-followup-to-mail t]
2619 ["Followup via news and yank"
2620 gnus-summary-followup-to-mail-with-original t]
2621 ["Strip signature on reply"
2624 (if (not (memq message-cite-function
2625 '(message-cite-original-without-signature
2626 message-cite-original)))
2627 ;; Stupid workaround for XEmacs not honoring :visible.
2628 (message "Can't toggle this value of `message-cite-function'")
2629 (setq message-cite-function
2630 (if (eq message-cite-function
2631 'message-cite-original-without-signature)
2632 'message-cite-original
2633 'message-cite-original-without-signature))))
2634 ;; XEmacs barfs on :visible.
2635 ,@(if (featurep 'xemacs) nil
2636 '(:visible (memq message-cite-function
2637 '(message-cite-original-without-signature
2638 message-cite-original))))
2640 :selected (eq message-cite-function
2641 'message-cite-original-without-signature)
2642 ,@(if (featurep 'xemacs) nil
2643 '(:help "Strip signature from cited article when replying."))]
2645 ;;["Send" gnus-summary-send-draft t]
2646 ;;["Send bounced" gnus-resend-bounced-mail t])
2650 ((not (keymapp gnus-summary-post-menu))
2651 (setq gnus-article-post-menu gnus-summary-post-menu))
2652 ((not gnus-article-post-menu)
2653 ;; Don't share post menu.
2654 (setq gnus-article-post-menu
2655 (copy-keymap gnus-summary-post-menu))))
2656 (define-key gnus-article-mode-map [menu-bar post]
2657 (cons "Post" gnus-article-post-menu))
2660 gnus-summary-misc-menu gnus-summary-mode-map ""
2663 ["Mark as read" gnus-summary-mark-as-read-forward t]
2664 ["Mark same subject and select"
2665 gnus-summary-kill-same-subject-and-select t]
2666 ["Mark same subject" gnus-summary-kill-same-subject t]
2667 ["Catchup" gnus-summary-catchup
2668 ,@(if (featurep 'xemacs) '(t)
2669 '(:help "Mark unread articles in this group as read"))]
2670 ["Catchup all" gnus-summary-catchup-all t]
2671 ["Catchup to here" gnus-summary-catchup-to-here t]
2672 ["Catchup from here" gnus-summary-catchup-from-here t]
2673 ["Catchup region" gnus-summary-mark-region-as-read
2674 (gnus-mark-active-p)]
2675 ["Mark excluded" gnus-summary-limit-mark-excluded-as-read t])
2677 ["Tick" gnus-summary-tick-article-forward t]
2678 ["Mark as dormant" gnus-summary-mark-as-dormant t]
2679 ["Remove marks" gnus-summary-clear-mark-forward t]
2680 ["Set expirable mark" gnus-summary-mark-as-expirable t]
2681 ["Set bookmark" gnus-summary-set-bookmark t]
2682 ["Remove bookmark" gnus-summary-remove-bookmark t])
2684 ["Marks..." gnus-summary-limit-to-marks t]
2685 ["Subject..." gnus-summary-limit-to-subject t]
2686 ["Author..." gnus-summary-limit-to-author t]
2687 ["Recipient..." gnus-summary-limit-to-recipient t]
2688 ["Address..." gnus-summary-limit-to-address t]
2689 ["Age..." gnus-summary-limit-to-age t]
2690 ["Extra..." gnus-summary-limit-to-extra t]
2691 ["Score..." gnus-summary-limit-to-score t]
2692 ["Display Predicate" gnus-summary-limit-to-display-predicate t]
2693 ["Unread" gnus-summary-limit-to-unread t]
2694 ["Unseen" gnus-summary-limit-to-unseen t]
2695 ["Singletons" gnus-summary-limit-to-singletons t]
2696 ["Replied" gnus-summary-limit-to-replied t]
2697 ["Non-dormant" gnus-summary-limit-exclude-dormant t]
2698 ["Next or process marked articles" gnus-summary-limit-to-articles t]
2699 ["Pop limit" gnus-summary-pop-limit t]
2700 ["Show dormant" gnus-summary-limit-include-dormant t]
2701 ["Hide childless dormant"
2702 gnus-summary-limit-exclude-childless-dormant t]
2703 ;;["Hide thread" gnus-summary-limit-exclude-thread t]
2704 ["Hide marked" gnus-summary-limit-exclude-marks t]
2705 ["Show expunged" gnus-summary-limit-include-expunged t])
2707 ["Set mark" gnus-summary-mark-as-processable t]
2708 ["Remove mark" gnus-summary-unmark-as-processable t]
2709 ["Remove all marks" gnus-summary-unmark-all-processable t]
2710 ["Invert marks" gnus-uu-invert-processable t]
2711 ["Mark above" gnus-uu-mark-over t]
2712 ["Mark series" gnus-uu-mark-series t]
2713 ["Mark region" gnus-uu-mark-region (gnus-mark-active-p)]
2714 ["Unmark region" gnus-uu-unmark-region (gnus-mark-active-p)]
2715 ["Mark by regexp..." gnus-uu-mark-by-regexp t]
2716 ["Unmark by regexp..." gnus-uu-unmark-by-regexp t]
2717 ["Mark all" gnus-uu-mark-all t]
2718 ["Mark buffer" gnus-uu-mark-buffer t]
2719 ["Mark sparse" gnus-uu-mark-sparse t]
2720 ["Mark thread" gnus-uu-mark-thread t]
2721 ["Unmark thread" gnus-uu-unmark-thread t]
2722 ("Process Mark Sets"
2723 ["Kill" gnus-summary-kill-process-mark t]
2724 ["Yank" gnus-summary-yank-process-mark
2725 gnus-newsgroup-process-stack]
2726 ["Save" gnus-summary-save-process-mark t]
2727 ["Run command on marked..." gnus-summary-universal-argument t]))
2730 ["Page forward" gnus-summary-next-page
2731 ,@(if (featurep 'xemacs) '(t)
2732 '(:help "Show next page of article"))]
2733 ["Page backward" gnus-summary-prev-page
2734 ,@(if (featurep 'xemacs) '(t)
2735 '(:help "Show previous page of article"))]
2736 ["Line forward" gnus-summary-scroll-up t])
2738 ["Next unread article" gnus-summary-next-unread-article t]
2739 ["Previous unread article" gnus-summary-prev-unread-article t]
2740 ["Next article" gnus-summary-next-article t]
2741 ["Previous article" gnus-summary-prev-article t]
2742 ["Next unread subject" gnus-summary-next-unread-subject t]
2743 ["Previous unread subject" gnus-summary-prev-unread-subject t]
2744 ["Next article same subject" gnus-summary-next-same-subject t]
2745 ["Previous article same subject" gnus-summary-prev-same-subject t]
2746 ["First unread article" gnus-summary-first-unread-article t]
2747 ["Best unread article" gnus-summary-best-unread-article t]
2748 ["Go to subject number..." gnus-summary-goto-subject t]
2749 ["Go to article number..." gnus-summary-goto-article t]
2750 ["Go to the last article" gnus-summary-goto-last-article t]
2751 ["Pop article off history" gnus-summary-pop-article t])
2753 ["Sort by number" gnus-summary-sort-by-number t]
2754 ["Sort by most recent number" gnus-summary-sort-by-most-recent-number t]
2755 ["Sort by author" gnus-summary-sort-by-author t]
2756 ["Sort by recipient" gnus-summary-sort-by-recipient t]
2757 ["Sort by subject" gnus-summary-sort-by-subject t]
2758 ["Sort by date" gnus-summary-sort-by-date t]
2759 ["Sort by most recent date" gnus-summary-sort-by-most-recent-date t]
2760 ["Sort by score" gnus-summary-sort-by-score t]
2761 ["Sort by lines" gnus-summary-sort-by-lines t]
2762 ["Sort by characters" gnus-summary-sort-by-chars t]
2763 ["Randomize" gnus-summary-sort-by-random t]
2764 ["Original sort" gnus-summary-sort-by-original t])
2766 ["Describe group" gnus-summary-describe-group t]
2767 ["Read manual" gnus-info-find-node t])
2769 ["Pick and read" gnus-pick-mode t]
2770 ["Binary" gnus-binary-mode t])
2772 ["Regenerate" gnus-summary-prepare t]
2773 ["Insert cached articles" gnus-summary-insert-cached-articles t]
2774 ["Insert dormant articles" gnus-summary-insert-dormant-articles t]
2775 ["Insert ticked articles" gnus-summary-insert-ticked-articles t]
2776 ["Toggle threading" gnus-summary-toggle-threads t])
2777 ["See old articles" gnus-summary-insert-old-articles t]
2778 ["See new articles" gnus-summary-insert-new-articles t]
2779 ["Filter articles..." gnus-summary-execute-command t]
2780 ["Run command on articles..." gnus-summary-universal-argument t]
2781 ["Search articles forward..." gnus-summary-search-article-forward t]
2782 ["Search articles backward..." gnus-summary-search-article-backward t]
2783 ["Toggle line truncation" gnus-summary-toggle-truncation t]
2784 ["Expand window" gnus-summary-expand-window t]
2785 ["Expire expirable articles" gnus-summary-expire-articles
2786 (gnus-check-backend-function
2787 'request-expire-articles gnus-newsgroup-name)]
2788 ["Edit local kill file" gnus-summary-edit-local-kill t]
2789 ["Edit main kill file" gnus-summary-edit-global-kill t]
2790 ["Edit group parameters" gnus-summary-edit-parameters t]
2791 ["Customize group parameters" gnus-summary-customize-parameters t]
2792 ["Send a bug report" gnus-bug t]
2794 ["Catchup and exit" gnus-summary-catchup-and-exit
2795 ,@(if (featurep 'xemacs) '(t)
2796 '(:help "Mark unread articles in this group as read, then exit"))]
2797 ["Catchup all and exit" gnus-summary-catchup-all-and-exit t]
2798 ["Catchup and goto next" gnus-summary-catchup-and-goto-next-group t]
2799 ["Catchup and goto prev" gnus-summary-catchup-and-goto-prev-group t]
2800 ["Exit group" gnus-summary-exit
2801 ,@(if (featurep 'xemacs) '(t)
2802 '(:help "Exit current group, return to group selection mode"))]
2803 ["Exit group without updating" gnus-summary-exit-no-update t]
2804 ["Exit and goto next group" gnus-summary-next-group t]
2805 ["Exit and goto prev group" gnus-summary-prev-group t]
2806 ["Reselect group" gnus-summary-reselect-current-group t]
2807 ["Rescan group" gnus-summary-rescan-group t]
2808 ["Update dribble" gnus-summary-save-newsrc t])))
2810 (gnus-run-hooks 'gnus-summary-menu-hook)))
2812 (defvar gnus-summary-tool-bar-map nil)
2814 ;; Note: The :set function in the `gnus-summary-tool-bar*' variables will only
2815 ;; affect _new_ message buffers. We might add a function that walks thru all
2816 ;; summary-mode buffers and force the update.
2817 (defun gnus-summary-tool-bar-update (&optional symbol value)
2818 "Update summary mode toolbar.
2819 Setter function for custom variables."
2820 (setq-default gnus-summary-tool-bar-map nil)
2822 ;; When used as ":set" function:
2823 (set-default symbol value))
2824 (when (gnus-buffer-live-p gnus-summary-buffer)
2825 (with-current-buffer gnus-summary-buffer
2826 (gnus-summary-make-tool-bar))))
2828 (defcustom gnus-summary-tool-bar (if (eq gmm-tool-bar-style 'gnome)
2829 'gnus-summary-tool-bar-gnome
2830 'gnus-summary-tool-bar-retro)
2831 "Specifies the Gnus summary tool bar.
2833 It can be either a list or a symbol refering to a list. See
2834 `gmm-tool-bar-from-list' for the format of the list. The
2835 default key map is `gnus-summary-mode-map'.
2837 Pre-defined symbols include `gnus-summary-tool-bar-gnome' and
2838 `gnus-summary-tool-bar-retro'."
2839 :type '(choice (const :tag "GNOME style" gnus-summary-tool-bar-gnome)
2840 (const :tag "Retro look" gnus-summary-tool-bar-retro)
2841 (repeat :tag "User defined list" gmm-tool-bar-item)
2843 :version "23.1" ;; No Gnus
2844 :initialize 'custom-initialize-default
2845 :set 'gnus-summary-tool-bar-update
2846 :group 'gnus-summary)
2848 (defcustom gnus-summary-tool-bar-gnome
2849 '((gnus-summary-post-news "mail/compose" nil)
2850 (gnus-summary-insert-new-articles "mail/inbox" nil
2851 :visible (or (not gnus-agent)
2853 (gnus-summary-reply-with-original "mail/reply")
2854 (gnus-summary-reply "mail/reply" nil :visible nil)
2855 (gnus-summary-followup-with-original "mail/reply-all")
2856 (gnus-summary-followup "mail/reply-all" nil :visible nil)
2857 (gnus-summary-mail-forward "mail/forward")
2858 (gnus-summary-save-article "mail/save")
2859 (gnus-summary-search-article-forward "search" nil :visible nil)
2860 (gnus-summary-print-article "print")
2861 (gnus-summary-tick-article-forward "flag-followup" nil :visible nil)
2862 ;; Some new commands that may need more suitable icons:
2863 (gnus-summary-save-newsrc "save" nil :visible nil)
2864 ;; (gnus-summary-show-article "stock_message-display" nil :visible nil)
2865 (gnus-summary-prev-article "left-arrow")
2866 (gnus-summary-next-article "right-arrow")
2867 (gnus-summary-next-page "next-page")
2868 ;; (gnus-summary-enter-digest-group "right_arrow" nil :visible nil)
2870 ;; Maybe some sort-by-... could be added:
2871 ;; (gnus-summary-sort-by-author "sort-a-z" nil :visible nil)
2872 ;; (gnus-summary-sort-by-date "sort-1-9" nil :visible nil)
2873 (gnus-summary-mark-as-expirable
2875 :visible (gnus-check-backend-function 'request-expire-articles
2876 gnus-newsgroup-name))
2877 (gnus-summary-mark-as-spam
2879 :visible (and (fboundp 'spam-group-ham-contents-p)
2880 (spam-group-ham-contents-p gnus-newsgroup-name))
2881 :help "Mark as spam")
2882 (gnus-summary-mark-as-read-forward
2884 :visible (and (fboundp 'spam-group-spam-contents-p)
2885 (spam-group-spam-contents-p gnus-newsgroup-name)))
2887 (gnus-summary-exit "exit")
2888 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
2889 (gnus-info-find-node "help"))
2890 "List of functions for the summary tool bar (GNOME style).
2892 See `gmm-tool-bar-from-list' for the format of the list."
2893 :type '(repeat gmm-tool-bar-item)
2894 :version "23.1" ;; No Gnus
2895 :initialize 'custom-initialize-default
2896 :set 'gnus-summary-tool-bar-update
2897 :group 'gnus-summary)
2899 (defcustom gnus-summary-tool-bar-retro
2900 '((gnus-summary-prev-unread-article "gnus/prev-ur")
2901 (gnus-summary-next-unread-article "gnus/next-ur")
2902 (gnus-summary-post-news "gnus/post")
2903 (gnus-summary-followup-with-original "gnus/fuwo")
2904 (gnus-summary-followup "gnus/followup")
2905 (gnus-summary-reply-with-original "gnus/reply-wo")
2906 (gnus-summary-reply "gnus/reply")
2907 (gnus-summary-caesar-message "gnus/rot13")
2908 (gnus-uu-decode-uu "gnus/uu-decode")
2909 (gnus-summary-save-article-file "gnus/save-aif")
2910 (gnus-summary-save-article "gnus/save-art")
2911 (gnus-uu-post-news "gnus/uu-post")
2912 (gnus-summary-catchup "gnus/catchup")
2913 (gnus-summary-catchup-and-exit "gnus/cu-exit")
2914 (gnus-summary-exit "gnus/exit-summ")
2915 ;; Some new command that may need more suitable icons:
2916 (gnus-summary-print-article "gnus/print" nil :visible nil)
2917 (gnus-summary-mark-as-expirable "gnus/close" nil :visible nil)
2918 (gnus-summary-save-newsrc "gnus/save" nil :visible nil)
2919 ;; (gnus-summary-enter-digest-group "gnus/right_arrow" nil :visible nil)
2920 (gnus-summary-search-article-forward "gnus/search" nil :visible nil)
2921 ;; (gnus-summary-insert-new-articles "gnus/paste" nil :visible nil)
2922 ;; (gnus-summary-toggle-threads "gnus/open" nil :visible nil)
2924 (gnus-info-find-node "gnus/help" nil :visible nil))
2925 "List of functions for the summary tool bar (retro look).
2927 See `gmm-tool-bar-from-list' for the format of the list."
2928 :type '(repeat gmm-tool-bar-item)
2929 :version "23.1" ;; No Gnus
2930 :initialize 'custom-initialize-default
2931 :set 'gnus-summary-tool-bar-update
2932 :group 'gnus-summary)
2934 (defcustom gnus-summary-tool-bar-zap-list t
2935 "List of icon items from the global tool bar.
2936 These items are not displayed in the Gnus summary mode tool bar.
2938 See `gmm-tool-bar-from-list' for the format of the list."
2939 :type 'gmm-tool-bar-zap-list
2940 :version "23.1" ;; No Gnus
2941 :initialize 'custom-initialize-default
2942 :set 'gnus-summary-tool-bar-update
2943 :group 'gnus-summary)
2945 (defvar image-load-path)
2946 (defvar tool-bar-map)
2948 (defun gnus-summary-make-tool-bar (&optional force)
2949 "Make a summary mode tool bar from `gnus-summary-tool-bar'.
2950 When FORCE, rebuild the tool bar."
2951 (when (and (not (featurep 'xemacs))
2952 (boundp 'tool-bar-mode)
2954 (or (not gnus-summary-tool-bar-map) force))
2956 (gmm-image-load-path-for-library "gnus"
2959 (image-load-path (cons (car load-path)
2960 (when (boundp 'image-load-path)
2962 (map (gmm-tool-bar-from-list gnus-summary-tool-bar
2963 gnus-summary-tool-bar-zap-list
2964 'gnus-summary-mode-map)))
2966 ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode'
2968 (setq gnus-summary-tool-bar-map map))))
2969 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))
2971 (defun gnus-score-set-default (var value)
2972 "A version of set that updates the GNU Emacs menu-bar."
2974 ;; It is the message that forces the active status to be updated.
2977 (defun gnus-make-score-map (type)
2978 "Make a summary score map of type TYPE."
2981 (let ((headers '(("author" "from" string)
2982 ("subject" "subject" string)
2983 ("article body" "body" string)
2984 ("article head" "head" string)
2985 ("xref" "xref" string)
2986 ("extra header" "extra" string)
2987 ("lines" "lines" number)
2988 ("followups to author" "followup" string)))
2989 (types '((number ("less than" <)
2992 (string ("substring" s)
2996 (perms '(("temporary" (current-time-string))
3004 (if (eq type 'lower)
3009 (setq header (car headers))
3015 (let ((ts (cdr (assoc (nth 2 header) types)))
3031 'gnus-summary-score-entry
3033 (if (or (string= (nth 1 header)
3035 (string= (nth 1 header)
3038 (list 'gnus-summary-header
3040 (list 'quote (nth 1 (car ts)))
3041 (list 'gnus-score-delta-default
3048 (list (nreverse outp))))
3051 (list (nreverse outt))))
3053 (setq headers (cdr headers)))
3054 (list (nreverse outh))))))))
3057 (declare-function turn-on-gnus-mailing-list-mode "gnus-ml" ())
3058 (defvar bookmark-make-record-function)
3061 (defun gnus-summary-mode (&optional group)
3062 "Major mode for reading articles.
3064 All normal editing commands are switched off.
3065 \\<gnus-summary-mode-map>
3066 Each line in this buffer represents one article. To read an
3067 article, you can, for instance, type `\\[gnus-summary-next-page]'. To move forwards
3068 and backwards while displaying articles, type `\\[gnus-summary-next-unread-article]' and `\\[gnus-summary-prev-unread-article]',
3071 You can also post articles and send mail from this buffer. To
3072 follow up an article, type `\\[gnus-summary-followup]'. To mail a reply to the author
3073 of an article, type `\\[gnus-summary-reply]'.
3075 There are approx. one gazillion commands you can execute in this
3076 buffer; read the info pages for more information (`\\[gnus-info-find-node]').
3078 The following commands are available:
3080 \\{gnus-summary-mode-map}"
3082 (kill-all-local-variables)
3083 (let ((gnus-summary-local-variables gnus-newsgroup-variables))
3084 (gnus-summary-make-local-variables))
3085 (gnus-summary-make-local-variables)
3086 (setq gnus-newsgroup-name group)
3087 (when (gnus-visual-p 'summary-menu 'menu)
3088 (gnus-summary-make-menu-bar)
3089 (gnus-summary-make-tool-bar))
3090 (gnus-make-thread-indent-array)
3091 (gnus-simplify-mode-line)
3092 (setq major-mode 'gnus-summary-mode)
3093 (setq mode-name "Summary")
3094 (use-local-map gnus-summary-mode-map)
3095 (buffer-disable-undo)
3096 (setq buffer-read-only t ;Disable modification
3097 show-trailing-whitespace nil)
3098 (setq truncate-lines t)
3099 (add-to-invisibility-spec '(gnus-sum . t))
3100 (gnus-summary-set-display-table)
3101 (gnus-set-default-directory)
3102 (make-local-variable 'gnus-summary-line-format)
3103 (make-local-variable 'gnus-summary-line-format-spec)
3104 (make-local-variable 'gnus-summary-dummy-line-format)
3105 (make-local-variable 'gnus-summary-dummy-line-format-spec)
3106 (make-local-variable 'gnus-summary-mark-positions)
3107 (gnus-make-local-hook 'pre-command-hook)
3108 (add-hook 'pre-command-hook 'gnus-set-global-variables nil t)
3109 (gnus-run-mode-hooks 'gnus-summary-mode-hook)
3110 (turn-on-gnus-mailing-list-mode)
3111 (mm-enable-multibyte)
3112 (set (make-local-variable 'bookmark-make-record-function)
3113 'gnus-summary-bookmark-make-record)
3114 (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy)
3115 (gnus-update-summary-mark-positions))
3117 (defun gnus-summary-make-local-variables ()
3118 "Make all the local summary buffer variables."
3120 (dolist (local gnus-summary-local-variables)
3123 (if (eq (cdr local) 'global)
3124 ;; Copy the global value of the variable.
3125 (setq global (symbol-value (car local)))
3126 ;; Use the value from the list.
3127 (setq global (eval (cdr local))))
3128 (set (make-local-variable (car local)) global))
3129 ;; Simple nil-valued local variable.
3130 (set (make-local-variable local) nil)))))
3132 ;; Summary data functions.
3134 (defmacro gnus-data-number (data)
3137 (defmacro gnus-data-set-number (data number)
3138 `(setcar ,data ,number))
3140 (defmacro gnus-data-mark (data)
3143 (defmacro gnus-data-set-mark (data mark)
3144 `(setcar (nthcdr 1 ,data) ,mark))
3146 (defmacro gnus-data-pos (data)
3149 (defmacro gnus-data-set-pos (data pos)
3150 `(setcar (nthcdr 2 ,data) ,pos))
3152 (defmacro gnus-data-header (data)
3155 (defmacro gnus-data-set-header (data header)
3156 `(setf (nth 3 ,data) ,header))
3158 (defmacro gnus-data-level (data)
3161 (defmacro gnus-data-unread-p (data)
3162 `(= (nth 1 ,data) gnus-unread-mark))
3164 (defmacro gnus-data-read-p (data)
3165 `(/= (nth 1 ,data) gnus-unread-mark))
3167 (defmacro gnus-data-pseudo-p (data)
3168 `(consp (nth 3 ,data)))
3170 (defmacro gnus-data-find (number)
3171 `(assq ,number gnus-newsgroup-data))
3173 (defmacro gnus-data-find-list (number &optional data)
3174 `(let ((bdata ,(or data 'gnus-newsgroup-data)))
3175 (memq (assq ,number bdata)
3178 (defmacro gnus-data-make (number mark pos header level)
3179 `(list ,number ,mark ,pos ,header ,level))
3181 (defun gnus-data-enter (after-article number mark pos header level offset)
3182 (let ((data (gnus-data-find-list after-article)))
3184 (error "No such article: %d" after-article))
3185 (setcdr data (cons (gnus-data-make number mark pos header level)
3187 (setq gnus-newsgroup-data-reverse nil)
3188 (gnus-data-update-list (cddr data) offset)))
3190 (defun gnus-data-enter-list (after-article list &optional offset)
3192 (let ((data (and after-article (gnus-data-find-list after-article)))
3196 (let ((odata gnus-newsgroup-data))
3197 (setq gnus-newsgroup-data (nconc list gnus-newsgroup-data))
3199 (gnus-data-update-list odata offset)))
3200 ;; Find the last element in the list to be spliced into the main
3202 (setq list (last list))
3205 (setcdr list gnus-newsgroup-data)
3206 (setq gnus-newsgroup-data ilist)
3208 (gnus-data-update-list (cdr list) offset)))
3209 (setcdr list (cdr data))
3212 (gnus-data-update-list (cdr list) offset))))
3213 (setq gnus-newsgroup-data-reverse nil))))
3215 (defun gnus-data-remove (article &optional offset)
3216 (let ((data gnus-newsgroup-data))
3217 (if (= (gnus-data-number (car data)) article)
3219 (setq gnus-newsgroup-data (cdr gnus-newsgroup-data)
3220 gnus-newsgroup-data-reverse nil)
3222 (gnus-data-update-list gnus-newsgroup-data offset)))
3224 (when (= (gnus-data-number (cadr data)) article)
3225 (setcdr data (cddr data))
3227 (gnus-data-update-list (cdr data) offset))
3229 gnus-newsgroup-data-reverse nil))
3230 (setq data (cdr data))))))
3232 (defmacro gnus-data-list (backward)
3234 (or gnus-newsgroup-data-reverse
3235 (setq gnus-newsgroup-data-reverse
3236 (reverse gnus-newsgroup-data)))
3237 gnus-newsgroup-data))
3239 (defun gnus-data-update-list (data offset)
3240 "Add OFFSET to the POS of all data entries in DATA."
3241 (setq gnus-newsgroup-data-reverse nil)
3243 (setcar (nthcdr 2 (car data)) (+ offset (nth 2 (car data))))
3244 (setq data (cdr data))))
3246 (defun gnus-summary-article-pseudo-p (article)
3247 "Say whether this article is a pseudo article or not."
3248 (not (vectorp (gnus-data-header (gnus-data-find article)))))
3250 (defmacro gnus-summary-article-sparse-p (article)
3251 "Say whether this article is a sparse article or not."
3252 `(memq ,article gnus-newsgroup-sparse))
3254 (defmacro gnus-summary-article-ancient-p (article)
3255 "Say whether this article is a sparse article or not."
3256 `(memq ,article gnus-newsgroup-ancient))
3258 (defun gnus-article-parent-p (number)
3259 "Say whether this article is a parent or not."
3260 (let ((data (gnus-data-find-list number)))
3261 (and (cdr data) ; There has to be an article after...
3262 (< (gnus-data-level (car data)) ; And it has to have a higher level.
3263 (gnus-data-level (nth 1 data))))))
3265 (defun gnus-article-children (number)
3266 "Return a list of all children to NUMBER."
3267 (let* ((data (gnus-data-find-list number))
3268 (level (gnus-data-level (car data)))
3270 (setq data (cdr data))
3272 (= (gnus-data-level (car data)) (1+ level)))
3273 (push (gnus-data-number (car data)) children)
3274 (setq data (cdr data)))
3277 (defmacro gnus-summary-skip-intangible ()
3278 "If the current article is intangible, then jump to a different article."
3279 '(let ((to (get-text-property (point) 'gnus-intangible)))
3280 (and to (gnus-summary-goto-subject to))))
3282 (defmacro gnus-summary-article-intangible-p ()
3283 "Say whether this article is intangible or not."
3284 '(get-text-property (point) 'gnus-intangible))
3286 (defun gnus-article-read-p (article)
3287 "Say whether ARTICLE is read or not."
3288 (not (or (memq article gnus-newsgroup-marked)
3289 (memq article gnus-newsgroup-spam-marked)
3290 (memq article gnus-newsgroup-unreads)
3291 (memq article gnus-newsgroup-unselected)
3292 (memq article gnus-newsgroup-dormant))))
3294 ;; Some summary mode macros.
3296 (defmacro gnus-summary-article-number ()
3297 "The article number of the article on the current line.
3298 If there isn't an article number here, then we return the current
3301 (gnus-summary-skip-intangible)
3302 (or (get-text-property (point) 'gnus-number)
3303 (gnus-summary-last-subject))))
3305 (defmacro gnus-summary-article-header (&optional number)
3306 "Return the header of article NUMBER."
3307 `(gnus-data-header (gnus-data-find
3308 ,(or number '(gnus-summary-article-number)))))
3310 (defmacro gnus-summary-thread-level (&optional number)
3311 "Return the level of thread that starts with article NUMBER."
3312 `(if (and (eq gnus-summary-make-false-root 'dummy)
3313 (get-text-property (point) 'gnus-intangible))
3315 (gnus-data-level (gnus-data-find
3316 ,(or number '(gnus-summary-article-number))))))
3318 (defmacro gnus-summary-article-mark (&optional number)
3319 "Return the mark of article NUMBER."
3320 `(gnus-data-mark (gnus-data-find
3321 ,(or number '(gnus-summary-article-number)))))
3323 (defmacro gnus-summary-article-pos (&optional number)
3324 "Return the position of the line of article NUMBER."
3325 `(gnus-data-pos (gnus-data-find
3326 ,(or number '(gnus-summary-article-number)))))
3328 (defalias 'gnus-summary-subject-string 'gnus-summary-article-subject)
3329 (defmacro gnus-summary-article-subject (&optional number)
3330 "Return current subject string or nil if nothing."
3333 `(gnus-data-header (assq ,number gnus-newsgroup-data))
3334 '(gnus-data-header (assq (gnus-summary-article-number)
3335 gnus-newsgroup-data)))))
3338 (mail-header-subject headers))))
3340 (defmacro gnus-summary-article-score (&optional number)
3341 "Return current article score."
3342 `(or (cdr (assq ,(or number '(gnus-summary-article-number))
3343 gnus-newsgroup-scored))
3344 gnus-summary-default-score 0))
3346 (defun gnus-summary-article-children (&optional number)
3347 "Return a list of article numbers that are children of article NUMBER."
3348 (let* ((data (gnus-data-find-list (or number (gnus-summary-article-number))))
3349 (level (gnus-data-level (car data)))
3351 (while (and (setq data (cdr data))
3352 (> (setq l (gnus-data-level (car data))) level))
3353 (and (= (1+ level) l)
3354 (push (gnus-data-number (car data))
3356 (nreverse children)))
3358 (defun gnus-summary-article-parent (&optional number)
3359 "Return the article number of the parent of article NUMBER."
3360 (let* ((data (gnus-data-find-list (or number (gnus-summary-article-number))
3361 (gnus-data-list t)))
3362 (level (gnus-data-level (car data))))
3364 () ; This is a root.
3365 ;; We search until we find an article with a level less than
3366 ;; this one. That function has to be the parent.
3367 (while (and (setq data (cdr data))
3368 (not (< (gnus-data-level (car data)) level))))
3369 (and data (gnus-data-number (car data))))))
3371 (defun gnus-unread-mark-p (mark)
3372 "Say whether MARK is the unread mark."
3373 (= mark gnus-unread-mark))
3375 (defun gnus-read-mark-p (mark)
3376 "Say whether MARK is one of the marks that mark as read.
3377 This is all marks except unread, ticked, dormant, and expirable."
3378 (not (or (= mark gnus-unread-mark)
3379 (= mark gnus-ticked-mark)
3380 (= mark gnus-spam-mark)
3381 (= mark gnus-dormant-mark)
3382 (= mark gnus-expirable-mark))))
3384 (defmacro gnus-article-mark (number)
3385 "Return the MARK of article NUMBER.
3386 This macro should only be used when computing the mark the \"first\"
3387 time; i.e., when generating the summary lines. After that,
3388 `gnus-summary-article-mark' should be used to examine the
3391 ((memq ,number gnus-newsgroup-unsendable) gnus-unsendable-mark)
3392 ((memq ,number gnus-newsgroup-downloadable) gnus-downloadable-mark)
3393 ((memq ,number gnus-newsgroup-unreads) gnus-unread-mark)
3394 ((memq ,number gnus-newsgroup-marked) gnus-ticked-mark)
3395 ((memq ,number gnus-newsgroup-spam-marked) gnus-spam-mark)
3396 ((memq ,number gnus-newsgroup-dormant) gnus-dormant-mark)
3397 ((memq ,number gnus-newsgroup-expirable) gnus-expirable-mark)
3398 (t (or (cdr (assq ,number gnus-newsgroup-reads))
3399 gnus-ancient-mark))))
3401 ;; Saving hidden threads.
3403 (defmacro gnus-save-hidden-threads (&rest forms)
3404 "Save hidden threads, eval FORMS, and restore the hidden threads."
3405 (let ((config (make-symbol "config")))
3406 `(let ((,config (gnus-hidden-threads-configuration)))
3410 (gnus-restore-hidden-threads-configuration ,config)))))
3411 (put 'gnus-save-hidden-threads 'lisp-indent-function 0)
3412 (put 'gnus-save-hidden-threads 'edebug-form-spec '(body))
3414 (defun gnus-data-compute-positions ()
3415 "Compute the positions of all articles."
3416 (setq gnus-newsgroup-data-reverse nil)
3417 (let ((data gnus-newsgroup-data))
3419 (gnus-save-hidden-threads
3420 (gnus-summary-show-all-threads)
3421 (goto-char (point-min))
3423 (while (get-text-property (point) 'gnus-intangible)
3425 (gnus-data-set-pos (car data) (+ (point) 3))
3426 (setq data (cdr data))
3427 (forward-line 1))))))
3429 (defun gnus-hidden-threads-configuration ()
3430 "Return the current hidden threads configuration."
3433 (goto-char (point-min))
3435 (when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum)
3436 (push (save-excursion (forward-line 0) (point)) config))
3440 (defun gnus-restore-hidden-threads-configuration (config)
3441 "Restore hidden threads configuration from CONFIG."
3443 (let (point (inhibit-read-only t))
3444 (while (setq point (pop config))
3446 (gnus-summary-hide-thread)))))
3448 ;; Various summary mode internalish functions.
3450 (defun gnus-mouse-pick-article (e)
3453 (gnus-summary-next-page nil t))
3455 (defun gnus-summary-set-display-table ()
3456 "Change the display table.
3457 Odd characters have a tendency to mess
3458 up nicely formatted displays - we make all possible glyphs
3459 display only a single character."
3461 ;; We start from the standard display table, if any.
3462 (let ((table (or (copy-sequence standard-display-table)
3463 (make-display-table)))
3465 ;; Nix out all the control chars...
3466 (while (>= (setq i (1- i)) 0)
3467 (gnus-put-display-table i [??] table))
3468 ;; ... but not newline and cr, of course. (cr is necessary for the
3469 ;; selective display).
3470 (gnus-put-display-table ?\n nil table)
3471 (gnus-put-display-table ?\r nil table)
3472 ;; We keep TAB as well.
3473 (gnus-put-display-table ?\t nil table)
3474 ;; We nix out any glyphs 127 through 255, or 127 through 159 in
3475 ;; Emacs 23 (unicode), that are not set already.
3476 (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
3479 (while (>= (setq i (1- i)) 127)
3480 ;; Only modify if the entry is nil.
3481 (unless (gnus-get-display-table i table)
3482 (gnus-put-display-table i [??] table))))
3483 (setq buffer-display-table table)))
3485 (defun gnus-summary-set-article-display-arrow (pos)
3486 "Update the overlay arrow to point to line at position POS."
3487 (when gnus-summary-display-arrow
3488 (make-local-variable 'overlay-arrow-position)
3489 (make-local-variable 'overlay-arrow-string)
3493 (unless overlay-arrow-position
3494 (setq overlay-arrow-position (make-marker)))
3495 (setq overlay-arrow-string "=>"
3496 overlay-arrow-position (set-marker overlay-arrow-position
3498 (current-buffer))))))
3500 (defun gnus-summary-setup-buffer (group)
3501 "Initialize summary buffer."
3502 (let ((buffer (gnus-summary-buffer-name group))
3503 (dead-name (concat "*Dead Summary "
3504 (gnus-group-decoded-name group) "*")))
3505 ;; If a dead summary buffer exists, we kill it.
3506 (when (gnus-buffer-live-p dead-name)
3507 (gnus-kill-buffer dead-name))
3508 (if (get-buffer buffer)
3511 (setq gnus-summary-buffer (current-buffer))
3512 (not gnus-newsgroup-prepared))
3513 ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu>
3514 (setq gnus-summary-buffer (set-buffer (gnus-get-buffer-create buffer)))
3515 (gnus-summary-mode group)
3516 (when (gnus-group-quit-config group)
3517 (set (make-local-variable 'gnus-single-article-buffer) nil))
3518 (make-local-variable 'gnus-article-buffer)
3519 (make-local-variable 'gnus-article-current)
3520 (make-local-variable 'gnus-original-article-buffer)
3521 (setq gnus-newsgroup-name group)
3522 ;; Set any local variables in the group parameters.
3523 (gnus-summary-set-local-parameters gnus-newsgroup-name)
3526 (defun gnus-set-global-variables ()
3527 "Set the global equivalents of the buffer-local variables.
3528 They are set to the latest values they had. These reflect the summary
3529 buffer that was in action when the last article was fetched."
3530 (when (eq major-mode 'gnus-summary-mode)
3531 (setq gnus-summary-buffer (current-buffer))
3532 (let ((name gnus-newsgroup-name)
3533 (marked gnus-newsgroup-marked)
3534 (spam gnus-newsgroup-spam-marked)
3535 (unread gnus-newsgroup-unreads)
3536 (headers gnus-current-headers)
3537 (data gnus-newsgroup-data)
3538 (summary gnus-summary-buffer)
3539 (article-buffer gnus-article-buffer)
3540 (original gnus-original-article-buffer)
3541 (gac gnus-article-current)
3542 (reffed gnus-reffed-article-number)
3543 (score-file gnus-current-score-file)
3544 (default-charset gnus-newsgroup-charset)
3546 (let ((locals gnus-newsgroup-variables))
3548 (if (consp (car locals))
3549 (push (eval (caar locals)) vlist)
3550 (push (eval (car locals)) vlist))
3551 (setq locals (cdr locals)))
3552 (setq vlist (nreverse vlist)))
3553 (with-current-buffer gnus-group-buffer
3554 (setq gnus-newsgroup-name name
3555 gnus-newsgroup-marked marked
3556 gnus-newsgroup-spam-marked spam
3557 gnus-newsgroup-unreads unread
3558 gnus-current-headers headers
3559 gnus-newsgroup-data data
3560 gnus-article-current gac
3561 gnus-summary-buffer summary
3562 gnus-article-buffer article-buffer
3563 gnus-original-article-buffer original
3564 gnus-reffed-article-number reffed
3565 gnus-current-score-file score-file
3566 gnus-newsgroup-charset default-charset)
3567 (let ((locals gnus-newsgroup-variables))
3569 (if (consp (car locals))
3570 (set (caar locals) (pop vlist))
3571 (set (car locals) (pop vlist)))
3572 (setq locals (cdr locals))))
3573 ;; The article buffer also has local variables.
3574 (when (gnus-buffer-live-p gnus-article-buffer)
3575 (set-buffer gnus-article-buffer)
3576 (setq gnus-summary-buffer summary))))))
3578 (defun gnus-summary-article-unread-p (article)
3579 "Say whether ARTICLE is unread or not."
3580 (memq article gnus-newsgroup-unreads))
3582 (defun gnus-summary-first-article-p (&optional article)
3583 "Return whether ARTICLE is the first article in the buffer."
3584 (if (not (setq article (or article (gnus-summary-article-number))))
3586 (eq article (caar gnus-newsgroup-data))))
3588 (defun gnus-summary-last-article-p (&optional article)
3589 "Return whether ARTICLE is the last article in the buffer."
3590 (if (not (setq article (or article (gnus-summary-article-number))))
3591 ;; All non-existent numbers are the last article. :-)
3593 (not (cdr (gnus-data-find-list article)))))
3595 (defun gnus-make-thread-indent-array (&optional n)
3597 (progn (setq n 200) nil)
3598 (null gnus-thread-indent-array)
3599 (/= gnus-thread-indent-level gnus-thread-indent-array-level))
3600 (setq gnus-thread-indent-array (make-vector (1+ n) "")
3601 gnus-thread-indent-array-level gnus-thread-indent-level)
3603 (aset gnus-thread-indent-array n
3604 (make-string (* n gnus-thread-indent-level) ? ))
3607 (defun gnus-update-summary-mark-positions ()
3608 "Compute where the summary marks are to go."
3610 (when (gnus-buffer-exists-p gnus-summary-buffer)
3611 (set-buffer gnus-summary-buffer))
3612 (let ((spec gnus-summary-line-format-spec)
3615 (gnus-set-work-buffer)
3616 (let ((gnus-tmp-unread ?Z)
3617 (gnus-replied-mark ?Z)
3618 (gnus-score-below-mark ?Z)
3619 (gnus-score-over-mark ?Z)
3620 (gnus-undownloaded-mark ?Z)
3621 (gnus-summary-line-format-spec spec)
3622 (gnus-newsgroup-downloadable '(0))
3623 (header [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil])
3624 case-fold-search ignores)
3625 ;; Here, all marks are bound to Z.
3626 (gnus-summary-insert-line header
3627 0 nil t gnus-tmp-unread t nil "" nil 1)
3628 (goto-char (point-min))
3629 ;; Memorize the positions of the same characters as dummy marks.
3630 (while (re-search-forward "[A-D]" nil t)
3631 (push (point) ignores))
3633 ;; We use A-D as dummy marks in order to know column positions
3634 ;; where marks should be inserted.
3635 (setq gnus-tmp-unread ?A
3636 gnus-replied-mark ?B
3637 gnus-score-below-mark ?C
3638 gnus-score-over-mark ?C
3639 gnus-undownloaded-mark ?D)
3640 (gnus-summary-insert-line header
3641 0 nil t gnus-tmp-unread t nil "" nil 1)
3642 ;; Ignore characters which aren't dummy marks.
3644 (delete-region (goto-char (1- p)) p)
3646 (goto-char (point-min))
3647 (setq pos (list (cons 'unread
3648 (and (search-forward "A" nil t)
3649 (- (point) (point-min) 1)))))
3650 (goto-char (point-min))
3651 (push (cons 'replied (and (search-forward "B" nil t)
3652 (- (point) (point-min) 1)))
3654 (goto-char (point-min))
3655 (push (cons 'score (and (search-forward "C" nil t)
3656 (- (point) (point-min) 1)))
3658 (goto-char (point-min))
3659 (push (cons 'download (and (search-forward "D" nil t)
3660 (- (point) (point-min) 1)))
3662 (setq gnus-summary-mark-positions pos))))
3664 (defun gnus-summary-insert-dummy-line (gnus-tmp-subject gnus-tmp-number)
3665 "Insert a dummy root in the summary buffer."
3667 (gnus-add-text-properties
3668 (point) (progn (eval gnus-summary-dummy-line-format-spec) (point))
3669 (list 'gnus-number gnus-tmp-number 'gnus-intangible gnus-tmp-number)))
3671 (defun gnus-summary-extract-address-component (from)
3672 (or (car (funcall gnus-extract-address-components from))
3675 (defun gnus-summary-from-or-to-or-newsgroups (header gnus-tmp-from)
3676 (let ((mail-parse-charset gnus-newsgroup-charset)
3677 (ignored-from-addresses (gnus-ignored-from-addresses))
3678 ; Is it really necessary to do this next part for each summary line?
3679 ; Luckily, doesn't seem to slow things down much.
3680 (mail-parse-ignored-charsets
3681 (with-current-buffer gnus-summary-buffer
3682 gnus-newsgroup-ignored-charsets)))
3684 (and ignored-from-addresses
3685 (string-match ignored-from-addresses gnus-tmp-from)
3686 (let ((extra-headers (mail-header-extra header))
3690 ((setq to (cdr (assq 'To extra-headers)))
3691 (concat gnus-summary-to-prefix
3693 (gnus-summary-extract-address-component
3694 (funcall gnus-decode-encoded-address-function to)))))
3697 (cdr (assq 'Newsgroups extra-headers))
3699 (memq 'Newsgroups gnus-extra-headers)
3700 (eq (car (gnus-find-method-for-group
3701 gnus-newsgroup-name)) 'nntp)
3702 (gnus-group-real-name gnus-newsgroup-name))))
3703 (concat gnus-summary-newsgroup-prefix newsgroups)))))
3704 (inline (gnus-summary-extract-address-component gnus-tmp-from)))))
3706 (defun gnus-summary-insert-line (gnus-tmp-header
3707 gnus-tmp-level gnus-tmp-current
3708 undownloaded gnus-tmp-unread gnus-tmp-replied
3709 gnus-tmp-expirable gnus-tmp-subject-or-nil
3710 &optional gnus-tmp-dummy gnus-tmp-score
3712 (if (>= gnus-tmp-level (length gnus-thread-indent-array))
3713 (gnus-make-thread-indent-array (max (* 2 (length gnus-thread-indent-array))
3715 (let* ((gnus-tmp-indentation (aref gnus-thread-indent-array gnus-tmp-level))
3716 (gnus-tmp-lines (mail-header-lines gnus-tmp-header))
3717 (gnus-tmp-score (or gnus-tmp-score gnus-summary-default-score 0))
3718 (gnus-tmp-score-char
3719 (if (or (null gnus-summary-default-score)
3720 (<= (abs (- gnus-tmp-score gnus-summary-default-score))
3721 gnus-summary-zcore-fuzz))
3723 (if (< gnus-tmp-score gnus-summary-default-score)
3724 gnus-score-below-mark gnus-score-over-mark)))
3725 (gnus-tmp-number (mail-header-number gnus-tmp-header))
3727 (cond (gnus-tmp-process gnus-process-mark)
3728 ((memq gnus-tmp-current gnus-newsgroup-cached)
3730 (gnus-tmp-replied gnus-replied-mark)
3731 ((memq gnus-tmp-current gnus-newsgroup-forwarded)
3732 gnus-forwarded-mark)
3733 ((memq gnus-tmp-current gnus-newsgroup-saved)
3735 ((memq gnus-tmp-number gnus-newsgroup-recent)
3737 ((memq gnus-tmp-number gnus-newsgroup-unseen)
3740 (gnus-tmp-downloaded
3742 gnus-undownloaded-mark)
3743 (gnus-newsgroup-agentized
3744 gnus-downloaded-mark)