* erc-stamp.el (erc-echo-timestamp):
[emacs.git] / lisp / gnus / gnus.el
blobbd96e52d65f13ff316267e0d10fa4249d2f23086
1 ;;; gnus.el --- a newsreader for GNU Emacs
3 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998,
4 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7 ;; Lars Magne Ingebrigtsen <larsi@gnus.org>
8 ;; Keywords: news, mail
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
27 ;;; Commentary:
29 ;;; Code:
31 (eval '(run-hooks 'gnus-load-hook))
33 (eval-when-compile (require 'cl))
34 (require 'wid-edit)
35 (require 'mm-util)
36 (require 'nnheader)
38 ;; These are defined afterwards with gnus-define-group-parameter
39 (defvar gnus-ham-process-destinations)
40 (defvar gnus-parameter-ham-marks-alist)
41 (defvar gnus-parameter-spam-marks-alist)
42 (defvar gnus-spam-autodetect)
43 (defvar gnus-spam-autodetect-methods)
44 (defvar gnus-spam-newsgroup-contents)
45 (defvar gnus-spam-process-destinations)
46 (defvar gnus-spam-resend-to)
47 (defvar gnus-ham-resend-to)
48 (defvar gnus-spam-process-newsgroups)
51 (defgroup gnus nil
52 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
53 :group 'news
54 :group 'mail)
56 (defgroup gnus-start nil
57 "Starting your favorite newsreader."
58 :group 'gnus)
60 (defgroup gnus-format nil
61 "Dealing with formatting issues."
62 :group 'gnus)
64 (defgroup gnus-charset nil
65 "Group character set issues."
66 :link '(custom-manual "(gnus)Charsets")
67 :version "21.1"
68 :group 'gnus)
70 (defgroup gnus-cache nil
71 "Cache interface."
72 :link '(custom-manual "(gnus)Article Caching")
73 :group 'gnus)
75 (defgroup gnus-registry nil
76 "Article Registry."
77 :group 'gnus)
79 (defgroup gnus-start-server nil
80 "Server options at startup."
81 :group 'gnus-start)
83 ;; These belong to gnus-group.el.
84 (defgroup gnus-group nil
85 "Group buffers."
86 :link '(custom-manual "(gnus)Group Buffer")
87 :group 'gnus)
89 (defgroup gnus-group-foreign nil
90 "Foreign groups."
91 :link '(custom-manual "(gnus)Foreign Groups")
92 :group 'gnus-group)
94 (defgroup gnus-group-new nil
95 "Automatic subscription of new groups."
96 :group 'gnus-group)
98 (defgroup gnus-group-levels nil
99 "Group levels."
100 :link '(custom-manual "(gnus)Group Levels")
101 :group 'gnus-group)
103 (defgroup gnus-group-select nil
104 "Selecting a Group."
105 :link '(custom-manual "(gnus)Selecting a Group")
106 :group 'gnus-group)
108 (defgroup gnus-group-listing nil
109 "Showing slices of the group list."
110 :link '(custom-manual "(gnus)Listing Groups")
111 :group 'gnus-group)
113 (defgroup gnus-group-visual nil
114 "Sorting the group buffer."
115 :link '(custom-manual "(gnus)Group Buffer Format")
116 :group 'gnus-group
117 :group 'gnus-visual)
119 (defgroup gnus-group-various nil
120 "Various group options."
121 :link '(custom-manual "(gnus)Scanning New Messages")
122 :group 'gnus-group)
124 ;; These belong to gnus-sum.el.
125 (defgroup gnus-summary nil
126 "Summary buffers."
127 :link '(custom-manual "(gnus)Summary Buffer")
128 :group 'gnus)
130 (defgroup gnus-summary-exit nil
131 "Leaving summary buffers."
132 :link '(custom-manual "(gnus)Exiting the Summary Buffer")
133 :group 'gnus-summary)
135 (defgroup gnus-summary-marks nil
136 "Marks used in summary buffers."
137 :link '(custom-manual "(gnus)Marking Articles")
138 :group 'gnus-summary)
140 (defgroup gnus-thread nil
141 "Ordering articles according to replies."
142 :link '(custom-manual "(gnus)Threading")
143 :group 'gnus-summary)
145 (defgroup gnus-summary-format nil
146 "Formatting of the summary buffer."
147 :link '(custom-manual "(gnus)Summary Buffer Format")
148 :group 'gnus-summary)
150 (defgroup gnus-summary-choose nil
151 "Choosing Articles."
152 :link '(custom-manual "(gnus)Choosing Articles")
153 :group 'gnus-summary)
155 (defgroup gnus-summary-maneuvering nil
156 "Summary movement commands."
157 :link '(custom-manual "(gnus)Summary Maneuvering")
158 :group 'gnus-summary)
160 (defgroup gnus-picon nil
161 "Show pictures of people, domains, and newsgroups."
162 :group 'gnus-visual)
164 (defgroup gnus-summary-mail nil
165 "Mail group commands."
166 :link '(custom-manual "(gnus)Mail Group Commands")
167 :group 'gnus-summary)
169 (defgroup gnus-summary-sort nil
170 "Sorting the summary buffer."
171 :link '(custom-manual "(gnus)Sorting the Summary Buffer")
172 :group 'gnus-summary)
174 (defgroup gnus-summary-visual nil
175 "Highlighting and menus in the summary buffer."
176 :link '(custom-manual "(gnus)Summary Highlighting")
177 :group 'gnus-visual
178 :group 'gnus-summary)
180 (defgroup gnus-summary-various nil
181 "Various summary buffer options."
182 :link '(custom-manual "(gnus)Various Summary Stuff")
183 :group 'gnus-summary)
185 (defgroup gnus-summary-pick nil
186 "Pick mode in the summary buffer."
187 :link '(custom-manual "(gnus)Pick and Read")
188 :prefix "gnus-pick-"
189 :group 'gnus-summary)
191 (defgroup gnus-summary-tree nil
192 "Tree display of threads in the summary buffer."
193 :link '(custom-manual "(gnus)Tree Display")
194 :prefix "gnus-tree-"
195 :group 'gnus-summary)
197 ;; Belongs to gnus-uu.el
198 (defgroup gnus-extract-view nil
199 "Viewing extracted files."
200 :link '(custom-manual "(gnus)Viewing Files")
201 :group 'gnus-extract)
203 ;; Belongs to gnus-score.el
204 (defgroup gnus-score nil
205 "Score and kill file handling."
206 :group 'gnus)
208 (defgroup gnus-score-kill nil
209 "Kill files."
210 :group 'gnus-score)
212 (defgroup gnus-score-adapt nil
213 "Adaptive score files."
214 :group 'gnus-score)
216 (defgroup gnus-score-default nil
217 "Default values for score files."
218 :group 'gnus-score)
220 (defgroup gnus-score-expire nil
221 "Expiring score rules."
222 :group 'gnus-score)
224 (defgroup gnus-score-decay nil
225 "Decaying score rules."
226 :group 'gnus-score)
228 (defgroup gnus-score-files nil
229 "Score and kill file names."
230 :group 'gnus-score
231 :group 'gnus-files)
233 (defgroup gnus-score-various nil
234 "Various scoring and killing options."
235 :group 'gnus-score)
237 ;; Other
238 (defgroup gnus-visual nil
239 "Options controlling the visual fluff."
240 :group 'gnus
241 :group 'faces)
243 (defgroup gnus-agent nil
244 "Offline support for Gnus."
245 :group 'gnus)
247 (defgroup gnus-files nil
248 "Files used by Gnus."
249 :group 'gnus)
251 (defgroup gnus-dribble-file nil
252 "Auto save file."
253 :link '(custom-manual "(gnus)Auto Save")
254 :group 'gnus-files)
256 (defgroup gnus-newsrc nil
257 "Storing Gnus state."
258 :group 'gnus-files)
260 (defgroup gnus-server nil
261 "Options related to newsservers and other servers used by Gnus."
262 :group 'gnus)
264 (defgroup gnus-server-visual nil
265 "Highlighting and menus in the server buffer."
266 :group 'gnus-visual
267 :group 'gnus-server)
269 (defgroup gnus-message '((message custom-group))
270 "Composing replies and followups in Gnus."
271 :group 'gnus)
273 (defgroup gnus-meta nil
274 "Meta variables controlling major portions of Gnus.
275 In general, modifying these variables does not take affect until Gnus
276 is restarted, and sometimes reloaded."
277 :group 'gnus)
279 (defgroup gnus-various nil
280 "Other Gnus options."
281 :link '(custom-manual "(gnus)Various Various")
282 :group 'gnus)
284 (defgroup gnus-exit nil
285 "Exiting Gnus."
286 :link '(custom-manual "(gnus)Exiting Gnus")
287 :group 'gnus)
289 (defgroup gnus-fun nil
290 "Frivolous Gnus extensions."
291 :link '(custom-manual "(gnus)Exiting Gnus")
292 :group 'gnus)
294 (defconst gnus-version-number "5.13"
295 "Version number for this version of Gnus.")
297 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
298 "Version string for this version of Gnus.")
300 (defcustom gnus-inhibit-startup-message nil
301 "If non-nil, the startup message will not be displayed.
302 This variable is used before `.gnus.el' is loaded, so it should
303 be set in `.emacs' instead."
304 :group 'gnus-start
305 :type 'boolean)
307 (defcustom gnus-play-startup-jingle nil
308 "If non-nil, play the Gnus jingle at startup."
309 :group 'gnus-start
310 :type 'boolean)
312 (unless (fboundp 'gnus-group-remove-excess-properties)
313 (defalias 'gnus-group-remove-excess-properties 'ignore))
315 (unless (featurep 'gnus-xmas)
316 (defalias 'gnus-make-overlay 'make-overlay)
317 (defalias 'gnus-delete-overlay 'delete-overlay)
318 (defalias 'gnus-overlay-put 'overlay-put)
319 (defalias 'gnus-move-overlay 'move-overlay)
320 (defalias 'gnus-overlay-buffer 'overlay-buffer)
321 (defalias 'gnus-overlay-start 'overlay-start)
322 (defalias 'gnus-overlay-end 'overlay-end)
323 (defalias 'gnus-extent-detached-p 'ignore)
324 (defalias 'gnus-extent-start-open 'ignore)
325 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
326 (defalias 'gnus-character-to-event 'identity)
327 (defalias 'gnus-assq-delete-all 'assq-delete-all)
328 (defalias 'gnus-add-text-properties 'add-text-properties)
329 (defalias 'gnus-put-text-property 'put-text-property)
330 (defvar gnus-mode-line-image-cache t)
331 (if (fboundp 'find-image)
332 (defun gnus-mode-line-buffer-identification (line)
333 (let ((str (car-safe line))
334 (load-path (mm-image-load-path)))
335 (if (and (stringp str)
336 (string-match "^Gnus:" str))
337 (progn (add-text-properties
339 (list 'display
340 (if (eq t gnus-mode-line-image-cache)
341 (setq gnus-mode-line-image-cache
342 (find-image
343 '((:type xpm :file "gnus-pointer.xpm"
344 :ascent center)
345 (:type xbm :file "gnus-pointer.xbm"
346 :ascent center))))
347 gnus-mode-line-image-cache)
348 'help-echo (format
349 "This is %s, %s."
350 gnus-version (gnus-emacs-version)))
351 str)
352 (list str))
353 line)))
354 (defalias 'gnus-mode-line-buffer-identification 'identity))
355 (defalias 'gnus-characterp 'numberp)
356 (defalias 'gnus-deactivate-mark 'deactivate-mark)
357 (defalias 'gnus-window-edges 'window-edges)
358 (defalias 'gnus-key-press-event-p 'numberp)
359 ;;(defalias 'gnus-decode-rfc1522 'ignore)
362 ;; We define these group faces here to avoid the display
363 ;; update forced when creating new faces.
365 (defface gnus-group-news-1
366 '((((class color)
367 (background dark))
368 (:foreground "PaleTurquoise" :bold t))
369 (((class color)
370 (background light))
371 (:foreground "ForestGreen" :bold t))
373 ()))
374 "Level 1 newsgroup face."
375 :group 'gnus-group)
376 ;; backward-compatibility alias
377 (put 'gnus-group-news-1-face 'face-alias 'gnus-group-news-1)
379 (defface gnus-group-news-1-empty
380 '((((class color)
381 (background dark))
382 (:foreground "PaleTurquoise"))
383 (((class color)
384 (background light))
385 (:foreground "ForestGreen"))
387 ()))
388 "Level 1 empty newsgroup face."
389 :group 'gnus-group)
390 ;; backward-compatibility alias
391 (put 'gnus-group-news-1-empty-face 'face-alias 'gnus-group-news-1-empty)
393 (defface gnus-group-news-2
394 '((((class color)
395 (background dark))
396 (:foreground "turquoise" :bold t))
397 (((class color)
398 (background light))
399 (:foreground "CadetBlue4" :bold t))
401 ()))
402 "Level 2 newsgroup face."
403 :group 'gnus-group)
404 ;; backward-compatibility alias
405 (put 'gnus-group-news-2-face 'face-alias 'gnus-group-news-2)
407 (defface gnus-group-news-2-empty
408 '((((class color)
409 (background dark))
410 (:foreground "turquoise"))
411 (((class color)
412 (background light))
413 (:foreground "CadetBlue4"))
415 ()))
416 "Level 2 empty newsgroup face."
417 :group 'gnus-group)
418 ;; backward-compatibility alias
419 (put 'gnus-group-news-2-empty-face 'face-alias 'gnus-group-news-2-empty)
421 (defface gnus-group-news-3
422 '((((class color)
423 (background dark))
424 (:bold t))
425 (((class color)
426 (background light))
427 (:bold t))
429 ()))
430 "Level 3 newsgroup face."
431 :group 'gnus-group)
432 ;; backward-compatibility alias
433 (put 'gnus-group-news-3-face 'face-alias 'gnus-group-news-3)
435 (defface gnus-group-news-3-empty
436 '((((class color)
437 (background dark))
439 (((class color)
440 (background light))
443 ()))
444 "Level 3 empty newsgroup face."
445 :group 'gnus-group)
446 ;; backward-compatibility alias
447 (put 'gnus-group-news-3-empty-face 'face-alias 'gnus-group-news-3-empty)
449 (defface gnus-group-news-4
450 '((((class color)
451 (background dark))
452 (:bold t))
453 (((class color)
454 (background light))
455 (:bold t))
457 ()))
458 "Level 4 newsgroup face."
459 :group 'gnus-group)
460 ;; backward-compatibility alias
461 (put 'gnus-group-news-4-face 'face-alias 'gnus-group-news-4)
463 (defface gnus-group-news-4-empty
464 '((((class color)
465 (background dark))
467 (((class color)
468 (background light))
471 ()))
472 "Level 4 empty newsgroup face."
473 :group 'gnus-group)
474 ;; backward-compatibility alias
475 (put 'gnus-group-news-4-empty-face 'face-alias 'gnus-group-news-4-empty)
477 (defface gnus-group-news-5
478 '((((class color)
479 (background dark))
480 (:bold t))
481 (((class color)
482 (background light))
483 (:bold t))
485 ()))
486 "Level 5 newsgroup face."
487 :group 'gnus-group)
488 ;; backward-compatibility alias
489 (put 'gnus-group-news-5-face 'face-alias 'gnus-group-news-5)
491 (defface gnus-group-news-5-empty
492 '((((class color)
493 (background dark))
495 (((class color)
496 (background light))
499 ()))
500 "Level 5 empty newsgroup face."
501 :group 'gnus-group)
502 ;; backward-compatibility alias
503 (put 'gnus-group-news-5-empty-face 'face-alias 'gnus-group-news-5-empty)
505 (defface gnus-group-news-6
506 '((((class color)
507 (background dark))
508 (:bold t))
509 (((class color)
510 (background light))
511 (:bold t))
513 ()))
514 "Level 6 newsgroup face."
515 :group 'gnus-group)
516 ;; backward-compatibility alias
517 (put 'gnus-group-news-6-face 'face-alias 'gnus-group-news-6)
519 (defface gnus-group-news-6-empty
520 '((((class color)
521 (background dark))
523 (((class color)
524 (background light))
527 ()))
528 "Level 6 empty newsgroup face."
529 :group 'gnus-group)
530 ;; backward-compatibility alias
531 (put 'gnus-group-news-6-empty-face 'face-alias 'gnus-group-news-6-empty)
533 (defface gnus-group-news-low
534 '((((class color)
535 (background dark))
536 (:foreground "DarkTurquoise" :bold t))
537 (((class color)
538 (background light))
539 (:foreground "DarkGreen" :bold t))
541 ()))
542 "Low level newsgroup face."
543 :group 'gnus-group)
544 ;; backward-compatibility alias
545 (put 'gnus-group-news-low-face 'face-alias 'gnus-group-news-low)
547 (defface gnus-group-news-low-empty
548 '((((class color)
549 (background dark))
550 (:foreground "DarkTurquoise"))
551 (((class color)
552 (background light))
553 (:foreground "DarkGreen"))
555 ()))
556 "Low level empty newsgroup face."
557 :group 'gnus-group)
558 ;; backward-compatibility alias
559 (put 'gnus-group-news-low-empty-face 'face-alias 'gnus-group-news-low-empty)
561 (defface gnus-group-mail-1
562 '((((class color)
563 (background dark))
564 (:foreground "#e1ffe1" :bold t))
565 (((class color)
566 (background light))
567 (:foreground "DeepPink3" :bold t))
569 (:bold t)))
570 "Level 1 mailgroup face."
571 :group 'gnus-group)
572 ;; backward-compatibility alias
573 (put 'gnus-group-mail-1-face 'face-alias 'gnus-group-mail-1)
575 (defface gnus-group-mail-1-empty
576 '((((class color)
577 (background dark))
578 (:foreground "#e1ffe1"))
579 (((class color)
580 (background light))
581 (:foreground "DeepPink3"))
583 (:italic t :bold t)))
584 "Level 1 empty mailgroup face."
585 :group 'gnus-group)
586 ;; backward-compatibility alias
587 (put 'gnus-group-mail-1-empty-face 'face-alias 'gnus-group-mail-1-empty)
589 (defface gnus-group-mail-2
590 '((((class color)
591 (background dark))
592 (:foreground "DarkSeaGreen1" :bold t))
593 (((class color)
594 (background light))
595 (:foreground "HotPink3" :bold t))
597 (:bold t)))
598 "Level 2 mailgroup face."
599 :group 'gnus-group)
600 ;; backward-compatibility alias
601 (put 'gnus-group-mail-2-face 'face-alias 'gnus-group-mail-2)
603 (defface gnus-group-mail-2-empty
604 '((((class color)
605 (background dark))
606 (:foreground "DarkSeaGreen1"))
607 (((class color)
608 (background light))
609 (:foreground "HotPink3"))
611 (:bold t)))
612 "Level 2 empty mailgroup face."
613 :group 'gnus-group)
614 ;; backward-compatibility alias
615 (put 'gnus-group-mail-2-empty-face 'face-alias 'gnus-group-mail-2-empty)
617 (defface gnus-group-mail-3
618 '((((class color)
619 (background dark))
620 (:foreground "aquamarine1" :bold t))
621 (((class color)
622 (background light))
623 (:foreground "magenta4" :bold t))
625 (:bold t)))
626 "Level 3 mailgroup face."
627 :group 'gnus-group)
628 ;; backward-compatibility alias
629 (put 'gnus-group-mail-3-face 'face-alias 'gnus-group-mail-3)
631 (defface gnus-group-mail-3-empty
632 '((((class color)
633 (background dark))
634 (:foreground "aquamarine1"))
635 (((class color)
636 (background light))
637 (:foreground "magenta4"))
639 ()))
640 "Level 3 empty mailgroup face."
641 :group 'gnus-group)
642 ;; backward-compatibility alias
643 (put 'gnus-group-mail-3-empty-face 'face-alias 'gnus-group-mail-3-empty)
645 (defface gnus-group-mail-low
646 '((((class color)
647 (background dark))
648 (:foreground "aquamarine2" :bold t))
649 (((class color)
650 (background light))
651 (:foreground "DeepPink4" :bold t))
653 (:bold t)))
654 "Low level mailgroup face."
655 :group 'gnus-group)
656 ;; backward-compatibility alias
657 (put 'gnus-group-mail-low-face 'face-alias 'gnus-group-mail-low)
659 (defface gnus-group-mail-low-empty
660 '((((class color)
661 (background dark))
662 (:foreground "aquamarine2"))
663 (((class color)
664 (background light))
665 (:foreground "DeepPink4"))
667 (:bold t)))
668 "Low level empty mailgroup face."
669 :group 'gnus-group)
670 ;; backward-compatibility alias
671 (put 'gnus-group-mail-low-empty-face 'face-alias 'gnus-group-mail-low-empty)
673 ;; Summary mode faces.
675 (defface gnus-summary-selected '((t (:underline t)))
676 "Face used for selected articles."
677 :group 'gnus-summary)
678 ;; backward-compatibility alias
679 (put 'gnus-summary-selected-face 'face-alias 'gnus-summary-selected)
681 (defface gnus-summary-cancelled
682 '((((class color))
683 (:foreground "yellow" :background "black")))
684 "Face used for cancelled articles."
685 :group 'gnus-summary)
686 ;; backward-compatibility alias
687 (put 'gnus-summary-cancelled-face 'face-alias 'gnus-summary-cancelled)
689 (defface gnus-summary-high-ticked
690 '((((class color)
691 (background dark))
692 (:foreground "pink" :bold t))
693 (((class color)
694 (background light))
695 (:foreground "firebrick" :bold t))
697 (:bold t)))
698 "Face used for high interest ticked articles."
699 :group 'gnus-summary)
700 ;; backward-compatibility alias
701 (put 'gnus-summary-high-ticked-face 'face-alias 'gnus-summary-high-ticked)
703 (defface gnus-summary-low-ticked
704 '((((class color)
705 (background dark))
706 (:foreground "pink" :italic t))
707 (((class color)
708 (background light))
709 (:foreground "firebrick" :italic t))
711 (:italic t)))
712 "Face used for low interest ticked articles."
713 :group 'gnus-summary)
714 ;; backward-compatibility alias
715 (put 'gnus-summary-low-ticked-face 'face-alias 'gnus-summary-low-ticked)
717 (defface gnus-summary-normal-ticked
718 '((((class color)
719 (background dark))
720 (:foreground "pink"))
721 (((class color)
722 (background light))
723 (:foreground "firebrick"))
725 ()))
726 "Face used for normal interest ticked articles."
727 :group 'gnus-summary)
728 ;; backward-compatibility alias
729 (put 'gnus-summary-normal-ticked-face 'face-alias 'gnus-summary-normal-ticked)
731 (defface gnus-summary-high-ancient
732 '((((class color)
733 (background dark))
734 (:foreground "SkyBlue" :bold t))
735 (((class color)
736 (background light))
737 (:foreground "RoyalBlue" :bold t))
739 (:bold t)))
740 "Face used for high interest ancient articles."
741 :group 'gnus-summary)
742 ;; backward-compatibility alias
743 (put 'gnus-summary-high-ancient-face 'face-alias 'gnus-summary-high-ancient)
745 (defface gnus-summary-low-ancient
746 '((((class color)
747 (background dark))
748 (:foreground "SkyBlue" :italic t))
749 (((class color)
750 (background light))
751 (:foreground "RoyalBlue" :italic t))
753 (:italic t)))
754 "Face used for low interest ancient articles."
755 :group 'gnus-summary)
756 ;; backward-compatibility alias
757 (put 'gnus-summary-low-ancient-face 'face-alias 'gnus-summary-low-ancient)
759 (defface gnus-summary-normal-ancient
760 '((((class color)
761 (background dark))
762 (:foreground "SkyBlue"))
763 (((class color)
764 (background light))
765 (:foreground "RoyalBlue"))
767 ()))
768 "Face used for normal interest ancient articles."
769 :group 'gnus-summary)
770 ;; backward-compatibility alias
771 (put 'gnus-summary-normal-ancient-face 'face-alias 'gnus-summary-normal-ancient)
773 (defface gnus-summary-high-undownloaded
774 '((((class color)
775 (background light))
776 (:bold t :foreground "cyan4"))
777 (((class color) (background dark))
778 (:bold t :foreground "LightGray"))
779 (t (:inverse-video t :bold t)))
780 "Face used for high interest uncached articles."
781 :group 'gnus-summary)
782 ;; backward-compatibility alias
783 (put 'gnus-summary-high-undownloaded-face 'face-alias 'gnus-summary-high-undownloaded)
785 (defface gnus-summary-low-undownloaded
786 '((((class color)
787 (background light))
788 (:italic t :foreground "cyan4" :bold nil))
789 (((class color) (background dark))
790 (:italic t :foreground "LightGray" :bold nil))
791 (t (:inverse-video t :italic t)))
792 "Face used for low interest uncached articles."
793 :group 'gnus-summary)
794 ;; backward-compatibility alias
795 (put 'gnus-summary-low-undownloaded-face 'face-alias 'gnus-summary-low-undownloaded)
797 (defface gnus-summary-normal-undownloaded
798 '((((class color)
799 (background light))
800 (:foreground "cyan4" :bold nil))
801 (((class color) (background dark))
802 (:foreground "LightGray" :bold nil))
803 (t (:inverse-video t)))
804 "Face used for normal interest uncached articles."
805 :group 'gnus-summary)
806 ;; backward-compatibility alias
807 (put 'gnus-summary-normal-undownloaded-face 'face-alias 'gnus-summary-normal-undownloaded)
809 (defface gnus-summary-high-unread
810 '((t
811 (:bold t)))
812 "Face used for high interest unread articles."
813 :group 'gnus-summary)
814 ;; backward-compatibility alias
815 (put 'gnus-summary-high-unread-face 'face-alias 'gnus-summary-high-unread)
817 (defface gnus-summary-low-unread
818 '((t
819 (:italic t)))
820 "Face used for low interest unread articles."
821 :group 'gnus-summary)
822 ;; backward-compatibility alias
823 (put 'gnus-summary-low-unread-face 'face-alias 'gnus-summary-low-unread)
825 (defface gnus-summary-normal-unread
826 '((t
827 ()))
828 "Face used for normal interest unread articles."
829 :group 'gnus-summary)
830 ;; backward-compatibility alias
831 (put 'gnus-summary-normal-unread-face 'face-alias 'gnus-summary-normal-unread)
833 (defface gnus-summary-high-read
834 '((((class color)
835 (background dark))
836 (:foreground "PaleGreen"
837 :bold t))
838 (((class color)
839 (background light))
840 (:foreground "DarkGreen"
841 :bold t))
843 (:bold t)))
844 "Face used for high interest read articles."
845 :group 'gnus-summary)
846 ;; backward-compatibility alias
847 (put 'gnus-summary-high-read-face 'face-alias 'gnus-summary-high-read)
849 (defface gnus-summary-low-read
850 '((((class color)
851 (background dark))
852 (:foreground "PaleGreen"
853 :italic t))
854 (((class color)
855 (background light))
856 (:foreground "DarkGreen"
857 :italic t))
859 (:italic t)))
860 "Face used for low interest read articles."
861 :group 'gnus-summary)
862 ;; backward-compatibility alias
863 (put 'gnus-summary-low-read-face 'face-alias 'gnus-summary-low-read)
865 (defface gnus-summary-normal-read
866 '((((class color)
867 (background dark))
868 (:foreground "PaleGreen"))
869 (((class color)
870 (background light))
871 (:foreground "DarkGreen"))
873 ()))
874 "Face used for normal interest read articles."
875 :group 'gnus-summary)
876 ;; backward-compatibility alias
877 (put 'gnus-summary-normal-read-face 'face-alias 'gnus-summary-normal-read)
881 ;;; Gnus buffers
884 (defvar gnus-buffers nil)
886 (defun gnus-get-buffer-create (name)
887 "Do the same as `get-buffer-create', but store the created buffer."
888 (or (get-buffer name)
889 (car (push (get-buffer-create name) gnus-buffers))))
891 (defun gnus-add-buffer ()
892 "Add the current buffer to the list of Gnus buffers."
893 (push (current-buffer) gnus-buffers))
895 (defmacro gnus-kill-buffer (buffer)
896 "Kill BUFFER and remove from the list of Gnus buffers."
897 `(let ((buf ,buffer))
898 (when (gnus-buffer-exists-p buf)
899 (setq gnus-buffers (delete (get-buffer buf) gnus-buffers))
900 (kill-buffer buf))))
902 (defun gnus-buffers ()
903 "Return a list of live Gnus buffers."
904 (while (and gnus-buffers
905 (not (buffer-name (car gnus-buffers))))
906 (pop gnus-buffers))
907 (let ((buffers gnus-buffers))
908 (while (cdr buffers)
909 (if (buffer-name (cadr buffers))
910 (pop buffers)
911 (setcdr buffers (cddr buffers)))))
912 gnus-buffers)
914 ;;; Splash screen.
916 (defvar gnus-group-buffer "*Group*")
918 (eval-and-compile
919 (autoload 'gnus-play-jingle "gnus-audio"))
921 (defface gnus-splash
922 '((((class color)
923 (background dark))
924 (:foreground "#cccccc"))
925 (((class color)
926 (background light))
927 (:foreground "#888888"))
929 ()))
930 "Face for the splash screen."
931 :group 'gnus-start)
932 ;; backward-compatibility alias
933 (put 'gnus-splash-face 'face-alias 'gnus-splash)
935 (defun gnus-splash ()
936 (save-excursion
937 (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer))
938 (let ((buffer-read-only nil))
939 (erase-buffer)
940 (unless gnus-inhibit-startup-message
941 (gnus-group-startup-message)
942 (sit-for 0)
943 (when gnus-play-startup-jingle
944 (gnus-play-jingle))))))
946 (defun gnus-indent-rigidly (start end arg)
947 "Indent rigidly using only spaces and no tabs."
948 (save-excursion
949 (save-restriction
950 (narrow-to-region start end)
951 (let ((tab-width 8))
952 (indent-rigidly start end arg)
953 ;; We translate tabs into spaces -- not everybody uses
954 ;; an 8-character tab.
955 (goto-char (point-min))
956 (while (search-forward "\t" nil t)
957 (replace-match " " t t))))))
959 (defvar gnus-simple-splash nil)
961 ;;(format "%02x%02x%02x" 114 66 20) "724214"
963 (defvar gnus-logo-color-alist
964 '((flame "#cc3300" "#ff2200")
965 (pine "#c0cc93" "#f8ffb8")
966 (moss "#a1cc93" "#d2ffb8")
967 (irish "#04cc90" "#05ff97")
968 (sky "#049acc" "#05deff")
969 (tin "#6886cc" "#82b6ff")
970 (velvet "#7c68cc" "#8c82ff")
971 (grape "#b264cc" "#cf7df")
972 (labia "#cc64c2" "#fd7dff")
973 (berry "#cc6485" "#ff7db5")
974 (dino "#724214" "#1e3f03")
975 (oort "#cccccc" "#888888")
976 (storm "#666699" "#99ccff")
977 (pdino "#9999cc" "#99ccff")
978 (purp "#9999cc" "#666699")
979 (no "#ff0000" "#ffff00")
980 (neutral "#b4b4b4" "#878787")
981 (september "#bf9900" "#ffcc00"))
982 "Color alist used for the Gnus logo.")
984 (defcustom gnus-logo-color-style 'no
985 "*Color styles used for the Gnus logo."
986 :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
987 gnus-logo-color-alist))
988 :group 'gnus-xmas)
990 (defvar gnus-logo-colors
991 (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
992 "Colors used for the Gnus logo.")
994 (defun gnus-group-startup-message (&optional x y)
995 "Insert startup message in current buffer."
996 ;; Insert the message.
997 (erase-buffer)
998 (cond
999 ((and
1000 (fboundp 'find-image)
1001 (display-graphic-p)
1002 (let* ((data-directory (nnheader-find-etc-directory "images/gnus"))
1003 (image-load-path (cond (data-directory
1004 (list data-directory))
1005 ((boundp 'image-load-path)
1006 (symbol-value 'image-load-path))
1007 (t load-path)))
1008 (image (find-image
1009 `((:type xpm :file "gnus.xpm"
1010 :color-symbols
1011 (("thing" . ,(car gnus-logo-colors))
1012 ("shadow" . ,(cadr gnus-logo-colors))
1013 ("oort" . "#eeeeee")
1014 ("background" . ,(face-background 'default))))
1015 (:type pbm :file "gnus.pbm"
1016 ;; Account for the pbm's blackground.
1017 :background ,(face-foreground 'gnus-splash)
1018 :foreground ,(face-background 'default))
1019 (:type xbm :file "gnus.xbm"
1020 ;; Account for the xbm's blackground.
1021 :background ,(face-foreground 'gnus-splash)
1022 :foreground ,(face-background 'default))))))
1023 (when image
1024 (let ((size (image-size image)))
1025 (insert-char ?\n (max 0 (round (- (window-height)
1026 (or y (cdr size)) 1) 2)))
1027 (insert-char ?\ (max 0 (round (- (window-width)
1028 (or x (car size))) 2)))
1029 (insert-image image))
1030 (setq gnus-simple-splash nil)
1031 t))))
1033 (insert
1034 (format " %s
1035 _ ___ _ _
1036 _ ___ __ ___ __ _ ___
1037 __ _ ___ __ ___
1038 _ ___ _
1039 _ _ __ _
1040 ___ __ _
1041 __ _
1042 _ _ _
1043 _ _ _
1044 _ _ _
1045 __ ___
1046 _ _ _ _
1054 ""))
1055 ;; And then hack it.
1056 (gnus-indent-rigidly (point-min) (point-max)
1057 (/ (max (- (window-width) (or x 46)) 0) 2))
1058 (goto-char (point-min))
1059 (forward-line 1)
1060 (let* ((pheight (count-lines (point-min) (point-max)))
1061 (wheight (window-height))
1062 (rest (- wheight pheight)))
1063 (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n)))
1064 ;; Fontify some.
1065 (put-text-property (point-min) (point-max) 'face 'gnus-splash)
1066 (setq gnus-simple-splash t)))
1067 (goto-char (point-min))
1068 (setq mode-line-buffer-identification (concat " " gnus-version))
1069 (set-buffer-modified-p t))
1071 (eval-when (load)
1072 (let ((command (format "%s" this-command)))
1073 (when (string-match "gnus" command)
1074 (if (string-match "gnus-other-frame" command)
1075 (gnus-get-buffer-create gnus-group-buffer)
1076 (gnus-splash)))))
1078 ;;; Do the rest.
1080 (require 'gnus-util)
1081 (require 'nnheader)
1083 (defcustom gnus-parameters nil
1084 "Alist of group parameters.
1086 For example:
1087 ((\"mail\\\\..*\" (gnus-show-threads nil)
1088 (gnus-use-scoring nil)
1089 (gnus-summary-line-format
1090 \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
1091 (gcc-self . t)
1092 (display . all))
1093 (\"mail\\\\.me\" (gnus-use-scoring t))
1094 (\"list\\\\..*\" (total-expire . t)
1095 (broken-reply-to . t)))"
1096 :version "22.1"
1097 :group 'gnus-group-various
1098 :type '(repeat (cons regexp
1099 (repeat sexp))))
1101 (defcustom gnus-parameters-case-fold-search 'default
1102 "If it is t, ignore case of group names specified in `gnus-parameters'.
1103 If it is nil, don't ignore case. If it is `default', which is for the
1104 backward compatibility, use the value of `case-fold-search'."
1105 :version "22.1"
1106 :group 'gnus-group-various
1107 :type '(choice :format "%{%t%}:\n %[Value Menu%] %v"
1108 (const :tag "Use `case-fold-search'" default)
1109 (const nil)
1110 (const t)))
1112 (defvar gnus-group-parameters-more nil)
1114 (defmacro gnus-define-group-parameter (param &rest rest)
1115 "Define a group parameter PARAM.
1116 REST is a plist of following:
1117 :type One of `bool', `list' or nil.
1118 :function The name of the function.
1119 :function-document The documentation of the function.
1120 :parameter-type The type for customizing the parameter.
1121 :parameter-document The documentation for the parameter.
1122 :variable The name of the variable.
1123 :variable-document The documentation for the variable.
1124 :variable-group The group for customizing the variable.
1125 :variable-type The type for customizing the variable.
1126 :variable-default The default value of the variable."
1127 (let* ((type (plist-get rest :type))
1128 (parameter-type (plist-get rest :parameter-type))
1129 (parameter-document (plist-get rest :parameter-document))
1130 (function (or (plist-get rest :function)
1131 (intern (format "gnus-parameter-%s" param))))
1132 (function-document (or (plist-get rest :function-document) ""))
1133 (variable (or (plist-get rest :variable)
1134 (intern (format "gnus-parameter-%s-alist" param))))
1135 (variable-document (or (plist-get rest :variable-document) ""))
1136 (variable-group (plist-get rest :variable-group))
1137 (variable-type (or (plist-get rest :variable-type)
1138 `(quote (repeat
1139 (list (regexp :tag "Group")
1140 ,(car (cdr parameter-type)))))))
1141 (variable-default (plist-get rest :variable-default)))
1142 (list
1143 'progn
1144 `(defcustom ,variable ,variable-default
1145 ,variable-document
1146 :group 'gnus-group-parameter
1147 :group ',variable-group
1148 :type ,variable-type)
1149 `(setq gnus-group-parameters-more
1150 (delq (assq ',param gnus-group-parameters-more)
1151 gnus-group-parameters-more))
1152 `(add-to-list 'gnus-group-parameters-more
1153 (list ',param
1154 ,parameter-type
1155 ,parameter-document))
1156 (if (eq type 'bool)
1157 `(defun ,function (name)
1158 ,function-document
1159 (let ((params (gnus-group-find-parameter name))
1160 val)
1161 (cond
1162 ((memq ',param params)
1164 ((setq val (assq ',param params))
1165 (cdr val))
1166 ((stringp ,variable)
1167 (string-match ,variable name))
1168 (,variable
1169 (let ((alist ,variable)
1170 elem value)
1171 (while (setq elem (pop alist))
1172 (when (and name
1173 (string-match (car elem) name))
1174 (setq alist nil
1175 value (cdr elem))))
1176 (if (consp value) (car value) value))))))
1177 `(defun ,function (name)
1178 ,function-document
1179 (and name
1180 (or (gnus-group-find-parameter name ',param ,(and type t))
1181 (let ((alist ,variable)
1182 elem value)
1183 (while (setq elem (pop alist))
1184 (when (and name
1185 (string-match (car elem) name))
1186 (setq alist nil
1187 value (cdr elem))))
1188 ,(if type
1189 'value
1190 '(if (consp value) (car value) value))))))))))
1192 (defcustom gnus-home-directory "~/"
1193 "Directory variable that specifies the \"home\" directory.
1194 All other Gnus file and directory variables are initialized from this variable."
1195 :group 'gnus-files
1196 :type 'directory)
1198 (defcustom gnus-directory (or (getenv "SAVEDIR")
1199 (nnheader-concat gnus-home-directory "News/"))
1200 "*Directory variable from which all other Gnus file variables are derived.
1202 Note that Gnus is mostly loaded when the `.gnus.el' file is read.
1203 This means that other directory variables that are initialized from
1204 this variable won't be set properly if you set this variable in `.gnus.el'.
1205 Set this variable in `.emacs' instead."
1206 :group 'gnus-files
1207 :type 'directory)
1209 (defcustom gnus-default-directory nil
1210 "*Default directory for all Gnus buffers."
1211 :group 'gnus-files
1212 :type '(choice (const :tag "current" nil)
1213 directory))
1215 ;; Site dependent variables. These variables should be defined in
1216 ;; paths.el.
1218 (defvar gnus-default-nntp-server nil
1219 "Specify a default NNTP server.
1220 This variable should be defined in paths.el, and should never be set
1221 by the user.
1222 If you want to change servers, you should use `gnus-select-method'.
1223 See the documentation to that variable.")
1225 ;; Don't touch this variable.
1226 (defvar gnus-nntp-service "nntp"
1227 "NNTP service name (\"nntp\" or 119).
1228 This is an obsolete variable, which is scarcely used. If you use an
1229 nntp server for your newsgroup and want to change the port number
1230 used to 899, you would say something along these lines:
1232 (setq gnus-select-method '(nntp \"my.nntp.server\" (nntp-port-number 899)))")
1234 (defcustom gnus-nntpserver-file "/etc/nntpserver"
1235 "A file with only the name of the nntp server in it."
1236 :group 'gnus-files
1237 :group 'gnus-server
1238 :type 'file)
1240 (defun gnus-getenv-nntpserver ()
1241 "Find default nntp server.
1242 Check the NNTPSERVER environment variable and the
1243 `gnus-nntpserver-file' file."
1244 (or (getenv "NNTPSERVER")
1245 (and (file-readable-p gnus-nntpserver-file)
1246 (with-temp-buffer
1247 (insert-file-contents gnus-nntpserver-file)
1248 (when (re-search-forward "[^ \t\n\r]+" nil t)
1249 (match-string 0))))))
1251 ;; `M-x customize-variable RET gnus-select-method RET' should work without
1252 ;; starting or even loading Gnus.
1253 ;;;###autoload(when (fboundp 'custom-autoload)
1254 ;;;###autoload (custom-autoload 'gnus-select-method "gnus"))
1256 (defcustom gnus-select-method
1257 (condition-case nil
1258 (nconc
1259 (list 'nntp (or (condition-case nil
1260 (gnus-getenv-nntpserver)
1261 (error nil))
1262 (when (and gnus-default-nntp-server
1263 (not (string= gnus-default-nntp-server "")))
1264 gnus-default-nntp-server)
1265 "news"))
1266 (if (or (null gnus-nntp-service)
1267 (equal gnus-nntp-service "nntp"))
1269 (list gnus-nntp-service)))
1270 (error nil))
1271 "Default method for selecting a newsgroup.
1272 This variable should be a list, where the first element is how the
1273 news is to be fetched, the second is the address.
1275 For instance, if you want to get your news via \"flab.flab.edu\" using
1276 NNTP, you could say:
1278 \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
1280 If you want to use your local spool, say:
1282 \(setq gnus-select-method (list 'nnspool (system-name)))
1284 If you use this variable, you must set `gnus-nntp-server' to nil.
1286 There is a lot more to know about select methods and virtual servers -
1287 see the manual for details."
1288 :group 'gnus-server
1289 :group 'gnus-start
1290 :initialize 'custom-initialize-default
1291 :type 'gnus-select-method)
1293 (defcustom gnus-message-archive-method "archive"
1294 "*Method used for archiving messages you've sent.
1295 This should be a mail method.
1297 See also `gnus-update-message-archive-method'."
1298 :group 'gnus-server
1299 :group 'gnus-message
1300 :type '(choice (const :tag "Default archive method" "archive")
1301 gnus-select-method))
1303 (defcustom gnus-update-message-archive-method nil
1304 "Non-nil means always update the saved \"archive\" method.
1306 The archive method is initially set according to the value of
1307 `gnus-message-archive-method' and is saved in the \"~/.newsrc.eld\" file
1308 so that it may be used as a real method of the server which is named
1309 \"archive\" ever since. If it once has been saved, it will never be
1310 updated if the value of this variable is nil, even if you change the
1311 value of `gnus-message-archive-method' afterward. If you want the
1312 saved \"archive\" method to be updated whenever you change the value of
1313 `gnus-message-archive-method', set this variable to a non-nil value."
1314 :version "23.0" ;; No Gnus
1315 :group 'gnus-server
1316 :group 'gnus-message
1317 :type 'boolean)
1319 (defcustom gnus-message-archive-group nil
1320 "*Name of the group in which to save the messages you've written.
1321 This can either be a string; a list of strings; or an alist
1322 of regexps/functions/forms to be evaluated to return a string (or a list
1323 of strings). The functions are called with the name of the current
1324 group (or nil) as a parameter.
1326 If you want to save your mail in one group and the news articles you
1327 write in another group, you could say something like:
1329 \(setq gnus-message-archive-group
1330 '((if (message-news-p)
1331 \"misc-news\"
1332 \"misc-mail\")))
1334 Normally the group names returned by this variable should be
1335 unprefixed -- which implicitly means \"store on the archive server\".
1336 However, you may wish to store the message on some other server. In
1337 that case, just return a fully prefixed name of the group --
1338 \"nnml+private:mail.misc\", for instance."
1339 :group 'gnus-message
1340 :type '(choice (const :tag "none" nil)
1341 function
1342 sexp
1343 string))
1345 (defcustom gnus-secondary-servers nil
1346 "List of NNTP servers that the user can choose between interactively.
1347 To make Gnus query you for a server, you have to give `gnus' a
1348 non-numeric prefix - `C-u M-x gnus', in short."
1349 :group 'gnus-server
1350 :type '(repeat string))
1352 (defcustom gnus-nntp-server nil
1353 "*The name of the host running the NNTP server.
1354 This variable is semi-obsolete. Use the `gnus-select-method'
1355 variable instead."
1356 :group 'gnus-server
1357 :type '(choice (const :tag "disable" nil)
1358 string))
1360 (defcustom gnus-secondary-select-methods nil
1361 "A list of secondary methods that will be used for reading news.
1362 This is a list where each element is a complete select method (see
1363 `gnus-select-method').
1365 If, for instance, you want to read your mail with the nnml back end,
1366 you could set this variable:
1368 \(setq gnus-secondary-select-methods '((nnml \"\")))"
1369 :group 'gnus-server
1370 :type '(repeat gnus-select-method))
1372 (defvar gnus-backup-default-subscribed-newsgroups
1373 '("news.announce.newusers" "news.groups.questions" "gnu.emacs.gnus")
1374 "Default default new newsgroups the first time Gnus is run.
1375 Should be set in paths.el, and shouldn't be touched by the user.")
1377 (defcustom gnus-local-domain nil
1378 "Local domain name without a host name.
1379 The DOMAINNAME environment variable is used instead if it is defined.
1380 If the function `system-name' returns the full Internet name, there is
1381 no need to set this variable."
1382 :group 'gnus-message
1383 :type '(choice (const :tag "default" nil)
1384 string))
1386 (defvar gnus-local-organization nil
1387 "String with a description of what organization (if any) the user belongs to.
1388 Obsolete variable; use `message-user-organization' instead.")
1390 ;; Customization variables
1392 (defcustom gnus-refer-article-method nil
1393 "Preferred method for fetching an article by Message-ID.
1394 If you are reading news from the local spool (with nnspool), fetching
1395 articles by Message-ID is painfully slow. By setting this method to an
1396 nntp method, you might get acceptable results.
1398 The value of this variable must be a valid select method as discussed
1399 in the documentation of `gnus-select-method'.
1401 It can also be a list of select methods, as well as the special symbol
1402 `current', which means to use the current select method. If it is a
1403 list, Gnus will try all the methods in the list until it finds a match."
1404 :group 'gnus-server
1405 :type '(choice (const :tag "default" nil)
1406 (const current)
1407 (const :tag "Google" (nnweb "refer" (nnweb-type google)))
1408 gnus-select-method
1409 (repeat :menu-tag "Try multiple"
1410 :tag "Multiple"
1411 :value (current (nnweb "refer" (nnweb-type google)))
1412 (choice :tag "Method"
1413 (const current)
1414 (const :tag "Google"
1415 (nnweb "refer" (nnweb-type google)))
1416 gnus-select-method))))
1418 (defcustom gnus-group-faq-directory
1419 '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
1420 "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
1421 "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
1422 "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
1423 "/ftp@ftp.pasteur.fr:/pub/FAQ/"
1424 "/ftp@rtfm.mit.edu:/pub/usenet/"
1425 "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
1426 "/ftp@ftp.sunet.se:/pub/usenet/"
1427 "/ftp@nctuccca.nctu.edu.tw:/pub/Documents/rtfm/usenet-by-group/"
1428 "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
1429 "/ftp@ftp.hk.super.net:/mirror/faqs/")
1430 "*Directory where the group FAQs are stored.
1431 This will most commonly be on a remote machine, and the file will be
1432 fetched by ange-ftp.
1434 This variable can also be a list of directories. In that case, the
1435 first element in the list will be used by default. The others can
1436 be used when being prompted for a site.
1438 Note that Gnus uses an aol machine as the default directory. If this
1439 feels fundamentally unclean, just think of it as a way to finally get
1440 something of value back from them.
1442 If the default site is too slow, try one of these:
1444 North America: mirrors.aol.com /pub/rtfm/usenet
1445 ftp.seas.gwu.edu /pub/rtfm
1446 rtfm.mit.edu /pub/usenet
1447 Europe: ftp.uni-paderborn.de /pub/FAQ
1448 src.doc.ic.ac.uk /usenet/news-FAQS
1449 ftp.sunet.se /pub/usenet
1450 ftp.pasteur.fr /pub/FAQ
1451 Asia: nctuccca.nctu.edu.tw /pub/Documents/rtfm/usenet-by-group/
1452 hwarang.postech.ac.kr /pub/usenet
1453 ftp.hk.super.net /mirror/faqs"
1454 :group 'gnus-group-various
1455 :type '(choice directory
1456 (repeat directory)))
1458 (defcustom gnus-group-charter-alist
1459 '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt"))
1460 ("de" . (concat "http://purl.net/charta/" name ".html"))
1461 ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
1462 ("england" . (concat "http://england.news-admin.org/charters/" name))
1463 ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
1464 ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
1465 (gnus-replace-in-string name "europa\\." "") ".html"))
1466 ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
1467 ("aus" . (concat "http://aus.news-admin.org/groupinfo.cgi/" name))
1468 ("pl" . (concat "http://www.usenet.pl/opisy/" name))
1469 ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
1470 ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
1471 ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
1472 ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
1473 ("se" . (concat "http://www.usenet-se.net/Reglementen/"
1474 (gnus-replace-in-string name "\\." "_") ".html"))
1475 ("milw" . (concat "http://usenet.mil.wi.us/"
1476 (gnus-replace-in-string name "milw\\." "") "-charter"))
1477 ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
1478 ("netins" . (concat "http://www.netins.net/usenet/charter/"
1479 (gnus-replace-in-string name "\\." "-") "-charter.html")))
1480 "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
1481 When FORM is evaluated `name' is bound to the name of the group."
1482 :version "22.1"
1483 :group 'gnus-group-various
1484 :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
1485 (put 'gnus-group-charter-alist 'risky-local-variable t)
1487 (defcustom gnus-group-fetch-control-use-browse-url nil
1488 "*Non-nil means that control messages are displayed using `browse-url'.
1489 Otherwise they are fetched with ange-ftp and displayed in an ephemeral
1490 group."
1491 :version "22.1"
1492 :group 'gnus-group-various
1493 :type 'boolean)
1495 (defcustom gnus-use-cross-reference t
1496 "*Non-nil means that cross referenced articles will be marked as read.
1497 If nil, ignore cross references. If t, mark articles as read in
1498 subscribed newsgroups. If neither t nor nil, mark as read in all
1499 newsgroups."
1500 :group 'gnus-server
1501 :type '(choice (const :tag "off" nil)
1502 (const :tag "subscribed" t)
1503 (sexp :format "all"
1504 :value always)))
1506 (defcustom gnus-process-mark ?#
1507 "*Process mark."
1508 :group 'gnus-group-visual
1509 :group 'gnus-summary-marks
1510 :type 'character)
1512 (defcustom gnus-large-newsgroup 200
1513 "*The number of articles which indicates a large newsgroup.
1514 If the number of articles in a newsgroup is greater than this value,
1515 confirmation is required for selecting the newsgroup.
1516 If it is nil, no confirmation is required."
1517 :group 'gnus-group-select
1518 :type '(choice (const :tag "No limit" nil)
1519 integer))
1521 (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
1522 "*Non-nil means that the default name of a file to save articles in is the group name.
1523 If it's nil, the directory form of the group name is used instead.
1525 If this variable is a list, and the list contains the element
1526 `not-score', long file names will not be used for score files; if it
1527 contains the element `not-save', long file names will not be used for
1528 saving; and if it contains the element `not-kill', long file names
1529 will not be used for kill files.
1531 Note that the default for this variable varies according to what system
1532 type you're using. On `usg-unix-v' and `xenix' this variable defaults
1533 to nil while on all other systems it defaults to t."
1534 :group 'gnus-start
1535 :type '(radio (sexp :format "Non-nil\n"
1536 :match (lambda (widget value)
1537 (and value (not (listp value))))
1538 :value t)
1539 (const nil)
1540 (checklist (const :format "%v " not-score)
1541 (const :format "%v " not-save)
1542 (const not-kill))))
1544 (defcustom gnus-kill-files-directory gnus-directory
1545 "*Name of the directory where kill files will be stored (default \"~/News\")."
1546 :group 'gnus-score-files
1547 :group 'gnus-score-kill
1548 :type 'directory)
1550 (defcustom gnus-save-score nil
1551 "*If non-nil, save group scoring info."
1552 :group 'gnus-score-various
1553 :group 'gnus-start
1554 :type 'boolean)
1556 (defcustom gnus-use-undo t
1557 "*If non-nil, allow undoing in Gnus group mode buffers."
1558 :group 'gnus-meta
1559 :type 'boolean)
1561 (defcustom gnus-use-adaptive-scoring nil
1562 "*If non-nil, use some adaptive scoring scheme.
1563 If a list, then the values `word' and `line' are meaningful. The
1564 former will perform adaption on individual words in the subject
1565 header while `line' will perform adaption on several headers."
1566 :group 'gnus-meta
1567 :group 'gnus-score-adapt
1568 :type '(set (const word) (const line)))
1570 (defcustom gnus-use-cache 'passive
1571 "*If nil, Gnus will ignore the article cache.
1572 If `passive', it will allow entering (and reading) articles
1573 explicitly entered into the cache. If anything else, use the
1574 cache to the full extent of the law."
1575 :group 'gnus-meta
1576 :group 'gnus-cache
1577 :type '(choice (const :tag "off" nil)
1578 (const :tag "passive" passive)
1579 (const :tag "active" t)))
1581 (defcustom gnus-use-trees nil
1582 "*If non-nil, display a thread tree buffer."
1583 :group 'gnus-meta
1584 :type 'boolean)
1586 (defcustom gnus-keep-backlog 20
1587 "*If non-nil, Gnus will keep read articles for later re-retrieval.
1588 If it is a number N, then Gnus will only keep the last N articles
1589 read. If it is neither nil nor a number, Gnus will keep all read
1590 articles. This is not a good idea."
1591 :group 'gnus-meta
1592 :type '(choice (const :tag "off" nil)
1593 integer
1594 (sexp :format "all"
1595 :value t)))
1597 (defcustom gnus-use-nocem nil
1598 "*If non-nil, Gnus will read NoCeM cancel messages.
1599 You can also set this variable to a positive number as a group level.
1600 In that case, Gnus scans NoCeM messages when checking new news if this
1601 value is not exceeding a group level that you specify as the prefix
1602 argument to some commands, e.g. `gnus', `gnus-group-get-new-news', etc.
1603 Otherwise, Gnus does not scan NoCeM messages if you specify a group
1604 level to those commands."
1605 :group 'gnus-meta
1606 :type '(choice
1607 (const :tag "off" nil)
1608 (const :tag "on" t)
1609 (list :convert-widget
1610 (lambda (widget)
1611 (list 'integer :tag "group level"
1612 :value (if (boundp 'gnus-level-default-subscribed)
1613 gnus-level-default-subscribed
1614 3))))))
1616 (defcustom gnus-suppress-duplicates nil
1617 "*If non-nil, Gnus will mark duplicate copies of the same article as read."
1618 :group 'gnus-meta
1619 :type 'boolean)
1621 (defcustom gnus-use-scoring t
1622 "*If non-nil, enable scoring."
1623 :group 'gnus-meta
1624 :type 'boolean)
1626 (defcustom gnus-summary-prepare-exit-hook
1627 '(gnus-summary-expire-articles)
1628 "*A hook called when preparing to exit from the summary buffer.
1629 It calls `gnus-summary-expire-articles' by default."
1630 :group 'gnus-summary-exit
1631 :type 'hook)
1633 (defcustom gnus-novice-user t
1634 "*Non-nil means that you are a Usenet novice.
1635 If non-nil, verbose messages may be displayed and confirmations may be
1636 required."
1637 :group 'gnus-meta
1638 :type 'boolean)
1640 (defcustom gnus-expert-user nil
1641 "*Non-nil means that you will never be asked for confirmation about anything.
1642 That doesn't mean *anything* anything; particularly destructive
1643 commands will still require prompting."
1644 :group 'gnus-meta
1645 :type 'boolean)
1647 (defcustom gnus-interactive-catchup t
1648 "*If non-nil, require your confirmation when catching up a group."
1649 :group 'gnus-group-select
1650 :type 'boolean)
1652 (defcustom gnus-interactive-exit t
1653 "*If non-nil, require your confirmation when exiting Gnus."
1654 :group 'gnus-exit
1655 :type 'boolean)
1657 (defcustom gnus-extract-address-components 'gnus-extract-address-components
1658 "*Function for extracting address components from a From header.
1659 Two pre-defined function exist: `gnus-extract-address-components',
1660 which is the default, quite fast, and too simplistic solution, and
1661 `mail-extract-address-components', which works much better, but is
1662 slower."
1663 :group 'gnus-summary-format
1664 :type '(radio (function-item gnus-extract-address-components)
1665 (function-item mail-extract-address-components)
1666 (function :tag "Other")))
1668 (defcustom gnus-carpal nil
1669 "*If non-nil, display clickable icons."
1670 :group 'gnus-meta
1671 :type 'boolean)
1673 (defcustom gnus-shell-command-separator ";"
1674 "String used to separate shell commands."
1675 :group 'gnus-files
1676 :type 'string)
1678 (defcustom gnus-valid-select-methods
1679 '(("nntp" post address prompt-address physical-address)
1680 ("nnspool" post address)
1681 ("nnvirtual" post-mail virtual prompt-address)
1682 ("nnmbox" mail respool address)
1683 ("nnml" post-mail respool address)
1684 ("nnmh" mail respool address)
1685 ("nndir" post-mail prompt-address physical-address)
1686 ("nneething" none address prompt-address physical-address)
1687 ("nndoc" none address prompt-address)
1688 ("nnbabyl" mail address respool)
1689 ("nnkiboze" post virtual)
1690 ("nnsoup" post-mail address)
1691 ("nndraft" post-mail)
1692 ("nnfolder" mail respool address)
1693 ("nngateway" post-mail address prompt-address physical-address)
1694 ("nnweb" none)
1695 ("nngoogle" post)
1696 ("nnslashdot" post)
1697 ("nnultimate" none)
1698 ("nnrss" none)
1699 ("nnwfm" none)
1700 ("nnwarchive" none)
1701 ("nnlistserv" none)
1702 ("nnagent" post-mail)
1703 ("nnimap" post-mail address prompt-address physical-address)
1704 ("nnmaildir" mail respool address)
1705 ("nnnil" none))
1706 "*An alist of valid select methods.
1707 The first element of each list lists should be a string with the name
1708 of the select method. The other elements may be the category of
1709 this method (i. e., `post', `mail', `none' or whatever) or other
1710 properties that this method has (like being respoolable).
1711 If you implement a new select method, all you should have to change is
1712 this variable. I think."
1713 :group 'gnus-server
1714 :type '(repeat (group (string :tag "Name")
1715 (radio-button-choice (const :format "%v " post)
1716 (const :format "%v " mail)
1717 (const :format "%v " none)
1718 (const post-mail))
1719 (checklist :inline t
1720 (const :format "%v " address)
1721 (const :format "%v " prompt-address)
1722 (const :format "%v " physical-address)
1723 (const :format "%v " virtual)
1724 (const respool)))))
1726 (defun gnus-redefine-select-method-widget ()
1727 "Recomputes the select-method widget based on the value of
1728 `gnus-valid-select-methods'."
1729 (define-widget 'gnus-select-method 'list
1730 "Widget for entering a select method."
1731 :value '(nntp "")
1732 :tag "Select Method"
1733 :args `((choice :tag "Method"
1734 ,@(mapcar (lambda (entry)
1735 (list 'const :format "%v\n"
1736 (intern (car entry))))
1737 gnus-valid-select-methods)
1738 (symbol :tag "other"))
1739 (string :tag "Address")
1740 (repeat :tag "Options"
1741 :inline t
1742 (list :format "%v"
1743 variable
1744 (sexp :tag "Value"))))))
1746 (gnus-redefine-select-method-widget)
1748 (defcustom gnus-updated-mode-lines '(group article summary tree)
1749 "List of buffers that should update their mode lines.
1750 The list may contain the symbols `group', `article', `tree' and
1751 `summary'. If the corresponding symbol is present, Gnus will keep
1752 that mode line updated with information that may be pertinent.
1753 If this variable is nil, screen refresh may be quicker."
1754 :group 'gnus-various
1755 :type '(set (const group)
1756 (const article)
1757 (const summary)
1758 (const tree)))
1760 ;; Added by Keinonen Kari <kk85613@cs.tut.fi>.
1761 (defcustom gnus-mode-non-string-length nil
1762 "*Max length of mode-line non-string contents.
1763 If this is nil, Gnus will take space as is needed, leaving the rest
1764 of the mode line intact. Note that the default of nil is unlikely
1765 to be desirable; see the manual for further details."
1766 :group 'gnus-various
1767 :type '(choice (const nil)
1768 integer))
1770 ;; There should be special validation for this.
1771 (define-widget 'gnus-email-address 'string
1772 "An email address.")
1774 (gnus-define-group-parameter
1775 to-address
1776 :function-document
1777 "Return GROUP's to-address."
1778 :variable-document
1779 "*Alist of group regexps and correspondent to-addresses."
1780 :variable-group gnus-group-parameter
1781 :parameter-type '(gnus-email-address :tag "To Address")
1782 :parameter-document "\
1783 This will be used when doing followups and posts.
1785 This is primarily useful in mail groups that represent closed
1786 mailing lists--mailing lists where it's expected that everybody that
1787 writes to the mailing list is subscribed to it. Since using this
1788 parameter ensures that the mail only goes to the mailing list itself,
1789 it means that members won't receive two copies of your followups.
1791 Using `to-address' will actually work whether the group is foreign or
1792 not. Let's say there's a group on the server that is called
1793 `fa.4ad-l'. This is a real newsgroup, but the server has gotten the
1794 articles from a mail-to-news gateway. Posting directly to this group
1795 is therefore impossible--you have to send mail to the mailing list
1796 address instead.
1798 The gnus-group-split mail splitting mechanism will behave as if this
1799 address was listed in gnus-group-split Addresses (see below).")
1801 (gnus-define-group-parameter
1802 to-list
1803 :function-document
1804 "Return GROUP's to-list."
1805 :variable-document
1806 "*Alist of group regexps and correspondent to-lists."
1807 :variable-group gnus-group-parameter
1808 :parameter-type '(gnus-email-address :tag "To List")
1809 :parameter-document "\
1810 This address will be used when doing a `a' in the group.
1812 It is totally ignored when doing a followup--except that if it is
1813 present in a news group, you'll get mail group semantics when doing
1814 `f'.
1816 The gnus-group-split mail splitting mechanism will behave as if this
1817 address was listed in gnus-group-split Addresses (see below).")
1819 (gnus-define-group-parameter
1820 subscribed
1821 :type bool
1822 :function-document
1823 "Return GROUP's subscription status."
1824 :variable-document
1825 "*Groups which are automatically considered subscribed."
1826 :variable-group gnus-group-parameter
1827 :parameter-type '(const :tag "Subscribed" t)
1828 :parameter-document "\
1829 Gnus assumed that you are subscribed to the To/List address.
1831 When constructing a list of subscribed groups using
1832 `gnus-find-subscribed-addresses', Gnus includes the To address given
1833 above, or the list address (if the To address has not been set).")
1835 (gnus-define-group-parameter
1836 auto-expire
1837 :type bool
1838 :function gnus-group-auto-expirable-p
1839 :function-document
1840 "Check whether GROUP is auto-expirable or not."
1841 :variable gnus-auto-expirable-newsgroups
1842 :variable-default nil
1843 :variable-document
1844 "*Groups in which to automatically mark read articles as expirable.
1845 If non-nil, this should be a regexp that should match all groups in
1846 which to perform auto-expiry. This only makes sense for mail groups."
1847 :variable-group nnmail-expire
1848 :variable-type '(choice (const nil)
1849 regexp)
1850 :parameter-type '(const :tag "Automatic Expire" t)
1851 :parameter-document
1852 "All articles that are read will be marked as expirable.")
1854 (gnus-define-group-parameter
1855 total-expire
1856 :type bool
1857 :function gnus-group-total-expirable-p
1858 :function-document
1859 "Check whether GROUP is total-expirable or not."
1860 :variable gnus-total-expirable-newsgroups
1861 :variable-default nil
1862 :variable-document
1863 "*Groups in which to perform expiry of all read articles.
1864 Use with extreme caution. All groups that match this regexp will be
1865 expiring - which means that all read articles will be deleted after
1866 \(say) one week. (This only goes for mail groups and the like, of
1867 course.)"
1868 :variable-group nnmail-expire
1869 :variable-type '(choice (const nil)
1870 regexp)
1871 :parameter-type '(const :tag "Total Expire" t)
1872 :parameter-document
1873 "All read articles will be put through the expiry process
1875 This happens even if they are not marked as expirable.
1876 Use with caution.")
1878 (gnus-define-group-parameter
1879 charset
1880 :function-document
1881 "Return the default charset of GROUP."
1882 :variable gnus-group-charset-alist
1883 :variable-default
1884 '(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
1885 ("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
1886 ("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
1887 ("\\(^\\|:\\)tnn\\>\\|\\(^\\|:\\)pin\\>\\|\\(^\\|:\\)sci.lang.japan" iso-2022-7bit)
1888 ("\\(^\\|:\\)relcom\\>" koi8-r)
1889 ("\\(^\\|:\\)fido7\\>" koi8-r)
1890 ("\\(^\\|:\\)\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2)
1891 ("\\(^\\|:\\)israel\\>" iso-8859-1)
1892 ("\\(^\\|:\\)han\\>" euc-kr)
1893 ("\\(^\\|:\\)alt.chinese.text.big5\\>" chinese-big5)
1894 ("\\(^\\|:\\)soc.culture.vietnamese\\>" vietnamese-viqr)
1895 ("\\(^\\|:\\)\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1))
1896 :variable-document
1897 "Alist of regexps (to match group names) and default charsets to be used when reading."
1898 :variable-group gnus-charset
1899 :variable-type '(repeat (list (regexp :tag "Group")
1900 (symbol :tag "Charset")))
1901 :parameter-type '(symbol :tag "Charset")
1902 :parameter-document "\
1903 The default charset to use in the group.")
1905 (gnus-define-group-parameter
1906 post-method
1907 :type list
1908 :function-document
1909 "Return a posting method for GROUP."
1910 :variable gnus-post-method-alist
1911 :variable-document
1912 "Alist of regexps (to match group names) and method to be used when
1913 posting an article."
1914 :variable-group gnus-group-foreign
1915 :parameter-type
1916 '(choice :tag "Posting Method"
1917 (const :tag "Use native server" native)
1918 (const :tag "Use current server" current)
1919 (list :convert-widget
1920 (lambda (widget)
1921 (list 'sexp :tag "Methods"
1922 :value gnus-select-method))))
1923 :parameter-document
1924 "Posting method for this group.")
1926 (gnus-define-group-parameter
1927 large-newsgroup-initial
1928 :type integer
1929 :function-document
1930 "Return GROUP's initial input of the number of articles."
1931 :variable-document
1932 "*Alist of group regexps and its initial input of the number of articles."
1933 :variable-group gnus-group-parameter
1934 :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
1935 (const :tag "All" nil)
1936 (integer))
1937 :parameter-document "\
1939 This number will be prompted as the initial value of the number of
1940 articles to list when the group is a large newsgroup (see
1941 `gnus-large-newsgroup'). If it is nil, the default value is the
1942 total number of articles in the group.")
1944 ;; The Gnus registry's ignored groups
1945 (gnus-define-group-parameter
1946 registry-ignore
1947 :type list
1948 :function-document
1949 "Whether this group should be ignored by the registry."
1950 :variable gnus-registry-ignored-groups
1951 :variable-default nil
1952 :variable-document
1953 "*Groups in which the registry should be turned off."
1954 :variable-group gnus-registry
1955 :variable-type '(repeat
1956 (list
1957 (regexp :tag "Group Name Regular Expression")
1958 (boolean :tag "Ignored")))
1960 :parameter-type '(boolean :tag "Group Ignored by the Registry")
1961 :parameter-document
1962 "Whether the Gnus Registry should ignore this group.")
1964 ;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
1965 (defcustom gnus-install-group-spam-parameters t
1966 "*Disable the group parameters for spam detection.
1967 Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report."
1968 :version "22.1"
1969 :type 'boolean
1970 :group 'gnus-start)
1972 (when gnus-install-group-spam-parameters
1973 (defvar gnus-group-spam-classification-spam t
1974 "Spam group classification (requires spam.el).
1975 This group contains spam messages. On summary entry, unread messages
1976 will be marked as spam. On summary exit, the specified spam
1977 processors will be invoked on spam-marked messages, then those
1978 messages will be expired, so the spam processor will only see a
1979 spam-marked message once.")
1981 (defvar gnus-group-spam-classification-ham 'ask
1982 "The ham value for the spam group parameter (requires spam.el).
1983 On summary exit, the specified ham processors will be invoked on
1984 ham-marked messages. Exercise caution, since the ham processor will
1985 see the same message more than once because there is no ham message
1986 registry.")
1988 (gnus-define-group-parameter
1989 spam-contents
1990 :type list
1991 :function-document
1992 "The spam type (spam, ham, or neither) of the group."
1993 :variable gnus-spam-newsgroup-contents
1994 :variable-default nil
1995 :variable-document
1996 "*Group classification (spam, ham, or neither). Only
1997 meaningful when spam.el is loaded. If non-nil, this should be a
1998 list of group name regexps associated with a classification for
1999 each one. In spam groups, new articles are marked as spam on
2000 summary entry. There is other behavior associated with ham and
2001 no classification when spam.el is loaded - see the manual."
2002 :variable-group spam
2003 :variable-type '(repeat
2004 (list :tag "Group contents spam/ham classification"
2005 (regexp :tag "Group")
2006 (choice
2007 (variable-item gnus-group-spam-classification-spam)
2008 (variable-item gnus-group-spam-classification-ham)
2009 (const :tag "Unclassified" nil))))
2011 :parameter-type '(list :tag "Group contents spam/ham classification"
2012 (choice :tag "Group contents classification for spam sorting"
2013 (variable-item gnus-group-spam-classification-spam)
2014 (variable-item gnus-group-spam-classification-ham)
2015 (const :tag "Unclassified" nil)))
2016 :parameter-document
2017 "The spam classification (spam, ham, or neither) of this group.
2018 When a spam group is entered, all unread articles are marked as
2019 spam. There is other behavior associated with ham and no
2020 classification when spam.el is loaded - see the manual.")
2022 (gnus-define-group-parameter
2023 spam-resend-to
2024 :type list
2025 :function-document
2026 "The address to get spam resent (through spam-report-resend)."
2027 :variable gnus-spam-resend-to
2028 :variable-default nil
2029 :variable-document
2030 "The address to get spam resent (through spam-report-resend)."
2031 :variable-group spam
2032 :variable-type '(repeat
2033 (list :tag "Group address for resending spam"
2034 (regexp :tag "Group")
2035 (string :tag "E-mail address for resending spam (requires the spam-use-resend exit processor)")))
2036 :parameter-type 'string :tag "E-mail address for resending spam (requires the spam-use-resend exit processor)"
2037 :parameter-document
2038 "The address to get spam resent (through spam-report-resend).")
2040 (gnus-define-group-parameter
2041 ham-resend-to
2042 :type list
2043 :function-document
2044 "The address to get ham resent (through spam-report-resend)."
2045 :variable gnus-ham-resend-to
2046 :variable-default nil
2047 :variable-document
2048 "The address to get ham resent (through spam-report-resend)."
2049 :variable-group spam
2050 :variable-type '(repeat
2051 (list :tag "Group address for resending ham"
2052 (regexp :tag "Group")
2053 (string :tag "E-mail address for resending ham (requires the spam-use-resend exit processor)")))
2054 :parameter-type 'string :tag "E-mail address for resending ham (requires the spam-use-resend exit processor)"
2055 :parameter-document
2056 "The address to get ham resent (through spam-report-resend).")
2058 (defvar gnus-group-spam-exit-processor-ifile "ifile"
2059 "OBSOLETE: The ifile summary exit spam processor.")
2061 (defvar gnus-group-spam-exit-processor-stat "stat"
2062 "OBSOLETE: The spam-stat summary exit spam processor.")
2064 (defvar gnus-group-spam-exit-processor-bogofilter "bogofilter"
2065 "OBSOLETE: The Bogofilter summary exit spam processor.")
2067 (defvar gnus-group-spam-exit-processor-blacklist "blacklist"
2068 "OBSOLETE: The Blacklist summary exit spam processor.")
2070 (defvar gnus-group-spam-exit-processor-report-gmane "report-gmane"
2071 "OBSOLETE: The Gmane reporting summary exit spam processor.
2072 Only applicable to NNTP groups with articles from Gmane. See spam-report.el")
2074 (defvar gnus-group-spam-exit-processor-spamoracle "spamoracle-spam"
2075 "OBSOLETE: The spamoracle summary exit spam processor.")
2077 (defvar gnus-group-ham-exit-processor-ifile "ifile-ham"
2078 "OBSOLETE: The ifile summary exit ham processor.
2079 Only applicable to non-spam (unclassified and ham) groups.")
2081 (defvar gnus-group-ham-exit-processor-bogofilter "bogofilter-ham"
2082 "OBSOLETE: The Bogofilter summary exit ham processor.
2083 Only applicable to non-spam (unclassified and ham) groups.")
2085 (defvar gnus-group-ham-exit-processor-stat "stat-ham"
2086 "OBSOLETE: The spam-stat summary exit ham processor.
2087 Only applicable to non-spam (unclassified and ham) groups.")
2089 (defvar gnus-group-ham-exit-processor-whitelist "whitelist"
2090 "OBSOLETE: The whitelist summary exit ham processor.
2091 Only applicable to non-spam (unclassified and ham) groups.")
2093 (defvar gnus-group-ham-exit-processor-BBDB "bbdb"
2094 "OBSOLETE: The BBDB summary exit ham processor.
2095 Only applicable to non-spam (unclassified and ham) groups.")
2097 (defvar gnus-group-ham-exit-processor-copy "copy"
2098 "OBSOLETE: The ham copy exit ham processor.
2099 Only applicable to non-spam (unclassified and ham) groups.")
2101 (defvar gnus-group-ham-exit-processor-spamoracle "spamoracle-ham"
2102 "OBSOLETE: The spamoracle summary exit ham processor.
2103 Only applicable to non-spam (unclassified and ham) groups.")
2105 (gnus-define-group-parameter
2106 spam-process
2107 :type list
2108 :parameter-type
2109 '(choice
2110 :tag "Spam Summary Exit Processor"
2111 :value nil
2112 (list :tag "Spam Summary Exit Processor Choices"
2113 (set
2114 (const :tag "Spam: Bogofilter" (spam spam-use-bogofilter))
2115 (const :tag "Spam: Blacklist" (spam spam-use-blacklist))
2116 (const :tag "Spam: Bsfilter" (spam spam-use-bsfilter))
2117 (const :tag "Spam: Gmane Report" (spam spam-use-gmane))
2118 (const :tag "Spam: Resend Message"(spam spam-use-resend))
2119 (const :tag "Spam: ifile" (spam spam-use-ifile))
2120 (const :tag "Spam: Spam Oracle" (spam spam-use-spamoracle))
2121 (const :tag "Spam: Spam-stat" (spam spam-use-stat))
2122 (const :tag "Spam: SpamAssassin" (spam spam-use-spamassassin))
2123 (const :tag "Spam: CRM114" (spam spam-use-crm114))
2124 (const :tag "Ham: BBDB" (ham spam-use-BBDB))
2125 (const :tag "Ham: Bogofilter" (ham spam-use-bogofilter))
2126 (const :tag "Ham: Bsfilter" (ham spam-use-bsfilter))
2127 (const :tag "Ham: Copy" (ham spam-use-ham-copy))
2128 (const :tag "Ham: Resend Message" (ham spam-use-resend))
2129 (const :tag "Ham: ifile" (ham spam-use-ifile))
2130 (const :tag "Ham: Spam Oracle" (ham spam-use-spamoracle))
2131 (const :tag "Ham: Spam-stat" (ham spam-use-stat))
2132 (const :tag "Ham: SpamAssassin" (ham spam-use-spamassassin))
2133 (const :tag "Ham: CRM114" (ham spam-use-crm114))
2134 (const :tag "Ham: Whitelist" (ham spam-use-whitelist))
2135 (variable-item gnus-group-spam-exit-processor-ifile)
2136 (variable-item gnus-group-spam-exit-processor-stat)
2137 (variable-item gnus-group-spam-exit-processor-bogofilter)
2138 (variable-item gnus-group-spam-exit-processor-blacklist)
2139 (variable-item gnus-group-spam-exit-processor-spamoracle)
2140 (variable-item gnus-group-spam-exit-processor-report-gmane)
2141 (variable-item gnus-group-ham-exit-processor-bogofilter)
2142 (variable-item gnus-group-ham-exit-processor-ifile)
2143 (variable-item gnus-group-ham-exit-processor-stat)
2144 (variable-item gnus-group-ham-exit-processor-whitelist)
2145 (variable-item gnus-group-ham-exit-processor-BBDB)
2146 (variable-item gnus-group-ham-exit-processor-spamoracle)
2147 (variable-item gnus-group-ham-exit-processor-copy))))
2148 :function-document
2149 "Which spam or ham processors will be applied when the summary is exited."
2150 :variable gnus-spam-process-newsgroups
2151 :variable-default nil
2152 :variable-document
2153 "*Groups in which to automatically process spam or ham articles with
2154 a backend on summary exit. If non-nil, this should be a list of group
2155 name regexps that should match all groups in which to do automatic
2156 spam processing, associated with the appropriate processor."
2157 :variable-group spam
2158 :variable-type
2159 '(repeat :tag "Spam/Ham Processors"
2160 (list :tag "Spam Summary Exit Processor Choices"
2161 (regexp :tag "Group Regexp")
2162 (set
2163 :tag "Spam/Ham Summary Exit Processor"
2164 (const :tag "Spam: Bogofilter" (spam spam-use-bogofilter))
2165 (const :tag "Spam: Blacklist" (spam spam-use-blacklist))
2166 (const :tag "Spam: Bsfilter" (spam spam-use-bsfilter))
2167 (const :tag "Spam: Gmane Report" (spam spam-use-gmane))
2168 (const :tag "Spam: Resend Message"(spam spam-use-resend))
2169 (const :tag "Spam: ifile" (spam spam-use-ifile))
2170 (const :tag "Spam: Spam-stat" (spam spam-use-stat))
2171 (const :tag "Spam: Spam Oracle" (spam spam-use-spamoracle))
2172 (const :tag "Spam: SpamAssassin" (spam spam-use-spamassassin))
2173 (const :tag "Spam: CRM114" (spam spam-use-crm114))
2174 (const :tag "Ham: BBDB" (ham spam-use-BBDB))
2175 (const :tag "Ham: Bogofilter" (ham spam-use-bogofilter))
2176 (const :tag "Ham: Bsfilter" (ham spam-use-bsfilter))
2177 (const :tag "Ham: Copy" (ham spam-use-ham-copy))
2178 (const :tag "Ham: Resend Message" (ham spam-use-resend))
2179 (const :tag "Ham: ifile" (ham spam-use-ifile))
2180 (const :tag "Ham: Spam-stat" (ham spam-use-stat))
2181 (const :tag "Ham: Spam Oracle" (ham spam-use-spamoracle))
2182 (const :tag "Ham: SpamAssassin" (ham spam-use-spamassassin))
2183 (const :tag "Ham: CRM114" (ham spam-use-crm114))
2184 (const :tag "Ham: Whitelist" (ham spam-use-whitelist))
2185 (variable-item gnus-group-spam-exit-processor-ifile)
2186 (variable-item gnus-group-spam-exit-processor-stat)
2187 (variable-item gnus-group-spam-exit-processor-bogofilter)
2188 (variable-item gnus-group-spam-exit-processor-blacklist)
2189 (variable-item gnus-group-spam-exit-processor-spamoracle)
2190 (variable-item gnus-group-spam-exit-processor-report-gmane)
2191 (variable-item gnus-group-ham-exit-processor-bogofilter)
2192 (variable-item gnus-group-ham-exit-processor-ifile)
2193 (variable-item gnus-group-ham-exit-processor-stat)
2194 (variable-item gnus-group-ham-exit-processor-whitelist)
2195 (variable-item gnus-group-ham-exit-processor-BBDB)
2196 (variable-item gnus-group-ham-exit-processor-spamoracle)
2197 (variable-item gnus-group-ham-exit-processor-copy))))
2199 :parameter-document
2200 "Which spam or ham processors will be applied when the summary is exited.")
2202 (gnus-define-group-parameter
2203 spam-autodetect
2204 :type list
2205 :parameter-type
2206 '(boolean :tag "Spam autodetection")
2207 :function-document
2208 "Should spam be autodetected (with spam-split) in this group?"
2209 :variable gnus-spam-autodetect
2210 :variable-default nil
2211 :variable-document
2212 "*Groups in which spam should be autodetected when they are entered.
2213 Only unseen articles will be examined, unless
2214 spam-autodetect-recheck-messages is set."
2215 :variable-group spam
2216 :variable-type
2217 '(repeat
2218 :tag "Autodetection setting"
2219 (list
2220 (regexp :tag "Group Regexp")
2221 boolean))
2222 :parameter-document
2223 "Spam autodetection.
2224 Only unseen articles will be examined, unless
2225 spam-autodetect-recheck-messages is set.")
2227 (gnus-define-group-parameter
2228 spam-autodetect-methods
2229 :type list
2230 :parameter-type
2231 '(choice :tag "Spam autodetection-specific methods"
2232 (const none)
2233 (const default)
2234 (set :tag "Use specific methods"
2235 (variable-item spam-use-blacklist)
2236 (variable-item spam-use-gmane-xref)
2237 (variable-item spam-use-regex-headers)
2238 (variable-item spam-use-regex-body)
2239 (variable-item spam-use-whitelist)
2240 (variable-item spam-use-BBDB)
2241 (variable-item spam-use-ifile)
2242 (variable-item spam-use-spamoracle)
2243 (variable-item spam-use-crm114)
2244 (variable-item spam-use-spamassassin)
2245 (variable-item spam-use-spamassassin-headers)
2246 (variable-item spam-use-bsfilter)
2247 (variable-item spam-use-bsfilter-headers)
2248 (variable-item spam-use-stat)
2249 (variable-item spam-use-blackholes)
2250 (variable-item spam-use-hashcash)
2251 (variable-item spam-use-bogofilter-headers)
2252 (variable-item spam-use-bogofilter)))
2253 :function-document
2254 "Methods to be used for autodetection in each group"
2255 :variable gnus-spam-autodetect-methods
2256 :variable-default nil
2257 :variable-document
2258 "*Methods for autodetecting spam per group.
2259 Requires the spam-autodetect parameter. Only unseen articles
2260 will be examined, unless spam-autodetect-recheck-messages is
2261 set."
2262 :variable-group spam
2263 :variable-type
2264 '(repeat
2265 :tag "Autodetection methods"
2266 (list
2267 (regexp :tag "Group Regexp")
2268 (choice
2269 (const none)
2270 (const default)
2271 (set :tag "Use specific methods"
2272 (variable-item spam-use-blacklist)
2273 (variable-item spam-use-gmane-xref)
2274 (variable-item spam-use-regex-headers)
2275 (variable-item spam-use-regex-body)
2276 (variable-item spam-use-whitelist)
2277 (variable-item spam-use-BBDB)
2278 (variable-item spam-use-ifile)
2279 (variable-item spam-use-spamoracle)
2280 (variable-item spam-use-crm114)
2281 (variable-item spam-use-stat)
2282 (variable-item spam-use-blackholes)
2283 (variable-item spam-use-hashcash)
2284 (variable-item spam-use-spamassassin)
2285 (variable-item spam-use-spamassassin-headers)
2286 (variable-item spam-use-bsfilter)
2287 (variable-item spam-use-bsfilter-headers)
2288 (variable-item spam-use-bogofilter-headers)
2289 (variable-item spam-use-bogofilter)))))
2290 :parameter-document
2291 "Spam autodetection methods.
2292 Requires the spam-autodetect parameter. Only unseen articles
2293 will be examined, unless spam-autodetect-recheck-messages is
2294 set.")
2296 (gnus-define-group-parameter
2297 spam-process-destination
2298 :type list
2299 :parameter-type
2300 '(choice :tag "Destination for spam-processed articles at summary exit"
2301 (string :tag "Move to a group")
2302 (repeat :tag "Move to multiple groups"
2303 (string :tag "Destination group"))
2304 (const :tag "Expire" nil))
2305 :function-document
2306 "Where spam-processed articles will go at summary exit."
2307 :variable gnus-spam-process-destinations
2308 :variable-default nil
2309 :variable-document
2310 "*Groups in which to explicitly send spam-processed articles to
2311 another group, or expire them (the default). If non-nil, this should
2312 be a list of group name regexps that should match all groups in which
2313 to do spam-processed article moving, associated with the destination
2314 group or nil for explicit expiration. This only makes sense for
2315 mail groups."
2316 :variable-group spam
2317 :variable-type
2318 '(repeat
2319 :tag "Spam-processed articles destination"
2320 (list
2321 (regexp :tag "Group Regexp")
2322 (choice
2323 :tag "Destination for spam-processed articles at summary exit"
2324 (string :tag "Move to a group")
2325 (repeat :tag "Move to multiple groups"
2326 (string :tag "Destination group"))
2327 (const :tag "Expire" nil))))
2328 :parameter-document
2329 "Where spam-processed articles will go at summary exit.")
2331 (gnus-define-group-parameter
2332 ham-process-destination
2333 :type list
2334 :parameter-type
2335 '(choice
2336 :tag "Destination for ham articles at summary exit from a spam group"
2337 (string :tag "Move to a group")
2338 (repeat :tag "Move to multiple groups"
2339 (string :tag "Destination group"))
2340 (const :tag "Respool" respool)
2341 (const :tag "Do nothing" nil))
2342 :function-document
2343 "Where ham articles will go at summary exit from a spam group."
2344 :variable gnus-ham-process-destinations
2345 :variable-default nil
2346 :variable-document
2347 "*Groups in which to explicitly send ham articles to
2348 another group, or do nothing (the default). If non-nil, this should
2349 be a list of group name regexps that should match all groups in which
2350 to do ham article moving, associated with the destination
2351 group or nil for explicit ignoring. This only makes sense for
2352 mail groups, and only works in spam groups."
2353 :variable-group spam
2354 :variable-type
2355 '(repeat
2356 :tag "Ham articles destination"
2357 (list
2358 (regexp :tag "Group Regexp")
2359 (choice
2360 :tag "Destination for ham articles at summary exit from spam group"
2361 (string :tag "Move to a group")
2362 (repeat :tag "Move to multiple groups"
2363 (string :tag "Destination group"))
2364 (const :tag "Respool" respool)
2365 (const :tag "Expire" nil))))
2366 :parameter-document
2367 "Where ham articles will go at summary exit from a spam group.")
2369 (gnus-define-group-parameter
2370 ham-marks
2371 :type 'list
2372 :parameter-type '(list :tag "Ham mark choices"
2373 (set
2374 (variable-item gnus-del-mark)
2375 (variable-item gnus-read-mark)
2376 (variable-item gnus-ticked-mark)
2377 (variable-item gnus-killed-mark)
2378 (variable-item gnus-kill-file-mark)
2379 (variable-item gnus-low-score-mark)))
2381 :parameter-document
2382 "Marks considered ham (positively not spam). Such articles will be
2383 processed as ham (non-spam) on group exit. When nil, the global
2384 spam-ham-marks variable takes precedence."
2385 :variable-default '((".*" ((gnus-del-mark
2386 gnus-read-mark
2387 gnus-killed-mark
2388 gnus-kill-file-mark
2389 gnus-low-score-mark))))
2390 :variable-group spam
2391 :variable-document
2392 "*Groups in which to explicitly set the ham marks to some value.")
2394 (gnus-define-group-parameter
2395 spam-marks
2396 :type 'list
2397 :parameter-type '(list :tag "Spam mark choices"
2398 (set
2399 (variable-item gnus-spam-mark)
2400 (variable-item gnus-killed-mark)
2401 (variable-item gnus-kill-file-mark)
2402 (variable-item gnus-low-score-mark)))
2404 :parameter-document
2405 "Marks considered spam.
2406 Such articles will be processed as spam on group exit. When nil, the global
2407 spam-spam-marks variable takes precedence."
2408 :variable-default '((".*" ((gnus-spam-mark))))
2409 :variable-group spam
2410 :variable-document
2411 "*Groups in which to explicitly set the spam marks to some value."))
2413 (defcustom gnus-group-uncollapsed-levels 1
2414 "Number of group name elements to leave alone when making a short group name."
2415 :group 'gnus-group-visual
2416 :type 'integer)
2418 (defcustom gnus-group-use-permanent-levels nil
2419 "*If non-nil, once you set a level, Gnus will use this level."
2420 :group 'gnus-group-levels
2421 :type 'boolean)
2423 ;; Hooks.
2425 (defcustom gnus-load-hook nil
2426 "A hook run while Gnus is loaded."
2427 :group 'gnus-start
2428 :type 'hook)
2430 (defcustom gnus-apply-kill-hook '(gnus-apply-kill-file)
2431 "A hook called to apply kill files to a group.
2432 This hook is intended to apply a kill file to the selected newsgroup.
2433 The function `gnus-apply-kill-file' is called by default.
2435 Since a general kill file is too heavy to use only for a few
2436 newsgroups, I recommend you to use a lighter hook function. For
2437 example, if you'd like to apply a kill file to articles which contains
2438 a string `rmgroup' in subject in newsgroup `control', you can use the
2439 following hook:
2441 (setq gnus-apply-kill-hook
2442 (list
2443 (lambda ()
2444 (cond ((string-match \"control\" gnus-newsgroup-name)
2445 (gnus-kill \"Subject\" \"rmgroup\")
2446 (gnus-expunge \"X\"))))))"
2447 :group 'gnus-score-kill
2448 :options '(gnus-apply-kill-file)
2449 :type 'hook)
2451 (defcustom gnus-group-change-level-function nil
2452 "Function run when a group level is changed.
2453 It is called with three parameters -- GROUP, LEVEL and OLDLEVEL."
2454 :group 'gnus-group-levels
2455 :type '(choice (const nil)
2456 function))
2458 ;;; Face thingies.
2460 (defcustom gnus-visual
2461 '(summary-highlight group-highlight article-highlight
2462 mouse-face
2463 summary-menu group-menu article-menu
2464 tree-highlight menu highlight
2465 browse-menu server-menu
2466 page-marker tree-menu binary-menu pick-menu)
2467 "*Enable visual features.
2468 If `visual' is disabled, there will be no menus and few faces. Most of
2469 the visual customization options below will be ignored. Gnus will use
2470 less space and be faster as a result.
2472 This variable can also be a list of visual elements to switch on. For
2473 instance, to switch off all visual things except menus, you can say:
2475 (setq gnus-visual '(menu))
2477 Valid elements include `summary-highlight', `group-highlight',
2478 `article-highlight', `mouse-face', `summary-menu', `group-menu',
2479 `article-menu', `tree-highlight', `menu', `highlight', `browse-menu',
2480 `server-menu', `page-marker', `tree-menu', `binary-menu', and`pick-menu'."
2481 :group 'gnus-meta
2482 :group 'gnus-visual
2483 :type '(set (const summary-highlight)
2484 (const group-highlight)
2485 (const article-highlight)
2486 (const mouse-face)
2487 (const summary-menu)
2488 (const group-menu)
2489 (const article-menu)
2490 (const tree-highlight)
2491 (const menu)
2492 (const highlight)
2493 (const browse-menu)
2494 (const server-menu)
2495 (const page-marker)
2496 (const tree-menu)
2497 (const binary-menu)
2498 (const pick-menu)))
2500 ;; Byte-compiler warning.
2501 (defvar gnus-visual)
2502 ;; Find out whether the gnus-visual TYPE is wanted.
2503 (defun gnus-visual-p (&optional type class)
2504 (and gnus-visual ; Has to be non-nil, at least.
2505 (if (not type) ; We don't care about type.
2506 gnus-visual
2507 (if (listp gnus-visual) ; It's a list, so we check it.
2508 (or (memq type gnus-visual)
2509 (memq class gnus-visual))
2510 t))))
2512 (defcustom gnus-mouse-face
2513 (condition-case ()
2514 (if (gnus-visual-p 'mouse-face 'highlight)
2515 (if (boundp 'gnus-mouse-face)
2516 (or gnus-mouse-face 'highlight)
2517 'highlight)
2518 'default)
2519 (error 'highlight))
2520 "*Face used for group or summary buffer mouse highlighting.
2521 The line beneath the mouse pointer will be highlighted with this
2522 face."
2523 :group 'gnus-visual
2524 :type 'face)
2526 (defcustom gnus-article-save-directory gnus-directory
2527 "*Name of the directory articles will be saved in (default \"~/News\")."
2528 :group 'gnus-article-saving
2529 :type 'directory)
2531 (defvar gnus-plugged t
2532 "Whether Gnus is plugged or not.")
2534 (defcustom gnus-agent-cache t
2535 "Controls use of the agent cache while plugged.
2536 When set, Gnus will prefer using the locally stored content rather
2537 than re-fetching it from the server. You also need to enable
2538 `gnus-agent' for this to have any affect."
2539 :version "22.1"
2540 :group 'gnus-agent
2541 :type 'boolean)
2543 (defcustom gnus-default-charset 'undecided
2544 "Default charset assumed to be used when viewing non-ASCII characters.
2545 This variable is overridden on a group-to-group basis by the
2546 `gnus-group-charset-alist' variable and is only used on groups not
2547 covered by that variable."
2548 :type 'symbol
2549 :group 'gnus-charset)
2551 ;; Fixme: Doc reference to agent.
2552 (defcustom gnus-agent t
2553 "Whether we want to use the Gnus agent or not.
2555 You may customize gnus-agent to disable its use. However, some
2556 back ends have started to use the agent as a client-side cache.
2557 Disabling the agent may result in noticeable loss of performance."
2558 :version "22.1"
2559 :group 'gnus-agent
2560 :type 'boolean)
2562 (defcustom gnus-other-frame-function 'gnus
2563 "Function called by the command `gnus-other-frame'."
2564 :group 'gnus-start
2565 :type '(choice (function-item gnus)
2566 (function-item gnus-no-server)
2567 (function-item gnus-slave)
2568 (function-item gnus-slave-no-server)))
2570 (defcustom gnus-other-frame-parameters nil
2571 "Frame parameters used by `gnus-other-frame' to create a Gnus frame.
2572 This should be an alist for Emacs, or a plist for XEmacs."
2573 :group 'gnus-start
2574 :type (if (featurep 'xemacs)
2575 '(repeat (list :inline t :format "%v"
2576 (symbol :tag "Property")
2577 (sexp :tag "Value")))
2578 '(repeat (cons :format "%v"
2579 (symbol :tag "Parameter")
2580 (sexp :tag "Value")))))
2582 (defcustom gnus-user-agent '(emacs gnus type)
2583 "Which information should be exposed in the User-Agent header.
2585 Can be a list of symbols or a string. Valid symbols are `gnus'
2586 \(show Gnus version\) and `emacs' \(show Emacs version\). In
2587 addition to the Emacs version, you can add `codename' \(show
2588 \(S\)XEmacs codename\) or either `config' \(show system
2589 configuration\) or `type' \(show system type\). If you set it to
2590 a string, be sure to use a valid format, see RFC 2616."
2592 :version "22.1"
2593 :group 'gnus-message
2594 :type '(choice (list (set :inline t
2595 (const gnus :tag "Gnus version")
2596 (const emacs :tag "Emacs version")
2597 (choice :tag "system"
2598 (const type :tag "system type")
2599 (const config :tag "system configuration"))
2600 (const codename :tag "Emacs codename")))
2601 (string)))
2603 ;; Convert old (< 2005-01-10) symbol type values:
2604 (when (symbolp gnus-user-agent)
2605 (setq gnus-user-agent
2606 (cond ((eq gnus-user-agent 'emacs-gnus-config)
2607 '(emacs gnus config))
2608 ((eq gnus-user-agent 'emacs-gnus-type)
2609 '(emacs gnus type))
2610 ((eq gnus-user-agent 'emacs-gnus)
2611 '(emacs gnus))
2612 ((eq gnus-user-agent 'gnus)
2613 '(gnus))
2614 (t gnus-user-agent)))
2615 (gnus-message 1 "Converted `gnus-user-agent' to `%s'." gnus-user-agent)
2616 (sit-for 1)
2617 (if (get 'gnus-user-agent 'saved-value)
2618 (customize-save-variable 'gnus-user-agent gnus-user-agent)
2619 (gnus-message 1 "Edit your init file to make this change permanent.")
2620 (sit-for 2)))
2623 ;;; Internal variables
2625 (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
2626 (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
2627 (defvar gnus-agent-method-p-cache nil
2628 ; Reset each time gnus-agent-covered-methods is changed else
2629 ; gnus-agent-method-p may mis-report a methods status.
2631 (defvar gnus-agent-target-move-group-header "X-Gnus-Agent-Move-To")
2632 (defvar gnus-draft-meta-information-header "X-Draft-From")
2633 (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
2634 (defvar gnus-original-article-buffer " *Original Article*")
2635 (defvar gnus-newsgroup-name nil)
2636 (defvar gnus-ephemeral-servers nil)
2637 (defvar gnus-server-method-cache nil)
2639 (defvar gnus-agent-fetching nil
2640 "Whether Gnus agent is in fetching mode.")
2642 (defvar gnus-agent-covered-methods nil
2643 "A list of servers, NOT methods, showing which servers are covered by the agent.")
2645 (defvar gnus-command-method nil
2646 "Dynamically bound variable that says what the current back end is.")
2648 (defvar gnus-current-select-method nil
2649 "The current method for selecting a newsgroup.")
2651 (defvar gnus-tree-buffer "*Tree*"
2652 "Buffer where Gnus thread trees are displayed.")
2654 ;; Dummy variable.
2655 (defvar gnus-use-generic-from nil)
2657 ;; Variable holding the user answers to all method prompts.
2658 (defvar gnus-method-history nil)
2660 ;; Variable holding the user answers to all mail method prompts.
2661 (defvar gnus-mail-method-history nil)
2663 ;; Variable holding the user answers to all group prompts.
2664 (defvar gnus-group-history nil)
2666 (defvar gnus-server-alist nil
2667 "List of available servers.")
2669 (defcustom gnus-cache-directory
2670 (nnheader-concat gnus-directory "cache/")
2671 "*The directory where cached articles will be stored."
2672 :group 'gnus-cache
2673 :type 'directory)
2675 (defvar gnus-predefined-server-alist
2676 `(("cache"
2677 nnspool "cache"
2678 (nnspool-spool-directory ,gnus-cache-directory)
2679 (nnspool-nov-directory ,gnus-cache-directory)
2680 (nnspool-active-file
2681 ,(nnheader-concat gnus-cache-directory "active"))))
2682 "List of predefined (convenience) servers.")
2684 (defvar gnus-topic-indentation "") ;; Obsolete variable.
2686 (defconst gnus-article-mark-lists
2687 '((marked . tick) (replied . reply)
2688 (expirable . expire) (killed . killed)
2689 (bookmarks . bookmark) (dormant . dormant)
2690 (scored . score) (saved . save)
2691 (cached . cache) (downloadable . download)
2692 (unsendable . unsend) (forwarded . forward)
2693 (recent . recent) (seen . seen)))
2695 (defconst gnus-article-special-mark-lists
2696 '((seen range)
2697 (killed range)
2698 (bookmark tuple)
2699 (score tuple)))
2701 ;; Propagate flags to server, with the following exceptions:
2702 ;; `seen' is private to each gnus installation
2703 ;; `cache' is a internal gnus flag for each gnus installation
2704 ;; `download' is a agent flag private to each gnus installation
2705 ;; `unsend' are for nndraft groups only
2706 ;; `score' is not a proper mark
2707 ;; `bookmark': don't propagated it, or fix the bug in update-mark.
2708 (defconst gnus-article-unpropagated-mark-lists
2709 '(seen cache download unsend score bookmark)
2710 "Marks that shouldn't be propagated to back ends.
2711 Typical marks are those that make no sense in a standalone back end,
2712 such as a mark that says whether an article is stored in the cache
2713 \(which doesn't make sense in a standalone back end).")
2715 (defvar gnus-headers-retrieved-by nil)
2716 (defvar gnus-article-reply nil)
2717 (defvar gnus-override-method nil)
2718 (defvar gnus-opened-servers nil)
2720 (defvar gnus-current-kill-article nil)
2722 (defvar gnus-have-read-active-file nil)
2724 (defconst gnus-maintainer
2725 "bugs@gnus.org (The Gnus Bugfixing Girls + Boys)"
2726 "The mail address of the Gnus maintainers.")
2728 (defvar gnus-info-nodes
2729 '((gnus-group-mode "(gnus)Group Buffer")
2730 (gnus-summary-mode "(gnus)Summary Buffer")
2731 (gnus-article-mode "(gnus)Article Buffer")
2732 (gnus-server-mode "(gnus)Server Buffer")
2733 (gnus-browse-mode "(gnus)Browse Foreign Server")
2734 (gnus-tree-mode "(gnus)Tree Display"))
2735 "Alist of major modes and related Info nodes.")
2737 (defvar gnus-group-buffer "*Group*")
2738 (defvar gnus-summary-buffer "*Summary*")
2739 (defvar gnus-article-buffer "*Article*")
2740 (defvar gnus-server-buffer "*Server*")
2742 (defvar gnus-slave nil
2743 "Whether this Gnus is a slave or not.")
2745 (defvar gnus-batch-mode nil
2746 "Whether this Gnus is running in batch mode or not.")
2748 (defvar gnus-variable-list
2749 '(gnus-newsrc-options gnus-newsrc-options-n
2750 gnus-newsrc-last-checked-date
2751 gnus-newsrc-alist gnus-server-alist
2752 gnus-killed-list gnus-zombie-list
2753 gnus-topic-topology gnus-topic-alist
2754 gnus-format-specs)
2755 "Gnus variables saved in the quick startup file.")
2757 (defvar gnus-newsrc-alist nil
2758 "Assoc list of read articles.
2759 `gnus-newsrc-hashtb' should be kept so that both hold the same information.")
2761 (defvar gnus-registry-alist nil
2762 "Assoc list of registry data.
2763 gnus-registry.el will populate this if it's loaded.")
2765 (defvar gnus-newsrc-hashtb nil
2766 "Hashtable of `gnus-newsrc-alist'.")
2768 (defvar gnus-killed-list nil
2769 "List of killed newsgroups.")
2771 (defvar gnus-killed-hashtb nil
2772 "Hash table equivalent of `gnus-killed-list'.")
2774 (defvar gnus-zombie-list nil
2775 "List of almost dead newsgroups.")
2777 (defvar gnus-description-hashtb nil
2778 "Descriptions of newsgroups.")
2780 (defvar gnus-list-of-killed-groups nil
2781 "List of newsgroups that have recently been killed by the user.")
2783 (defvar gnus-active-hashtb nil
2784 "Hashtable of active articles.")
2786 (defvar gnus-moderated-hashtb nil
2787 "Hashtable of moderated newsgroups.")
2789 ;; Save window configuration.
2790 (defvar gnus-prev-winconf nil)
2792 (defvar gnus-reffed-article-number nil)
2794 ;;; Let the byte-compiler know that we know about this variable.
2795 (defvar rmail-default-rmail-file)
2797 (defvar gnus-dead-summary nil)
2799 (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
2800 "Regexp matching invalid groups.")
2802 (defvar gnus-other-frame-object nil
2803 "A frame object which will be created by `gnus-other-frame'.")
2805 ;;; End of variables.
2807 ;; Define some autoload functions Gnus might use.
2808 (eval-and-compile
2810 ;; This little mapcar goes through the list below and marks the
2811 ;; symbols in question as autoloaded functions.
2812 (mapc
2813 (lambda (package)
2814 (let ((interactive (nth 1 (memq ':interactive package))))
2815 (mapcar
2816 (lambda (function)
2817 (let (keymap)
2818 (when (consp function)
2819 (setq keymap (car (memq 'keymap function)))
2820 (setq function (car function)))
2821 (unless (fboundp function)
2822 (autoload function (car package) nil interactive keymap))))
2823 (if (eq (nth 1 package) ':interactive)
2824 (nthcdr 3 package)
2825 (cdr package)))))
2826 '(("info" :interactive t Info-goto-node)
2827 ("pp" pp-to-string)
2828 ("qp" quoted-printable-decode-region quoted-printable-decode-string)
2829 ("ps-print" ps-print-preprint)
2830 ("message" :interactive t
2831 message-send-and-exit message-yank-original)
2832 ("babel" babel-as-string)
2833 ("nnmail" nnmail-split-fancy nnmail-article-group)
2834 ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers)
2835 ("rmailout" rmail-output rmail-output-to-rmail-file)
2836 ("rmail" rmail-insert-rmail-file-header rmail-count-new-messages
2837 rmail-show-message rmail-summary-exists
2838 rmail-select-summary rmail-update-summary)
2839 ("gnus-audio" :interactive t gnus-audio-play)
2840 ("gnus-xmas" gnus-xmas-splash)
2841 ("gnus-soup" :interactive t
2842 gnus-group-brew-soup gnus-brew-soup gnus-soup-add-article
2843 gnus-soup-send-replies gnus-soup-save-areas gnus-soup-pack-packet)
2844 ("nnsoup" nnsoup-pack-replies)
2845 ("score-mode" :interactive t gnus-score-mode)
2846 ("gnus-mh" gnus-summary-save-article-folder
2847 gnus-Folder-save-name gnus-folder-save-name)
2848 ("gnus-mh" :interactive t gnus-summary-save-in-folder)
2849 ("gnus-demon" gnus-demon-add-nocem gnus-demon-add-scanmail
2850 gnus-demon-add-rescan gnus-demon-add-scan-timestamps
2851 gnus-demon-add-disconnection gnus-demon-add-handler
2852 gnus-demon-remove-handler)
2853 ("gnus-demon" :interactive t
2854 gnus-demon-init gnus-demon-cancel)
2855 ("gnus-fun" gnus-convert-gray-x-face-to-xpm gnus-display-x-face-in-from
2856 gnus-convert-image-to-gray-x-face gnus-convert-face-to-png
2857 gnus-face-from-file)
2858 ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree
2859 gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)
2860 ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close
2861 gnus-nocem-unwanted-article-p)
2862 ("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info
2863 gnus-server-server-name)
2864 ("gnus-srvr" gnus-browse-foreign-server)
2865 ("gnus-cite" :interactive t
2866 gnus-article-highlight-citation gnus-article-hide-citation-maybe
2867 gnus-article-hide-citation gnus-article-fill-cited-article
2868 gnus-article-hide-citation-in-followups)
2869 ("gnus-kill" gnus-kill gnus-apply-kill-file-internal
2870 gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author
2871 gnus-execute gnus-expunge gnus-batch-kill gnus-batch-score)
2872 ("gnus-cache" gnus-cache-possibly-enter-article gnus-cache-save-buffers
2873 gnus-cache-possibly-remove-articles gnus-cache-request-article
2874 gnus-cache-retrieve-headers gnus-cache-possibly-alter-active
2875 gnus-cache-enter-remove-article gnus-cached-article-p
2876 gnus-cache-open gnus-cache-close gnus-cache-update-article
2877 gnus-cache-articles-in-group)
2878 ("gnus-cache" :interactive t gnus-jog-cache gnus-cache-enter-article
2879 gnus-cache-remove-article gnus-summary-insert-cached-articles)
2880 ("gnus-score" :interactive t
2881 gnus-summary-increase-score gnus-summary-set-score
2882 gnus-summary-raise-thread gnus-summary-raise-same-subject
2883 gnus-summary-raise-score gnus-summary-raise-same-subject-and-select
2884 gnus-summary-lower-thread gnus-summary-lower-same-subject
2885 gnus-summary-lower-score gnus-summary-lower-same-subject-and-select
2886 gnus-summary-current-score gnus-score-delta-default
2887 gnus-score-flush-cache gnus-score-close
2888 gnus-possibly-score-headers gnus-score-followup-article
2889 gnus-score-followup-thread)
2890 ("gnus-score"
2891 (gnus-summary-score-map keymap) gnus-score-save gnus-score-headers
2892 gnus-current-score-file-nondirectory gnus-score-adaptive
2893 gnus-score-find-trace gnus-score-file-name)
2894 ("gnus-cus" :interactive t gnus-group-customize gnus-score-customize)
2895 ("gnus-topic" :interactive t gnus-topic-mode)
2896 ("gnus-topic" gnus-topic-remove-group gnus-topic-set-parameters
2897 gnus-subscribe-topics)
2898 ("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode)
2899 ("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap))
2900 ("gnus-uu" :interactive t
2901 gnus-uu-digest-mail-forward gnus-uu-digest-post-forward
2902 gnus-uu-mark-series gnus-uu-mark-region gnus-uu-mark-buffer
2903 gnus-uu-mark-by-regexp gnus-uu-mark-all
2904 gnus-uu-mark-sparse gnus-uu-mark-thread gnus-uu-decode-uu
2905 gnus-uu-decode-uu-and-save gnus-uu-decode-unshar
2906 gnus-uu-decode-unshar-and-save gnus-uu-decode-save
2907 gnus-uu-decode-binhex gnus-uu-decode-uu-view
2908 gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view
2909 gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view
2910 gnus-uu-decode-binhex-view gnus-uu-unmark-thread
2911 gnus-uu-mark-over gnus-uu-post-news gnus-uu-invert-processable)
2912 ("gnus-uu" gnus-uu-delete-work-dir gnus-uu-unmark-thread)
2913 ("gnus-msg" (gnus-summary-send-map keymap)
2914 gnus-article-mail gnus-copy-article-buffer gnus-extended-version)
2915 ("gnus-msg" :interactive t
2916 gnus-group-post-news gnus-group-mail gnus-group-news
2917 gnus-summary-post-news gnus-summary-news-other-window
2918 gnus-summary-followup gnus-summary-followup-with-original
2919 gnus-summary-cancel-article gnus-summary-supersede-article
2920 gnus-post-news gnus-summary-reply gnus-summary-reply-with-original
2921 gnus-summary-mail-forward gnus-summary-mail-other-window
2922 gnus-summary-resend-message gnus-summary-resend-bounced-mail
2923 gnus-summary-wide-reply gnus-summary-followup-to-mail
2924 gnus-summary-followup-to-mail-with-original gnus-bug
2925 gnus-summary-wide-reply-with-original
2926 gnus-summary-post-forward gnus-summary-wide-reply-with-original
2927 gnus-summary-post-forward)
2928 ("gnus-picon" :interactive t gnus-treat-from-picon)
2929 ("smiley" :interactive t smiley-region)
2930 ("gnus-win" gnus-configure-windows gnus-add-configuration)
2931 ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
2932 gnus-list-of-unread-articles gnus-list-of-read-articles
2933 gnus-offer-save-summaries gnus-make-thread-indent-array
2934 gnus-summary-exit gnus-update-read-articles gnus-summary-last-subject
2935 gnus-summary-skip-intangible gnus-summary-article-number
2936 gnus-data-header gnus-data-find)
2937 ("gnus-group" gnus-group-insert-group-line gnus-group-quit
2938 gnus-group-list-groups gnus-group-first-unread-group
2939 gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc
2940 gnus-group-setup-buffer gnus-group-get-new-news
2941 gnus-group-make-help-group gnus-group-update-group
2942 gnus-group-iterate gnus-group-group-name)
2943 ("gnus-bcklg" gnus-backlog-request-article gnus-backlog-enter-article
2944 gnus-backlog-remove-article)
2945 ("gnus-art" gnus-article-read-summary-keys gnus-article-save
2946 gnus-article-prepare gnus-article-set-window-start
2947 gnus-article-next-page gnus-article-prev-page
2948 gnus-request-article-this-buffer gnus-article-mode
2949 gnus-article-setup-buffer gnus-narrow-to-page
2950 gnus-article-delete-invisible-text gnus-treat-article)
2951 ("gnus-art" :interactive t
2952 gnus-article-hide-headers gnus-article-hide-boring-headers
2953 gnus-article-treat-overstrike
2954 gnus-article-remove-cr gnus-article-remove-trailing-blank-lines
2955 gnus-article-display-x-face gnus-article-de-quoted-unreadable
2956 gnus-article-de-base64-unreadable
2957 gnus-article-decode-HZ
2958 gnus-article-wash-html
2959 gnus-article-unsplit-urls
2960 gnus-article-hide-pem gnus-article-hide-signature
2961 gnus-article-strip-leading-blank-lines gnus-article-date-local
2962 gnus-article-date-original gnus-article-date-lapsed
2963 ;;gnus-article-show-all-headers
2964 gnus-article-edit-mode gnus-article-edit-article
2965 gnus-article-edit-done gnus-article-decode-encoded-words
2966 gnus-start-date-timer gnus-stop-date-timer
2967 gnus-mime-view-all-parts)
2968 ("gnus-int" gnus-request-type)
2969 ("gnus-start" gnus-newsrc-parse-options gnus-1 gnus-no-server-1
2970 gnus-dribble-enter gnus-read-init-file gnus-dribble-touch
2971 gnus-check-reasonable-setup)
2972 ("gnus-dup" gnus-dup-suppress-articles gnus-dup-unsuppress-article
2973 gnus-dup-enter-articles)
2974 ("gnus-range" gnus-copy-sequence)
2975 ("gnus-eform" gnus-edit-form)
2976 ("gnus-move" :interactive t
2977 gnus-group-move-group-to-server gnus-change-server)
2978 ("gnus-logic" gnus-score-advanced)
2979 ("gnus-undo" gnus-undo-mode gnus-undo-register)
2980 ("gnus-async" gnus-async-request-fetched-article gnus-async-prefetch-next
2981 gnus-async-prefetch-article gnus-async-prefetch-remove-group
2982 gnus-async-halt-prefetch)
2983 ("gnus-agent" gnus-open-agent gnus-agent-get-function
2984 gnus-agent-save-active gnus-agent-method-p
2985 gnus-agent-get-undownloaded-list gnus-agent-fetch-session
2986 gnus-summary-set-agent-mark gnus-agent-save-group-info
2987 gnus-agent-request-article gnus-agent-retrieve-headers)
2988 ("gnus-agent" :interactive t
2989 gnus-unplugged gnus-agentize gnus-agent-batch)
2990 ("gnus-vm" :interactive t gnus-summary-save-in-vm
2991 gnus-summary-save-article-vm)
2992 ("compface" uncompface)
2993 ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue)
2994 ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)
2995 ("gnus-mlspl" :interactive t gnus-group-split-setup
2996 gnus-group-split-update)
2997 ("gnus-delay" gnus-delay-initialize))))
2999 ;;; gnus-sum.el thingies
3002 (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
3003 "*The format specification of the lines in the summary buffer.
3005 It works along the same lines as a normal formatting string,
3006 with some simple extensions.
3008 %N Article number, left padded with spaces (string)
3009 %S Subject (string)
3010 %s Subject if it is at the root of a thread, and \"\" otherwise (string)
3011 %n Name of the poster (string)
3012 %a Extracted name of the poster (string)
3013 %A Extracted address of the poster (string)
3014 %F Contents of the From: header (string)
3015 %f Contents of the From: or To: headers (string)
3016 %x Contents of the Xref: header (string)
3017 %D Date of the article (string)
3018 %d Date of the article (string) in DD-MMM format
3019 %o Date of the article (string) in YYYYMMDD`T'HHMMSS format
3020 %M Message-id of the article (string)
3021 %r References of the article (string)
3022 %c Number of characters in the article (integer)
3023 %k Pretty-printed version of the above (string)
3024 For example, \"1.2k\" or \"0.4M\".
3025 %L Number of lines in the article (integer)
3026 %I Indentation based on thread level (a string of spaces)
3027 %B A complex trn-style thread tree (string)
3028 The variables `gnus-sum-thread-*' can be used for customization.
3029 %T A string with two possible values: 80 spaces if the article
3030 is on thread level two or larger and 0 spaces on level one
3031 %R \"A\" if this article has been replied to, \" \" otherwise (character)
3032 %U Status of this article (character, \"R\", \"K\", \"-\" or \" \")
3033 %[ Opening bracket (character, \"[\" or \"<\")
3034 %] Closing bracket (character, \"]\" or \">\")
3035 %> Spaces of length thread-level (string)
3036 %< Spaces of length (- 20 thread-level) (string)
3037 %i Article score (number)
3038 %z Article zcore (character)
3039 %t Number of articles under the current thread (number).
3040 %e Whether the thread is empty or not (character).
3041 %V Total thread score (number).
3042 %P The line number (number).
3043 %O Download mark (character).
3044 %* If present, indicates desired cursor position
3045 (instead of after first colon).
3046 %u User defined specifier. The next character in the format string should
3047 be a letter. Gnus will call the function gnus-user-format-function-X,
3048 where X is the letter following %u. The function will be passed the
3049 current header as argument. The function should return a string, which
3050 will be inserted into the summary just like information from any other
3051 summary specifier.
3053 The %U (status), %R (replied) and %z (zcore) specs have to be handled
3054 with care. For reasons of efficiency, Gnus will compute what column
3055 these characters will end up in, and \"hard-code\" that. This means that
3056 it is invalid to have these specs after a variable-length spec. Well,
3057 you might not be arrested, but your summary buffer will look strange,
3058 which is bad enough.
3060 The smart choice is to have these specs as far to the left as
3061 possible.
3063 This restriction may disappear in later versions of Gnus.
3065 General format specifiers can also be used.
3066 See Info node `(gnus)Formatting Variables'."
3067 :link '(custom-manual "(gnus)Formatting Variables")
3068 :type 'string
3069 :group 'gnus-summary-format)
3072 ;;; Skeleton keymaps
3075 (defun gnus-suppress-keymap (keymap)
3076 (suppress-keymap keymap)
3077 (let ((keys `([backspace] [delete] "\177" "\M-u"))) ;gnus-mouse-2
3078 (while keys
3079 (define-key keymap (pop keys) 'undefined))))
3081 (defvar gnus-article-mode-map
3082 (let ((keymap (make-sparse-keymap)))
3083 (gnus-suppress-keymap keymap)
3084 keymap))
3085 (defvar gnus-summary-mode-map
3086 (let ((keymap (make-keymap)))
3087 (gnus-suppress-keymap keymap)
3088 keymap))
3089 (defvar gnus-group-mode-map
3090 (let ((keymap (make-keymap)))
3091 (gnus-suppress-keymap keymap)
3092 keymap))
3096 ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
3097 ;; If you want the cursor to go somewhere else, set these two
3098 ;; functions in some startup hook to whatever you want.
3099 (defalias 'gnus-summary-position-point 'gnus-goto-colon)
3100 (defalias 'gnus-group-position-point 'gnus-goto-colon)
3102 ;;; Various macros and substs.
3104 (defun gnus-header-from (header)
3105 (mail-header-from header))
3107 (defmacro gnus-gethash (string hashtable)
3108 "Get hash value of STRING in HASHTABLE."
3109 `(symbol-value (intern-soft ,string ,hashtable)))
3111 (defmacro gnus-gethash-safe (string hashtable)
3112 "Get hash value of STRING in HASHTABLE.
3113 Return nil if not defined."
3114 `(let ((sym (intern-soft ,string ,hashtable)))
3115 (and (boundp sym) (symbol-value sym))))
3117 (defmacro gnus-sethash (string value hashtable)
3118 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
3119 `(set (intern ,string ,hashtable) ,value))
3120 (put 'gnus-sethash 'edebug-form-spec '(form form form))
3122 (defmacro gnus-group-unread (group)
3123 "Get the currently computed number of unread articles in GROUP."
3124 `(car (gnus-gethash ,group gnus-newsrc-hashtb)))
3126 (defmacro gnus-group-entry (group)
3127 "Get the newsrc entry for GROUP."
3128 `(gnus-gethash ,group gnus-newsrc-hashtb))
3130 (defmacro gnus-active (group)
3131 "Get active info on GROUP."
3132 `(gnus-gethash ,group gnus-active-hashtb))
3134 (defmacro gnus-set-active (group active)
3135 "Set GROUP's active info."
3136 `(gnus-sethash ,group ,active gnus-active-hashtb))
3138 ;; Info access macros.
3140 (defmacro gnus-info-group (info)
3141 `(nth 0 ,info))
3142 (defmacro gnus-info-rank (info)
3143 `(nth 1 ,info))
3144 (defmacro gnus-info-read (info)
3145 `(nth 2 ,info))
3146 (defmacro gnus-info-marks (info)
3147 `(nth 3 ,info))
3148 (defmacro gnus-info-method (info)
3149 `(nth 4 ,info))
3150 (defmacro gnus-info-params (info)
3151 `(nth 5 ,info))
3153 (defmacro gnus-info-level (info)
3154 `(let ((rank (gnus-info-rank ,info)))
3155 (if (consp rank)
3156 (car rank)
3157 rank)))
3158 (defmacro gnus-info-score (info)
3159 `(let ((rank (gnus-info-rank ,info)))
3160 (or (and (consp rank) (cdr rank)) 0)))
3162 (defmacro gnus-info-set-group (info group)
3163 `(setcar ,info ,group))
3164 (defmacro gnus-info-set-rank (info rank)
3165 `(setcar (nthcdr 1 ,info) ,rank))
3166 (defmacro gnus-info-set-read (info read)
3167 `(setcar (nthcdr 2 ,info) ,read))
3168 (defmacro gnus-info-set-marks (info marks &optional extend)
3169 (if extend
3170 `(gnus-info-set-entry ,info ,marks 3)
3171 `(setcar (nthcdr 3 ,info) ,marks)))
3172 (defmacro gnus-info-set-method (info method &optional extend)
3173 (if extend
3174 `(gnus-info-set-entry ,info ,method 4)
3175 `(setcar (nthcdr 4 ,info) ,method)))
3176 (defmacro gnus-info-set-params (info params &optional extend)
3177 (if extend
3178 `(gnus-info-set-entry ,info ,params 5)
3179 `(setcar (nthcdr 5 ,info) ,params)))
3181 (defun gnus-info-set-entry (info entry number)
3182 ;; Extend the info until we have enough elements.
3183 (while (<= (length info) number)
3184 (nconc info (list nil)))
3185 ;; Set the entry.
3186 (setcar (nthcdr number info) entry))
3188 (defmacro gnus-info-set-level (info level)
3189 `(let ((rank (cdr ,info)))
3190 (if (consp (car rank))
3191 (setcar (car rank) ,level)
3192 (setcar rank ,level))))
3193 (defmacro gnus-info-set-score (info score)
3194 `(let ((rank (cdr ,info)))
3195 (if (consp (car rank))
3196 (setcdr (car rank) ,score)
3197 (setcar rank (cons (car rank) ,score)))))
3199 (defmacro gnus-get-info (group)
3200 `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
3202 ;;; Load the compatibility functions.
3204 (require 'gnus-ems)
3208 ;;; Shutdown
3211 (defvar gnus-shutdown-alist nil)
3213 (defun gnus-add-shutdown (function &rest symbols)
3214 "Run FUNCTION whenever one of SYMBOLS is shut down."
3215 (push (cons function symbols) gnus-shutdown-alist))
3217 (defun gnus-shutdown (symbol)
3218 "Shut down everything that waits for SYMBOL."
3219 (dolist (entry gnus-shutdown-alist)
3220 (when (memq symbol (cdr entry))
3221 (funcall (car entry)))))
3225 ;;; Gnus Utility Functions
3228 (defun gnus-find-subscribed-addresses ()
3229 "Return a regexp matching the addresses of all subscribed mail groups.
3230 It consists of the `to-address' or `to-list' parameter of all groups
3231 with a `subscribed' parameter."
3232 (let (group address addresses)
3233 (dolist (entry (cdr gnus-newsrc-alist))
3234 (setq group (car entry))
3235 (when (gnus-parameter-subscribed group)
3236 (setq address (mail-strip-quoted-names
3237 (or (gnus-group-fast-parameter group 'to-address)
3238 (gnus-group-fast-parameter group 'to-list))))
3239 (when address
3240 (add-to-list 'addresses address))))
3241 (when addresses
3242 (list (mapconcat 'regexp-quote addresses "\\|")))))
3244 (defmacro gnus-string-or (&rest strings)
3245 "Return the first element of STRINGS that is a non-blank string.
3246 STRINGS will be evaluated in normal `or' order."
3247 `(gnus-string-or-1 ',strings))
3249 (defun gnus-string-or-1 (strings)
3250 (let (string)
3251 (while strings
3252 (setq string (eval (pop strings)))
3253 (if (string-match "^[ \t]*$" string)
3254 (setq string nil)
3255 (setq strings nil)))
3256 string))
3258 (defun gnus-version (&optional arg)
3259 "Version number of this version of Gnus.
3260 If ARG, insert string at point."
3261 (interactive "P")
3262 (if arg
3263 (insert (message gnus-version))
3264 (message gnus-version)))
3266 (defun gnus-continuum-version (&optional version)
3267 "Return VERSION as a floating point number."
3268 (interactive)
3269 (unless version
3270 (setq version gnus-version))
3271 (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
3272 (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version))
3273 (let ((alpha (and (match-beginning 1) (match-string 1 version)))
3274 (number (match-string 2 version))
3275 major minor least)
3276 (unless (string-match
3277 "\\([0-9]\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?" number)
3278 (error "Invalid version string: %s" version))
3279 (setq major (string-to-number (match-string 1 number))
3280 minor (string-to-number (match-string 2 number))
3281 least (if (match-beginning 3)
3282 (string-to-number (match-string 3 number))
3284 (string-to-number
3285 (if (zerop major)
3286 (format "%s00%02d%02d"
3287 (if (member alpha '("(ding)" "d"))
3288 "4.99"
3289 (+ 5 (* 0.02
3290 (abs
3291 (- (mm-char-int (aref (downcase alpha) 0))
3292 (mm-char-int ?t))))
3293 -0.01))
3294 minor least)
3295 (format "%d.%02d%02d" major minor least))))))
3297 (defun gnus-info-find-node (&optional nodename)
3298 "Find Info documentation of Gnus."
3299 (interactive)
3300 ;; Enlarge info window if needed.
3301 (let (gnus-info-buffer)
3302 (Info-goto-node (or nodename (cadr (assq major-mode gnus-info-nodes))))
3303 (setq gnus-info-buffer (current-buffer))
3304 (gnus-configure-windows 'info)))
3307 ;;; gnus-interactive
3310 (defvar gnus-current-prefix-symbol nil
3311 "Current prefix symbol.")
3313 (defvar gnus-current-prefix-symbols nil
3314 "List of current prefix symbols.")
3316 (defun gnus-interactive (string &optional params)
3317 "Return a list that can be fed to `interactive'.
3318 See `interactive' for full documentation.
3320 Adds the following specs:
3322 y -- The current symbolic prefix.
3323 Y -- A list of the current symbolic prefix(es).
3324 A -- Article number.
3325 H -- Article header.
3326 g -- Group name."
3327 (let ((i 0)
3328 out c prompt)
3329 (while (< i (length string))
3330 (string-match ".\\([^\n]*\\)\n?" string i)
3331 (setq c (aref string i))
3332 (when (match-end 1)
3333 (setq prompt (match-string 1 string)))
3334 (setq i (match-end 0))
3335 ;; We basically emulate just about everything that
3336 ;; `interactive' does, but add the specs listed above.
3337 (push
3338 (cond
3339 ((= c ?a)
3340 (completing-read prompt obarray 'fboundp t))
3341 ((= c ?b)
3342 (read-buffer prompt (current-buffer) t))
3343 ((= c ?B)
3344 (read-buffer prompt (other-buffer (current-buffer))))
3345 ((= c ?c)
3346 (read-char))
3347 ((= c ?C)
3348 (completing-read prompt obarray 'commandp t))
3349 ((= c ?d)
3350 (point))
3351 ((= c ?D)
3352 (read-file-name prompt nil default-directory 'lambda))
3353 ((= c ?f)
3354 (read-file-name prompt nil nil 'lambda))
3355 ((= c ?F)
3356 (read-file-name prompt))
3357 ((= c ?k)
3358 (read-key-sequence prompt))
3359 ((= c ?K)
3360 (error "Not implemented spec"))
3361 ((= c ?e)
3362 (error "Not implemented spec"))
3363 ((= c ?m)
3364 (mark))
3365 ((= c ?N)
3366 (error "Not implemented spec"))
3367 ((= c ?n)
3368 (string-to-number (read-from-minibuffer prompt)))
3369 ((= c ?p)
3370 (prefix-numeric-value current-prefix-arg))
3371 ((= c ?P)
3372 current-prefix-arg)
3373 ((= c ?r)
3374 'gnus-prefix-nil)
3375 ((= c ?s)
3376 (read-string prompt))
3377 ((= c ?S)
3378 (intern (read-string prompt)))
3379 ((= c ?v)
3380 (read-variable prompt))
3381 ((= c ?x)
3382 (read-minibuffer prompt))
3383 ((= c ?x)
3384 (eval-minibuffer prompt))
3385 ;; And here the new specs come.
3386 ((= c ?y)
3387 gnus-current-prefix-symbol)
3388 ((= c ?Y)
3389 gnus-current-prefix-symbols)
3390 ((= c ?g)
3391 (gnus-group-group-name))
3392 ((= c ?A)
3393 (gnus-summary-skip-intangible)
3394 (or (get-text-property (point) 'gnus-number)
3395 (gnus-summary-last-subject)))
3396 ((= c ?H)
3397 (gnus-data-header (gnus-data-find (gnus-summary-article-number))))
3399 (error "Non-implemented spec")))
3400 out)
3401 (cond
3402 ((= c ?r)
3403 (push (if (< (point) (mark)) (point) (mark)) out)
3404 (push (if (> (point) (mark)) (point) (mark)) out))))
3405 (setq out (delq 'gnus-prefix-nil out))
3406 (nreverse out)))
3408 (defun gnus-symbolic-argument (&optional arg)
3409 "Read a symbolic argument and a command, and then execute command."
3410 (interactive "P")
3411 (let* ((in-command (this-command-keys))
3412 (command in-command)
3413 gnus-current-prefix-symbols
3414 gnus-current-prefix-symbol
3415 syms)
3416 (while (equal in-command command)
3417 (message "%s-" (key-description (this-command-keys)))
3418 (push (intern (char-to-string (read-char))) syms)
3419 (setq command (read-key-sequence nil t)))
3420 (setq gnus-current-prefix-symbols (nreverse syms)
3421 gnus-current-prefix-symbol (car gnus-current-prefix-symbols))
3422 (call-interactively (key-binding command t))))
3424 ;;; More various functions.
3426 (defsubst gnus-check-backend-function (func group)
3427 "Check whether GROUP supports function FUNC.
3428 GROUP can either be a string (a group name) or a select method."
3429 (ignore-errors
3430 (let ((method (if (stringp group)
3431 (car (gnus-find-method-for-group group))
3432 group)))
3433 (unless (featurep method)
3434 (require method))
3435 (fboundp (intern (format "%s-%s" method func))))))
3437 (defun gnus-group-read-only-p (&optional group)
3438 "Check whether GROUP supports editing or not.
3439 If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
3440 that that variable is buffer-local to the summary buffers."
3441 (let ((group (or group gnus-newsgroup-name)))
3442 (not (gnus-check-backend-function 'request-replace-article group))))
3444 (defun gnus-virtual-group-p (group)
3445 "Say whether GROUP is virtual or not."
3446 (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))
3447 gnus-valid-select-methods)))
3449 (defun gnus-news-group-p (group &optional article)
3450 "Return non-nil if GROUP (and ARTICLE) come from a news server."
3451 (cond ((gnus-member-of-valid 'post group) ;Ordinary news group
3452 t) ;is news of course.
3453 ((not (gnus-member-of-valid 'post-mail group)) ;Non-combined.
3454 nil) ;must be mail then.
3455 ((vectorp article) ;Has header info.
3456 (eq (gnus-request-type group (mail-header-id article)) 'news))
3457 ((null article) ;Hasn't header info
3458 (eq (gnus-request-type group) 'news)) ;(unknown ==> mail)
3459 ((< article 0) ;Virtual message
3460 nil) ;we don't know, guess mail.
3461 (t ;Has positive number
3462 (eq (gnus-request-type group article) 'news)))) ;use it.
3464 ;; Returns a list of writable groups.
3465 (defun gnus-writable-groups ()
3466 (let ((alist gnus-newsrc-alist)
3467 groups group)
3468 (while (setq group (car (pop alist)))
3469 (unless (gnus-group-read-only-p group)
3470 (push group groups)))
3471 (nreverse groups)))
3473 ;; Check whether to use long file names.
3474 (defun gnus-use-long-file-name (symbol)
3475 ;; The variable has to be set...
3476 (and gnus-use-long-file-name
3477 ;; If it isn't a list, then we return t.
3478 (or (not (listp gnus-use-long-file-name))
3479 ;; If it is a list, and the list contains `symbol', we
3480 ;; return nil.
3481 (not (memq symbol gnus-use-long-file-name)))))
3483 ;; Generate a unique new group name.
3484 (defun gnus-generate-new-group-name (leaf)
3485 (let ((name leaf)
3486 (num 0))
3487 (while (gnus-group-entry name)
3488 (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
3489 name))
3491 (defun gnus-ephemeral-group-p (group)
3492 "Say whether GROUP is ephemeral or not."
3493 (gnus-group-get-parameter group 'quit-config t))
3495 (defun gnus-group-quit-config (group)
3496 "Return the quit-config of GROUP."
3497 (gnus-group-get-parameter group 'quit-config t))
3499 (defun gnus-kill-ephemeral-group (group)
3500 "Remove ephemeral GROUP from relevant structures."
3501 (gnus-sethash group nil gnus-newsrc-hashtb))
3503 (defun gnus-simplify-mode-line ()
3504 "Make mode lines a bit simpler."
3505 (setq mode-line-modified (cdr gnus-mode-line-modified))
3506 (when (listp mode-line-format)
3507 (make-local-variable 'mode-line-format)
3508 (setq mode-line-format (copy-sequence mode-line-format))
3509 (when (equal (nth 3 mode-line-format) " ")
3510 (setcar (nthcdr 3 mode-line-format) " "))))
3512 ;;; Servers and groups.
3514 (defsubst gnus-server-add-address (method)
3515 (let ((method-name (symbol-name (car method))))
3516 (if (and (memq 'address (assoc method-name gnus-valid-select-methods))
3517 (not (assq (intern (concat method-name "-address")) method))
3518 (memq 'physical-address (assq (car method)
3519 gnus-valid-select-methods)))
3520 (append method (list (list (intern (concat method-name "-address"))
3521 (nth 1 method))))
3522 method)))
3524 (defsubst gnus-method-to-server (method &optional nocache)
3525 (catch 'server-name
3526 (setq method (or method gnus-select-method))
3528 ;; Perhaps it is already in the cache.
3529 (unless nocache
3530 (mapc (lambda (name-method)
3531 (if (equal (cdr name-method) method)
3532 (throw 'server-name (car name-method))))
3533 gnus-server-method-cache))
3535 (mapc
3536 (lambda (server-alist)
3537 (mapc (lambda (name-method)
3538 (when (gnus-methods-equal-p (cdr name-method) method)
3539 (unless (member name-method gnus-server-method-cache)
3540 (push name-method gnus-server-method-cache))
3541 (throw 'server-name (car name-method))))
3542 server-alist))
3543 (list gnus-server-alist
3544 gnus-predefined-server-alist))
3546 (let* ((name (if (member (cadr method) '(nil ""))
3547 (format "%s" (car method))
3548 (format "%s:%s" (car method) (cadr method))))
3549 (name-method (cons name method)))
3550 (unless (member name-method gnus-server-method-cache)
3551 (push name-method gnus-server-method-cache))
3552 name)))
3554 (defsubst gnus-server-to-method (server)
3555 "Map virtual server names to select methods."
3556 (or (and server (listp server) server)
3557 (cdr (assoc server gnus-server-method-cache))
3558 (let ((result
3560 ;; Perhaps this is the native server?
3561 (and (equal server "native") gnus-select-method)
3562 ;; It should be in the server alist.
3563 (cdr (assoc server gnus-server-alist))
3564 ;; It could be in the predefined server alist.
3565 (cdr (assoc server gnus-predefined-server-alist))
3566 ;; If not, we look through all the opened server
3567 ;; to see whether we can find it there.
3568 (let ((opened gnus-opened-servers))
3569 (while (and opened
3570 (not (equal server (format "%s:%s" (caaar opened)
3571 (cadaar opened)))))
3572 (pop opened))
3573 (caar opened))
3574 ;; It could be a named method, search all servers
3575 (let ((servers gnus-secondary-select-methods))
3576 (while (and servers
3577 (not (equal server (format "%s:%s" (caar servers)
3578 (cadar servers)))))
3579 (pop servers))
3580 (car servers))
3581 ;; This could be some sort of foreign server that I
3582 ;; simply haven't opened (yet). Do a brute-force scan
3583 ;; of the entire gnus-newsrc-alist for the server name
3584 ;; of every method. As a side-effect, loads the
3585 ;; gnus-server-method-cache so this only happens once,
3586 ;; if at all.
3587 (let ((alist (cdr gnus-newsrc-alist))
3588 method match)
3589 (while alist
3590 (setq method (gnus-info-method (pop alist)))
3591 (when (and (not (stringp method))
3592 (equal server (gnus-method-to-server method)))
3593 (setq match method
3594 alist nil)))
3595 match))))
3596 (when result
3597 (push (cons server result) gnus-server-method-cache))
3598 result)))
3600 (defsubst gnus-server-get-method (group method)
3601 ;; Input either a server name, and extended server name, or a
3602 ;; select method, and return a select method.
3603 (cond ((stringp method)
3604 (gnus-server-to-method method))
3605 ((equal method gnus-select-method)
3606 gnus-select-method)
3607 ((and (stringp (car method))
3608 group)
3609 (gnus-server-extend-method group method))
3610 ((and method
3611 (not group)
3612 (equal (cadr method) ""))
3613 method)
3615 (gnus-server-add-address method))))
3617 (defmacro gnus-method-equal (ss1 ss2)
3618 "Say whether two servers are equal."
3619 `(let ((s1 ,ss1)
3620 (s2 ,ss2))
3621 (or (equal s1 s2)
3622 (and (= (length s1) (length s2))
3623 (progn
3624 (while (and s1 (member (car s1) s2))
3625 (setq s1 (cdr s1)))
3626 (null s1))))))
3628 (defun gnus-methods-equal-p (m1 m2)
3629 (let ((m1 (or m1 gnus-select-method))
3630 (m2 (or m2 gnus-select-method)))
3631 (or (equal m1 m2)
3632 (and (eq (car m1) (car m2))
3633 (or (not (memq 'address (assoc (symbol-name (car m1))
3634 gnus-valid-select-methods)))
3635 (equal (nth 1 m1) (nth 1 m2)))))))
3637 (defun gnus-server-equal (m1 m2)
3638 "Say whether two methods are equal."
3639 (let ((m1 (cond ((null m1) gnus-select-method)
3640 ((stringp m1) (gnus-server-to-method m1))
3641 (t m1)))
3642 (m2 (cond ((null m2) gnus-select-method)
3643 ((stringp m2) (gnus-server-to-method m2))
3644 (t m2))))
3645 (gnus-method-equal m1 m2)))
3647 (defun gnus-servers-using-backend (backend)
3648 "Return a list of known servers using BACKEND."
3649 (let ((opened gnus-opened-servers)
3650 out)
3651 (while opened
3652 (when (eq backend (caaar opened))
3653 (push (caar opened) out))
3654 (pop opened))
3655 out))
3657 (defun gnus-archive-server-wanted-p ()
3658 "Say whether the user wants to use the archive server."
3659 (cond
3660 ((or (not gnus-message-archive-method)
3661 (not gnus-message-archive-group))
3662 nil)
3663 ((and gnus-message-archive-method gnus-message-archive-group)
3666 (let ((active (cadr (assq 'nnfolder-active-file
3667 gnus-message-archive-method))))
3668 (and active
3669 (file-exists-p active))))))
3671 (defsubst gnus-method-to-server-name (method)
3672 (concat
3673 (format "%s" (car method))
3674 (when (and
3675 (or (assoc (format "%s" (car method))
3676 (gnus-methods-using 'address))
3677 (gnus-server-equal method gnus-message-archive-method))
3678 (nth 1 method)
3679 (not (string= (nth 1 method) "")))
3680 (concat "+" (nth 1 method)))))
3682 (defsubst gnus-method-to-full-server-name (method)
3683 (format "%s+%s" (car method) (nth 1 method)))
3685 (defun gnus-group-prefixed-name (group method &optional full)
3686 "Return the whole name from GROUP and METHOD.
3687 Call with full set to get the fully qualified group name (even if the
3688 server is native)."
3689 (when (stringp method)
3690 (setq method (gnus-server-to-method method)))
3691 (if (or (not method)
3692 (and (not full) (gnus-server-equal method "native"))
3693 ;;;!!! This might not be right. We'll see...
3694 ;(string-match ":" group)
3696 group
3697 (concat (gnus-method-to-server-name method) ":" group)))
3699 (defun gnus-group-guess-prefixed-name (group)
3700 "Guess the whole name from GROUP and METHOD."
3701 (gnus-group-prefixed-name group (gnus-find-method-for-group
3702 group)))
3704 (defun gnus-group-full-name (group method)
3705 "Return the full name from GROUP and METHOD, even if the method is native."
3706 (gnus-group-prefixed-name group method t))
3708 (defun gnus-group-guess-full-name (group)
3709 "Guess the full name from GROUP, even if the method is native."
3710 (if (gnus-group-prefixed-p group)
3711 group
3712 (gnus-group-full-name group (gnus-find-method-for-group group))))
3714 (defun gnus-group-guess-full-name-from-command-method (group)
3715 "Guess the full name from GROUP, even if the method is native."
3716 (if (gnus-group-prefixed-p group)
3717 group
3718 (gnus-group-full-name group gnus-command-method)))
3720 (defun gnus-group-real-prefix (group)
3721 "Return the prefix of the current group name."
3722 (if (stringp group)
3723 (if (string-match "^[^:]+:" group)
3724 (substring group 0 (match-end 0))
3726 nil))
3728 (defun gnus-group-short-name (group)
3729 "Return the short group name."
3730 (let ((prefix (gnus-group-real-prefix group)))
3731 (if (< 0 (length prefix))
3732 (substring group (length prefix) nil)
3733 group)))
3735 (defun gnus-group-prefixed-p (group)
3736 "Return the prefix of the current group name."
3737 (< 0 (length (gnus-group-real-prefix group))))
3739 (defun gnus-summary-buffer-name (group)
3740 "Return the summary buffer name of GROUP."
3741 (concat "*Summary " (gnus-group-decoded-name group) "*"))
3743 (defun gnus-group-method (group)
3744 "Return the server or method used for selecting GROUP.
3745 You should probably use `gnus-find-method-for-group' instead."
3746 (let ((prefix (gnus-group-real-prefix group)))
3747 (if (equal prefix "")
3748 gnus-select-method
3749 (let ((servers gnus-opened-servers)
3750 (server "")
3751 backend possible found)
3752 (if (string-match "^[^\\+]+\\+" prefix)
3753 (setq backend (intern (substring prefix 0 (1- (match-end 0))))
3754 server (substring prefix (match-end 0) (1- (length prefix))))
3755 (setq backend (intern (substring prefix 0 (1- (length prefix))))))
3756 (while servers
3757 (when (eq (caaar servers) backend)
3758 (setq possible (caar servers))
3759 (when (equal (cadaar servers) server)
3760 (setq found (caar servers))))
3761 (pop servers))
3762 (or (car (rassoc found gnus-server-alist))
3763 found
3764 (car (rassoc possible gnus-server-alist))
3765 possible
3766 (list backend server))))))
3768 (defsubst gnus-native-method-p (method)
3769 "Return whether METHOD is the native select method."
3770 (gnus-method-equal method gnus-select-method))
3772 (defsubst gnus-secondary-method-p (method)
3773 "Return whether METHOD is a secondary select method."
3774 (let ((methods gnus-secondary-select-methods)
3775 (gmethod (inline (gnus-server-get-method nil method))))
3776 (while (and methods
3777 (not (gnus-method-equal
3778 (inline (gnus-server-get-method nil (car methods)))
3779 gmethod)))
3780 (setq methods (cdr methods)))
3781 methods))
3783 (defun gnus-method-simplify (method)
3784 "Return the shortest uniquely identifying string or method for METHOD."
3785 (cond ((stringp method)
3786 method)
3787 ((gnus-native-method-p method)
3788 nil)
3789 ((gnus-secondary-method-p method)
3790 (format "%s:%s" (nth 0 method) (nth 1 method)))
3792 method)))
3794 (defun gnus-groups-from-server (server)
3795 "Return a list of all groups that are fetched from SERVER."
3796 (let ((alist (cdr gnus-newsrc-alist))
3797 info groups)
3798 (while (setq info (pop alist))
3799 (when (gnus-server-equal (gnus-info-method info) server)
3800 (push (gnus-info-group info) groups)))
3801 (sort groups 'string<)))
3803 (defun gnus-group-foreign-p (group)
3804 "Say whether a group is foreign or not."
3805 (and (not (gnus-group-native-p group))
3806 (not (gnus-group-secondary-p group))))
3808 (defun gnus-group-native-p (group)
3809 "Say whether the group is native or not."
3810 (not (string-match ":" group)))
3812 (defun gnus-group-secondary-p (group)
3813 "Say whether the group is secondary or not."
3814 (gnus-secondary-method-p (gnus-find-method-for-group group)))
3816 (defun gnus-parameters-get-parameter (group)
3817 "Return the group parameters for GROUP from `gnus-parameters'."
3818 (let ((case-fold-search (if (eq gnus-parameters-case-fold-search 'default)
3819 case-fold-search
3820 gnus-parameters-case-fold-search))
3821 params-list)
3822 (dolist (elem gnus-parameters)
3823 (when (string-match (car elem) group)
3824 (setq params-list
3825 (nconc (gnus-expand-group-parameters
3826 (car elem) (cdr elem) group)
3827 params-list))))
3828 params-list))
3830 (defun gnus-expand-group-parameter (match value group)
3831 "Use MATCH to expand VALUE in GROUP."
3832 (with-temp-buffer
3833 (insert group)
3834 (goto-char (point-min))
3835 (while (re-search-forward match nil t)
3836 (replace-match value))
3837 (buffer-string)))
3839 (defun gnus-expand-group-parameters (match parameters group)
3840 "Go through PARAMETERS and expand them according to the match data."
3841 (let (new)
3842 (dolist (elem parameters)
3843 (if (and (stringp (cdr elem))
3844 (string-match "\\\\[0-9&]" (cdr elem)))
3845 (push (cons (car elem)
3846 (gnus-expand-group-parameter match (cdr elem) group))
3847 new)
3848 (push elem new)))
3849 new))
3851 (defun gnus-group-fast-parameter (group symbol &optional allow-list)
3852 "For GROUP, return the value of SYMBOL.
3854 You should call this in the `gnus-group-buffer' buffer.
3855 The function `gnus-group-find-parameter' will do that for you."
3856 ;; The speed trick: No cons'ing and quit early.
3857 (let* ((params (funcall gnus-group-get-parameter-function group))
3858 ;; Start easy, check the "real" group parameters.
3859 (simple-results
3860 (gnus-group-parameter-value params symbol allow-list t)))
3861 (if simple-results
3862 ;; Found results; return them.
3863 (car simple-results)
3864 ;; We didn't find it there, try `gnus-parameters'.
3865 (let ((result nil)
3866 (head nil)
3867 (tail gnus-parameters))
3868 ;; A good old-fashioned non-cl loop.
3869 (while tail
3870 (setq head (car tail)
3871 tail (cdr tail))
3872 ;; The car is regexp matching for matching the group name.
3873 (when (string-match (car head) group)
3874 ;; The cdr is the parameters.
3875 (setq result (gnus-group-parameter-value (cdr head)
3876 symbol allow-list))
3877 (when result
3878 ;; Expand if necessary.
3879 (if (and (stringp result) (string-match "\\\\[0-9&]" result))
3880 (setq result (gnus-expand-group-parameter (car head)
3881 result group)))
3882 ;; Exit the loop early.
3883 (setq tail nil))))
3884 ;; Done.
3885 result))))
3887 (defun gnus-group-find-parameter (group &optional symbol allow-list)
3888 "Return the group parameters for GROUP.
3889 If SYMBOL, return the value of that symbol in the group parameters.
3891 If you call this function inside a loop, consider using the faster
3892 `gnus-group-fast-parameter' instead."
3893 (save-excursion
3894 (set-buffer gnus-group-buffer)
3895 (if symbol
3896 (gnus-group-fast-parameter group symbol allow-list)
3897 (nconc
3898 (copy-sequence
3899 (funcall gnus-group-get-parameter-function group))
3900 (gnus-parameters-get-parameter group)))))
3902 (defun gnus-group-get-parameter (group &optional symbol allow-list)
3903 "Return the group parameters for GROUP.
3904 If SYMBOL, return the value of that symbol in the group parameters.
3905 If ALLOW-LIST, also allow list as a result.
3906 Most functions should use `gnus-group-find-parameter', which
3907 also examines the topic parameters."
3908 (let ((params (gnus-info-params (gnus-get-info group))))
3909 (if symbol
3910 (gnus-group-parameter-value params symbol allow-list)
3911 params)))
3913 (defun gnus-group-parameter-value (params symbol &optional
3914 allow-list present-p)
3915 "Return the value of SYMBOL in group PARAMS.
3916 If ALLOW-LIST, also allow list as a result."
3917 ;; We only wish to return group parameters (dotted lists) and
3918 ;; not local variables, which may have the same names.
3919 ;; But first we handle single elements...
3920 (or (car (memq symbol params))
3921 ;; Handle alist.
3922 (let (elem)
3923 (catch 'found
3924 (while (setq elem (pop params))
3925 (when (and (consp elem)
3926 (eq (car elem) symbol)
3927 (or allow-list
3928 (atom (cdr elem))))
3929 (throw 'found (if present-p (list (cdr elem))
3930 (cdr elem)))))))))
3932 (defun gnus-group-add-parameter (group param)
3933 "Add parameter PARAM to GROUP."
3934 (let ((info (gnus-get-info group)))
3935 (when info
3936 (gnus-group-remove-parameter group (if (consp param) (car param) param))
3937 ;; Cons the new param to the old one and update.
3938 (gnus-group-set-info (cons param (gnus-info-params info))
3939 group 'params))))
3941 (defun gnus-group-set-parameter (group name value)
3942 "Set parameter NAME to VALUE in GROUP."
3943 (let ((info (gnus-get-info group)))
3944 (when info
3945 (gnus-group-remove-parameter group name)
3946 (let ((old-params (gnus-info-params info))
3947 (new-params (list (cons name value))))
3948 (while old-params
3949 (when (or (not (listp (car old-params)))
3950 (not (eq (caar old-params) name)))
3951 (setq new-params (append new-params (list (car old-params)))))
3952 (setq old-params (cdr old-params)))
3953 (gnus-group-set-info new-params group 'params)))))
3955 (defun gnus-group-remove-parameter (group name)
3956 "Remove parameter NAME from GROUP."
3957 (let ((info (gnus-get-info group)))
3958 (when info
3959 (let ((params (gnus-info-params info)))
3960 (when params
3961 (setq params (delq name params))
3962 (while (assq name params)
3963 (gnus-pull name params))
3964 (gnus-info-set-params info params))))))
3966 (defun gnus-group-add-score (group &optional score)
3967 "Add SCORE to the GROUP score.
3968 If SCORE is nil, add 1 to the score of GROUP."
3969 (let ((info (gnus-get-info group)))
3970 (when info
3971 (gnus-info-set-score info (+ (gnus-info-score info) (or score 1))))))
3973 (defun gnus-short-group-name (group &optional levels)
3974 "Collapse GROUP name LEVELS.
3975 Select methods are stripped and any remote host name is stripped down to
3976 just the host name."
3977 (let* ((name "")
3978 (foreign "")
3979 (depth 0)
3980 (skip 1)
3981 (levels (or levels
3982 gnus-group-uncollapsed-levels
3983 (progn
3984 (while (string-match "\\." group skip)
3985 (setq skip (match-end 0)
3986 depth (+ depth 1)))
3987 depth))))
3988 ;; Separate foreign select method from group name and collapse.
3989 ;; If method contains a server, collapse to non-domain server name,
3990 ;; otherwise collapse to select method.
3991 (let* ((colon (string-match ":" group))
3992 (server (and colon (substring group 0 colon)))
3993 (plus (and server (string-match "+" server))))
3994 (when server
3995 (if plus
3996 (setq foreign (substring server (+ 1 plus)
3997 (string-match "\\." server))
3998 group (substring group (+ 1 colon)))
3999 (setq foreign server
4000 group (substring group (+ 1 colon))))
4001 (setq foreign (concat foreign ":")))
4002 ;; Collapse group name leaving LEVELS uncollapsed elements
4003 (let* ((slist (split-string group "/"))
4004 (slen (length slist))
4005 (dlist (split-string group "\\."))
4006 (dlen (length dlist))
4007 glist
4008 glen
4009 gsep
4010 res)
4011 (if (> slen dlen)
4012 (setq glist slist
4013 glen slen
4014 gsep "/")
4015 (setq glist dlist
4016 glen dlen
4017 gsep "."))
4018 (setq levels (- glen levels))
4019 (dolist (g glist)
4020 (push (if (>= (decf levels) 0)
4021 (if (zerop (length g))
4023 (substring g 0 1))
4025 res))
4026 (concat foreign (mapconcat 'identity (nreverse res) gsep))))))
4028 (defun gnus-narrow-to-body ()
4029 "Narrow to the body of an article."
4030 (narrow-to-region
4031 (progn
4032 (goto-char (point-min))
4033 (or (search-forward "\n\n" nil t)
4034 (point-max)))
4035 (point-max)))
4039 ;;; Kill file handling.
4042 (defun gnus-apply-kill-file ()
4043 "Apply a kill file to the current newsgroup.
4044 Returns the number of articles marked as read."
4045 (if (or (file-exists-p (gnus-newsgroup-kill-file nil))
4046 (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
4047 (gnus-apply-kill-file-internal)
4050 (defun gnus-kill-save-kill-buffer ()
4051 (let ((file (gnus-newsgroup-kill-file gnus-newsgroup-name)))
4052 (when (get-file-buffer file)
4053 (save-excursion
4054 (set-buffer (get-file-buffer file))
4055 (when (buffer-modified-p)
4056 (save-buffer))
4057 (kill-buffer (current-buffer))))))
4059 (defcustom gnus-kill-file-name "KILL"
4060 "Suffix of the kill files."
4061 :group 'gnus-score-kill
4062 :group 'gnus-score-files
4063 :type 'string)
4065 (defun gnus-newsgroup-kill-file (newsgroup)
4066 "Return the name of a kill file name for NEWSGROUP.
4067 If NEWSGROUP is nil, return the global kill file name instead."
4068 (cond
4069 ;; The global KILL file is placed at top of the directory.
4070 ((or (null newsgroup)
4071 (string-equal newsgroup ""))
4072 (expand-file-name gnus-kill-file-name
4073 gnus-kill-files-directory))
4074 ;; Append ".KILL" to newsgroup name.
4075 ((gnus-use-long-file-name 'not-kill)
4076 (expand-file-name (concat (gnus-newsgroup-savable-name newsgroup)
4077 "." gnus-kill-file-name)
4078 gnus-kill-files-directory))
4079 ;; Place "KILL" under the hierarchical directory.
4081 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup)
4082 "/" gnus-kill-file-name)
4083 gnus-kill-files-directory))))
4085 ;;; Server things.
4087 (defun gnus-member-of-valid (symbol group)
4088 "Find out if GROUP has SYMBOL as part of its \"valid\" spec."
4089 (memq symbol (assoc
4090 (symbol-name (car (gnus-find-method-for-group group)))
4091 gnus-valid-select-methods)))
4093 (defun gnus-method-option-p (method option)
4094 "Return non-nil if select METHOD has OPTION as a parameter."
4095 (when (stringp method)
4096 (setq method (gnus-server-to-method method)))
4097 (memq option (assoc (format "%s" (car method))
4098 gnus-valid-select-methods)))
4100 (defun gnus-similar-server-opened (method)
4101 (let ((opened gnus-opened-servers))
4102 (while (and method opened)
4103 (when (and (equal (cadr method) (cadaar opened))
4104 (equal (car method) (caaar opened))
4105 (not (equal method (caar opened))))
4106 (setq method nil))
4107 (pop opened))
4108 (not method)))
4110 (defun gnus-server-extend-method (group method)
4111 ;; This function "extends" a virtual server. If the server is
4112 ;; "hello", and the select method is ("hello" (my-var "something"))
4113 ;; in the group "alt.alt", this will result in a new virtual server
4114 ;; called "hello+alt.alt".
4115 (if (or (not (inline (gnus-similar-server-opened method)))
4116 (not (cddr method)))
4117 method
4118 `(,(car method) ,(concat (cadr method) "+" group)
4119 (,(intern (format "%s-address" (car method))) ,(cadr method))
4120 ,@(cddr method))))
4122 (defun gnus-server-status (method)
4123 "Return the status of METHOD."
4124 (nth 1 (assoc method gnus-opened-servers)))
4126 (defun gnus-group-name-to-method (group)
4127 "Guess a select method based on GROUP."
4128 (if (string-match ":" group)
4129 (let ((server (substring group 0 (match-beginning 0))))
4130 (if (string-match "\\+" server)
4131 (list (intern (substring server 0 (match-beginning 0)))
4132 (substring server (match-end 0)))
4133 (list (intern server) "")))
4134 gnus-select-method))
4136 (defun gnus-server-string (server)
4137 "Return a readable string that describes SERVER."
4138 (let* ((server (gnus-server-to-method server))
4139 (address (nth 1 server)))
4140 (if (and address
4141 (not (zerop (length address))))
4142 (format "%s using %s" address (car server))
4143 (format "%s" (car server)))))
4145 (defun gnus-find-method-for-group (group &optional info)
4146 "Find the select method that GROUP uses."
4147 (or gnus-override-method
4148 (and (not group)
4149 gnus-select-method)
4150 (and (not (gnus-group-entry group))
4151 ;; Killed or otherwise unknown group.
4153 ;; If we know a virtual server by that name, return its method.
4154 (gnus-server-to-method (gnus-group-server group))
4155 ;; Guess a new method as last resort.
4156 (gnus-group-name-to-method group)))
4157 (let ((info (or info (gnus-get-info group)))
4158 method)
4159 (if (or (not info)
4160 (not (setq method (gnus-info-method info)))
4161 (equal method "native"))
4162 gnus-select-method
4163 (setq method
4164 (cond ((stringp method)
4165 (inline (gnus-server-to-method method)))
4166 ((stringp (cadr method))
4167 (inline (gnus-server-extend-method group method)))
4169 method)))
4170 (cond ((equal (cadr method) "")
4171 method)
4172 ((null (cadr method))
4173 (list (car method) ""))
4175 (gnus-server-add-address method)))))))
4177 (defun gnus-methods-using (feature)
4178 "Find all methods that have FEATURE."
4179 (let ((valids gnus-valid-select-methods)
4180 outs)
4181 (while valids
4182 (when (memq feature (car valids))
4183 (push (car valids) outs))
4184 (setq valids (cdr valids)))
4185 outs))
4187 (eval-and-compile
4188 (autoload 'message-y-or-n-p "message" nil nil 'macro))
4190 (defun gnus-read-group (prompt &optional default)
4191 "Prompt the user for a group name.
4192 Disallow invalid group names."
4193 (let ((prefix "")
4194 group)
4195 (while (not group)
4196 (when (string-match
4197 gnus-invalid-group-regexp
4198 (setq group (read-string (concat prefix prompt)
4199 (cons (or default "") 0)
4200 'gnus-group-history)))
4201 (let ((match (match-string 0 group)))
4202 ;; Might be okay (e.g. for nnimap), so ask the user:
4203 (unless (and (not (string-match "^$\\|:" match))
4204 (message-y-or-n-p
4205 "Proceed and create group anyway? " t
4206 "The group name \"" group "\" contains a forbidden character: \"" match "\".
4208 Usually, it's dangerous to create a group with this name, because it's not
4209 supported by all back ends and servers. On IMAP servers it should work,
4210 though. If you are really sure, you can proceed anyway and create the group.
4212 You may customize the variable `gnus-invalid-group-regexp', which currently is
4213 set to \"" gnus-invalid-group-regexp
4214 "\", if you want to get rid of this query permanently."))
4215 (setq prefix (format "Invalid group name: \"%s\". " group)
4216 group nil)))))
4217 group))
4219 (defun gnus-read-method (prompt)
4220 "Prompt the user for a method.
4221 Allow completion over sensible values."
4222 (let* ((open-servers
4223 (mapcar (lambda (i) (cons (format "%s:%s" (caar i) (cadar i)) i))
4224 gnus-opened-servers))
4225 (valid-methods
4226 (let (methods)
4227 (dolist (method gnus-valid-select-methods)
4228 (if (or (memq 'prompt-address method)
4229 (not (assoc (format "%s:" (car method)) open-servers)))
4230 (push method methods)))
4231 methods))
4232 (servers
4233 (append valid-methods
4234 open-servers
4235 gnus-predefined-server-alist
4236 gnus-server-alist))
4237 (method
4238 (completing-read
4239 prompt servers
4240 nil t nil 'gnus-method-history)))
4241 (cond
4242 ((equal method "")
4243 (setq method gnus-select-method))
4244 ((assoc method gnus-valid-select-methods)
4245 (let ((address (if (memq 'prompt-address
4246 (assoc method gnus-valid-select-methods))
4247 (read-string "Address: ")
4248 "")))
4249 (or (cadr (assoc (format "%s:%s" method address) open-servers))
4250 (list (intern method) address))))
4251 ((assoc method servers)
4252 method)
4254 (list (intern method) "")))))
4256 ;;; Agent functions
4258 (defun gnus-agent-method-p (method-or-server)
4259 "Say whether METHOD is covered by the agent."
4260 (or (eq (car gnus-agent-method-p-cache) method-or-server)
4261 (let* ((method (if (stringp method-or-server)
4262 (gnus-server-to-method method-or-server)
4263 method-or-server))
4264 (server (gnus-method-to-server method t)))
4265 (setq gnus-agent-method-p-cache
4266 (cons method-or-server
4267 (member server gnus-agent-covered-methods)))))
4268 (cdr gnus-agent-method-p-cache))
4270 (defun gnus-online (method)
4271 (not
4272 (if gnus-plugged
4273 (eq (cadr (assoc method gnus-opened-servers)) 'offline)
4274 (gnus-agent-method-p method))))
4276 ;;; User-level commands.
4278 ;;;###autoload
4279 (defun gnus-slave-no-server (&optional arg)
4280 "Read network news as a slave, without connecting to the local server."
4281 (interactive "P")
4282 (gnus-no-server arg t))
4284 ;;;###autoload
4285 (defun gnus-no-server (&optional arg slave)
4286 "Read network news.
4287 If ARG is a positive number, Gnus will use that as the startup
4288 level. If ARG is nil, Gnus will be started at level 2. If ARG is
4289 non-nil and not a positive number, Gnus will prompt the user for the
4290 name of an NNTP server to use.
4291 As opposed to `gnus', this command will not connect to the local
4292 server."
4293 (interactive "P")
4294 (gnus-no-server-1 arg slave))
4296 ;;;###autoload
4297 (defun gnus-slave (&optional arg)
4298 "Read news as a slave."
4299 (interactive "P")
4300 (gnus arg nil 'slave))
4302 ;;;###autoload
4303 (defun gnus-other-frame (&optional arg display)
4304 "Pop up a frame to read news.
4305 This will call one of the Gnus commands which is specified by the user
4306 option `gnus-other-frame-function' (default `gnus') with the argument
4307 ARG if Gnus is not running, otherwise just pop up a Gnus frame. The
4308 optional second argument DISPLAY should be a standard display string
4309 such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is
4310 omitted or the function `make-frame-on-display' is not available, the
4311 current display is used."
4312 (interactive "P")
4313 (if (fboundp 'make-frame-on-display)
4314 (unless display
4315 (setq display (gnus-frame-or-window-display-name (selected-frame))))
4316 (setq display nil))
4317 (let ((alive (gnus-alive-p)))
4318 (unless (and alive
4319 (catch 'found
4320 (walk-windows
4321 (lambda (window)
4322 (when (and (or (not display)
4323 (equal display
4324 (gnus-frame-or-window-display-name
4325 window)))
4326 (with-current-buffer (window-buffer window)
4327 (string-match "\\`gnus-"
4328 (symbol-name major-mode))))
4329 (gnus-select-frame-set-input-focus
4330 (setq gnus-other-frame-object (window-frame window)))
4331 (select-window window)
4332 (throw 'found t)))
4333 'ignore t)))
4334 (gnus-select-frame-set-input-focus
4335 (setq gnus-other-frame-object
4336 (if display
4337 (make-frame-on-display display gnus-other-frame-parameters)
4338 (make-frame gnus-other-frame-parameters))))
4339 (if alive
4340 (switch-to-buffer gnus-group-buffer)
4341 (funcall gnus-other-frame-function arg)
4342 (add-hook 'gnus-exit-gnus-hook
4343 '(lambda nil
4344 (when (and (frame-live-p gnus-other-frame-object)
4345 (cdr (frame-list)))
4346 (delete-frame gnus-other-frame-object))
4347 (setq gnus-other-frame-object nil)))))))
4349 ;;;###autoload
4350 (defun gnus (&optional arg dont-connect slave)
4351 "Read network news.
4352 If ARG is non-nil and a positive number, Gnus will use that as the
4353 startup level. If ARG is non-nil and not a positive number, Gnus will
4354 prompt the user for the name of an NNTP server to use."
4355 (interactive "P")
4356 (unless (byte-code-function-p (symbol-function 'gnus))
4357 (message "You should byte-compile Gnus")
4358 (sit-for 2))
4359 (gnus-1 arg dont-connect slave))
4361 ;; Allow redefinition of Gnus functions.
4363 (gnus-ems-redefine)
4365 (provide 'gnus)
4367 ;;; arch-tag: acebeeab-f331-4f8f-a7ea-89c58c84f636
4368 ;;; gnus.el ends here