/[emacs]/emacs/lisp/gnus/gnus.el
ViewVC logotype

Diff of /emacs/lisp/gnus/gnus.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by miles, Mon Sep 1 15:45:24 2003 UTC revision 1.28 by miles, Sat Sep 4 13:13:43 2004 UTC
# Line 1  Line 1 
1  ;;; gnus.el --- a newsreader for GNU Emacs  ;;; gnus.el --- a newsreader for GNU Emacs
2    
3  ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,  ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,
4  ;;               1998, 2000, 2001, 2002 Free Software Foundation, Inc.  ;; 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5    
6  ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>  ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7  ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>  ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>
# Line 30  Line 31 
31  (eval '(run-hooks 'gnus-load-hook))  (eval '(run-hooks 'gnus-load-hook))
32    
33  (eval-when-compile (require 'cl))  (eval-when-compile (require 'cl))
34    (require 'wid-edit)
35  (require 'mm-util)  (require 'mm-util)
36    (require 'nnheader)
37    
38  (defgroup gnus nil  (defgroup gnus nil
39    "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."    "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
40    :group 'news    :group 'news
41    :group 'mail)    :group 'mail)
42    
43    (defgroup gnus-format nil
44      "Dealing with formatting issues."
45      :group 'gnus)
46    
47  (defgroup gnus-charset nil  (defgroup gnus-charset nil
48    "Group character set issues."    "Group character set issues."
49    :link '(custom-manual "(gnus)Charsets")    :link '(custom-manual "(gnus)Charsets")
# Line 45  Line 52 
52    
53  (defgroup gnus-cache nil  (defgroup gnus-cache nil
54    "Cache interface."    "Cache interface."
55      :link '(custom-manual "(gnus)Article Caching")
56      :group 'gnus)
57    
58    (defgroup gnus-registry nil
59      "Article Registry."
60    :group 'gnus)    :group 'gnus)
61    
62  (defgroup gnus-start nil  (defgroup gnus-start nil
# Line 58  Line 70 
70  ;; These belong to gnus-group.el.  ;; These belong to gnus-group.el.
71  (defgroup gnus-group nil  (defgroup gnus-group nil
72    "Group buffers."    "Group buffers."
73    :link '(custom-manual "(gnus)The Group Buffer")    :link '(custom-manual "(gnus)Group Buffer")
74    :group 'gnus)    :group 'gnus)
75    
76  (defgroup gnus-group-foreign nil  (defgroup gnus-group-foreign nil
# Line 99  Line 111 
111  ;; These belong to gnus-sum.el.  ;; These belong to gnus-sum.el.
112  (defgroup gnus-summary nil  (defgroup gnus-summary nil
113    "Summary buffers."    "Summary buffers."
114    :link '(custom-manual "(gnus)The Summary Buffer")    :link '(custom-manual "(gnus)Summary Buffer")
115    :group 'gnus)    :group 'gnus)
116    
117  (defgroup gnus-summary-exit nil  (defgroup gnus-summary-exit nil
# Line 132  Line 144 
144    :link '(custom-manual "(gnus)Summary Maneuvering")    :link '(custom-manual "(gnus)Summary Maneuvering")
145    :group 'gnus-summary)    :group 'gnus-summary)
146    
147    (defgroup gnus-picon nil
148      "Show pictures of people, domains, and newsgroups."
149      :group 'gnus-visual)
150    
151  (defgroup gnus-summary-mail nil  (defgroup gnus-summary-mail nil
152    "Mail group commands."    "Mail group commands."
153    :link '(custom-manual "(gnus)Mail Group Commands")    :link '(custom-manual "(gnus)Mail Group Commands")
# Line 139  Line 155 
155    
156  (defgroup gnus-summary-sort nil  (defgroup gnus-summary-sort nil
157    "Sorting the summary buffer."    "Sorting the summary buffer."
158    :link '(custom-manual "(gnus)Sorting")    :link '(custom-manual "(gnus)Sorting the Summary Buffer")
159    :group 'gnus-summary)    :group 'gnus-summary)
160    
161  (defgroup gnus-summary-visual nil  (defgroup gnus-summary-visual nil
# Line 207  Line 223 
223    
224  ;; Other  ;; Other
225  (defgroup gnus-visual nil  (defgroup gnus-visual nil
226    "Options controling the visual fluff."    "Options controlling the visual fluff."
227    :group 'gnus    :group 'gnus
228    :group 'faces)    :group 'faces)
229    
# Line 232  Line 248 
248    "Options related to newsservers and other servers used by Gnus."    "Options related to newsservers and other servers used by Gnus."
249    :group 'gnus)    :group 'gnus)
250    
251    (defgroup gnus-server-visual nil
252      "Highlighting and menus in the server buffer."
253      :group 'gnus-visual
254      :group 'gnus-server)
255    
256  (defgroup gnus-message '((message custom-group))  (defgroup gnus-message '((message custom-group))
257    "Composing replies and followups in Gnus."    "Composing replies and followups in Gnus."
258    :group 'gnus)    :group 'gnus)
259    
260  (defgroup gnus-meta nil  (defgroup gnus-meta nil
261    "Meta variables controling major portions of Gnus.    "Meta variables controlling major portions of Gnus.
262  In general, modifying these variables does not take affect until Gnus  In general, modifying these variables does not take affect until Gnus
263  is restarted, and sometimes reloaded."  is restarted, and sometimes reloaded."
264    :group 'gnus)    :group 'gnus)
# Line 256  is restarted, and sometimes reloaded." Line 277  is restarted, and sometimes reloaded."
277    :link '(custom-manual "(gnus)Exiting Gnus")    :link '(custom-manual "(gnus)Exiting Gnus")
278    :group 'gnus)    :group 'gnus)
279    
280  (defconst gnus-version-number "5.9.0"  (defgroup gnus-fun nil
281      "Frivolous Gnus extensions."
282      :link '(custom-manual "(gnus)Exiting Gnus")
283      :group 'gnus)
284    
285    (defconst gnus-version-number "5.10.6"
286    "Version number for this version of Gnus.")    "Version number for this version of Gnus.")
287    
288  (defconst gnus-version (format "Gnus v%s" gnus-version-number)  (defconst gnus-version (format "Gnus v%s" gnus-version-number)
# Line 274  be set in `.emacs' instead." Line 300  be set in `.emacs' instead."
300    :group 'gnus-start    :group 'gnus-start
301    :type 'boolean)    :type 'boolean)
302    
303    (unless (fboundp 'gnus-group-remove-excess-properties)
304      (defalias 'gnus-group-remove-excess-properties 'ignore))
305    
306    (unless (fboundp 'gnus-set-text-properties)
307      (defalias 'gnus-set-text-properties 'set-text-properties))
308    
309  (unless (featurep 'gnus-xmas)  (unless (featurep 'gnus-xmas)
310    (defalias 'gnus-make-overlay 'make-overlay)    (defalias 'gnus-make-overlay 'make-overlay)
311    (defalias 'gnus-delete-overlay 'delete-overlay)    (defalias 'gnus-delete-overlay 'delete-overlay)
# Line 284  be set in `.emacs' instead." Line 316  be set in `.emacs' instead."
316    (defalias 'gnus-overlay-end 'overlay-end)    (defalias 'gnus-overlay-end 'overlay-end)
317    (defalias 'gnus-extent-detached-p 'ignore)    (defalias 'gnus-extent-detached-p 'ignore)
318    (defalias 'gnus-extent-start-open 'ignore)    (defalias 'gnus-extent-start-open 'ignore)
   (defalias 'gnus-set-text-properties 'set-text-properties)  
   (defalias 'gnus-group-remove-excess-properties 'ignore)  
319    (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)    (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
320    (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)    (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
321    (defalias 'gnus-character-to-event 'identity)    (defalias 'gnus-character-to-event 'identity)
322      (defalias 'gnus-assq-delete-all 'assq-delete-all)
323    (defalias 'gnus-add-text-properties 'add-text-properties)    (defalias 'gnus-add-text-properties 'add-text-properties)
324    (defalias 'gnus-put-text-property 'put-text-property)    (defalias 'gnus-put-text-property 'put-text-property)
325    (defvar gnus-mode-line-image-cache t)    (defvar gnus-mode-line-image-cache t)
# Line 308  be set in `.emacs' instead." Line 339  be set in `.emacs' instead."
339                                           (:type xbm :file "gnus-pointer.xbm"                                           (:type xbm :file "gnus-pointer.xbm"
340                                                  :ascent center))))                                                  :ascent center))))
341                                gnus-mode-line-image-cache)                                gnus-mode-line-image-cache)
342                              'help-echo "This is Gnus")                              'help-echo (format
343                                            "This is %s, %s."
344                                            gnus-version (gnus-emacs-version)))
345                        str)                        str)
346                       (list str))                       (list str))
347              line)))              line)))
# Line 317  be set in `.emacs' instead." Line 350  be set in `.emacs' instead."
350    (defalias 'gnus-deactivate-mark 'deactivate-mark)    (defalias 'gnus-deactivate-mark 'deactivate-mark)
351    (defalias 'gnus-window-edges 'window-edges)    (defalias 'gnus-window-edges 'window-edges)
352    (defalias 'gnus-key-press-event-p 'numberp)    (defalias 'gnus-key-press-event-p 'numberp)
353    (defalias 'gnus-decode-rfc1522 'ignore))    ;;(defalias 'gnus-decode-rfc1522 'ignore)
354      )
355    
356  ;; We define these group faces here to avoid the display  ;; We define these group faces here to avoid the display
357  ;; update forced when creating new faces.  ;; update forced when creating new faces.
# Line 325  be set in `.emacs' instead." Line 359  be set in `.emacs' instead."
359  (defface gnus-group-news-1-face  (defface gnus-group-news-1-face
360    '((((class color)    '((((class color)
361        (background dark))        (background dark))
362       (:foreground "PaleTurquoise" :weight bold))       (:foreground "PaleTurquoise" :bold t))
363      (((class color)      (((class color)
364        (background light))        (background light))
365       (:foreground "ForestGreen" :weight bold))       (:foreground "ForestGreen" :bold t))
366      (t      (t
367       ()))       ()))
368    "Level 1 newsgroup face.")    "Level 1 newsgroup face.")
# Line 347  be set in `.emacs' instead." Line 381  be set in `.emacs' instead."
381  (defface gnus-group-news-2-face  (defface gnus-group-news-2-face
382    '((((class color)    '((((class color)
383        (background dark))        (background dark))
384       (:foreground "turquoise" :weight bold))       (:foreground "turquoise" :bold t))
385      (((class color)      (((class color)
386        (background light))        (background light))
387       (:foreground "CadetBlue4" :weight bold))       (:foreground "CadetBlue4" :bold t))
388      (t      (t
389       ()))       ()))
390    "Level 2 newsgroup face.")    "Level 2 newsgroup face.")
# Line 369  be set in `.emacs' instead." Line 403  be set in `.emacs' instead."
403  (defface gnus-group-news-3-face  (defface gnus-group-news-3-face
404    '((((class color)    '((((class color)
405        (background dark))        (background dark))
406       (:weight bold))       (:bold t))
407      (((class color)      (((class color)
408        (background light))        (background light))
409       (:weight bold))       (:bold t))
410      (t      (t
411       ()))       ()))
412    "Level 3 newsgroup face.")    "Level 3 newsgroup face.")
# Line 391  be set in `.emacs' instead." Line 425  be set in `.emacs' instead."
425  (defface gnus-group-news-4-face  (defface gnus-group-news-4-face
426    '((((class color)    '((((class color)
427        (background dark))        (background dark))
428       (:weight bold))       (:bold t))
429      (((class color)      (((class color)
430        (background light))        (background light))
431       (:weight bold))       (:bold t))
432      (t      (t
433       ()))       ()))
434    "Level 4 newsgroup face.")    "Level 4 newsgroup face.")
# Line 413  be set in `.emacs' instead." Line 447  be set in `.emacs' instead."
447  (defface gnus-group-news-5-face  (defface gnus-group-news-5-face
448    '((((class color)    '((((class color)
449        (background dark))        (background dark))
450       (:weight bold))       (:bold t))
451      (((class color)      (((class color)
452        (background light))        (background light))
453       (:weight bold))       (:bold t))
454      (t      (t
455       ()))       ()))
456    "Level 5 newsgroup face.")    "Level 5 newsgroup face.")
# Line 435  be set in `.emacs' instead." Line 469  be set in `.emacs' instead."
469  (defface gnus-group-news-6-face  (defface gnus-group-news-6-face
470    '((((class color)    '((((class color)
471        (background dark))        (background dark))
472       (:weight bold))       (:bold t))
473      (((class color)      (((class color)
474        (background light))        (background light))
475       (:weight bold))       (:bold t))
476      (t      (t
477       ()))       ()))
478    "Level 6 newsgroup face.")    "Level 6 newsgroup face.")
# Line 457  be set in `.emacs' instead." Line 491  be set in `.emacs' instead."
491  (defface gnus-group-news-low-face  (defface gnus-group-news-low-face
492    '((((class color)    '((((class color)
493        (background dark))        (background dark))
494       (:foreground "DarkTurquoise" :weight bold))       (:foreground "DarkTurquoise" :bold t))
495      (((class color)      (((class color)
496        (background light))        (background light))
497       (:foreground "DarkGreen" :weight bold))       (:foreground "DarkGreen" :bold t))
498      (t      (t
499       ()))       ()))
500    "Low level newsgroup face.")    "Low level newsgroup face.")
# Line 479  be set in `.emacs' instead." Line 513  be set in `.emacs' instead."
513  (defface gnus-group-mail-1-face  (defface gnus-group-mail-1-face
514    '((((class color)    '((((class color)
515        (background dark))        (background dark))
516       (:foreground "aquamarine1" :weight bold))       (:foreground "aquamarine1" :bold t))
517      (((class color)      (((class color)
518        (background light))        (background light))
519       (:foreground "DeepPink3" :weight bold))       (:foreground "DeepPink3" :bold t))
520      (t      (t
521       (:weight bold)))       (:bold t)))
522    "Level 1 mailgroup face.")    "Level 1 mailgroup face.")
523    
524  (defface gnus-group-mail-1-empty-face  (defface gnus-group-mail-1-empty-face
# Line 495  be set in `.emacs' instead." Line 529  be set in `.emacs' instead."
529        (background light))        (background light))
530       (:foreground "DeepPink3"))       (:foreground "DeepPink3"))
531      (t      (t
532       (:slant italic :weight bold)))       (:italic t :bold t)))
533    "Level 1 empty mailgroup face.")    "Level 1 empty mailgroup face.")
534    
535  (defface gnus-group-mail-2-face  (defface gnus-group-mail-2-face
536    '((((class color)    '((((class color)
537        (background dark))        (background dark))
538       (:foreground "aquamarine2" :weight bold))       (:foreground "aquamarine2" :bold t))
539      (((class color)      (((class color)
540        (background light))        (background light))
541       (:foreground "HotPink3" :weight bold))       (:foreground "HotPink3" :bold t))
542      (t      (t
543       (:weight bold)))       (:bold t)))
544    "Level 2 mailgroup face.")    "Level 2 mailgroup face.")
545    
546  (defface gnus-group-mail-2-empty-face  (defface gnus-group-mail-2-empty-face
# Line 517  be set in `.emacs' instead." Line 551  be set in `.emacs' instead."
551        (background light))        (background light))
552       (:foreground "HotPink3"))       (:foreground "HotPink3"))
553      (t      (t
554       (:weight bold)))       (:bold t)))
555    "Level 2 empty mailgroup face.")    "Level 2 empty mailgroup face.")
556    
557  (defface gnus-group-mail-3-face  (defface gnus-group-mail-3-face
558    '((((class color)    '((((class color)
559        (background dark))        (background dark))
560       (:foreground "aquamarine3" :weight bold))       (:foreground "aquamarine3" :bold t))
561      (((class color)      (((class color)
562        (background light))        (background light))
563       (:foreground "magenta4" :weight bold))       (:foreground "magenta4" :bold t))
564      (t      (t
565       (:weight bold)))       (:bold t)))
566    "Level 3 mailgroup face.")    "Level 3 mailgroup face.")
567    
568  (defface gnus-group-mail-3-empty-face  (defface gnus-group-mail-3-empty-face
# Line 545  be set in `.emacs' instead." Line 579  be set in `.emacs' instead."
579  (defface gnus-group-mail-low-face  (defface gnus-group-mail-low-face
580    '((((class color)    '((((class color)
581        (background dark))        (background dark))
582       (:foreground "aquamarine4" :weight bold))       (:foreground "aquamarine4" :bold t))
583      (((class color)      (((class color)
584        (background light))        (background light))
585       (:foreground "DeepPink4" :weight bold))       (:foreground "DeepPink4" :bold t))
586      (t      (t
587       (:weight bold)))       (:bold t)))
588    "Low level mailgroup face.")    "Low level mailgroup face.")
589    
590  (defface gnus-group-mail-low-empty-face  (defface gnus-group-mail-low-empty-face
# Line 561  be set in `.emacs' instead." Line 595  be set in `.emacs' instead."
595        (background light))        (background light))
596       (:foreground "DeepPink4"))       (:foreground "DeepPink4"))
597      (t      (t
598       (:weight bold)))       (:bold t)))
599    "Low level empty mailgroup face.")    "Low level empty mailgroup face.")
600    
601  ;; Summary mode faces.  ;; Summary mode faces.
# Line 578  be set in `.emacs' instead." Line 612  be set in `.emacs' instead."
612  (defface gnus-summary-high-ticked-face  (defface gnus-summary-high-ticked-face
613    '((((class color)    '((((class color)
614        (background dark))        (background dark))
615       (:foreground "pink" :weight bold))       (:foreground "pink" :bold t))
616      (((class color)      (((class color)
617        (background light))        (background light))
618       (:foreground "firebrick" :weight bold))       (:foreground "firebrick" :bold t))
619      (t      (t
620       (:weight bold)))       (:bold t)))
621    "Face used for high interest ticked articles.")    "Face used for high interest ticked articles.")
622    
623  (defface gnus-summary-low-ticked-face  (defface gnus-summary-low-ticked-face
624    '((((class color)    '((((class color)
625        (background dark))        (background dark))
626       (:foreground "pink" :slant italic))       (:foreground "pink" :italic t))
627      (((class color)      (((class color)
628        (background light))        (background light))
629       (:foreground "firebrick" :slant italic))       (:foreground "firebrick" :italic t))
630      (t      (t
631       (:slant italic)))       (:italic t)))
632    "Face used for low interest ticked articles.")    "Face used for low interest ticked articles.")
633    
634  (defface gnus-summary-normal-ticked-face  (defface gnus-summary-normal-ticked-face
# Line 611  be set in `.emacs' instead." Line 645  be set in `.emacs' instead."
645  (defface gnus-summary-high-ancient-face  (defface gnus-summary-high-ancient-face
646    '((((class color)    '((((class color)
647        (background dark))        (background dark))
648       (:foreground "SkyBlue" :weight bold))       (:foreground "SkyBlue" :bold t))
649      (((class color)      (((class color)
650        (background light))        (background light))
651       (:foreground "RoyalBlue" :weight bold))       (:foreground "RoyalBlue" :bold t))
652      (t      (t
653       (:weight bold)))       (:bold t)))
654    "Face used for high interest ancient articles.")    "Face used for high interest ancient articles.")
655    
656  (defface gnus-summary-low-ancient-face  (defface gnus-summary-low-ancient-face
657    '((((class color)    '((((class color)
658        (background dark))        (background dark))
659       (:foreground "SkyBlue" :slant italic))       (:foreground "SkyBlue" :italic t))
660      (((class color)      (((class color)
661        (background light))        (background light))
662       (:foreground "RoyalBlue" :slant italic))       (:foreground "RoyalBlue" :italic t))
663      (t      (t
664       (:slant italic)))       (:italic t)))
665    "Face used for low interest ancient articles.")    "Face used for low interest ancient articles.")
666    
667  (defface gnus-summary-normal-ancient-face  (defface gnus-summary-normal-ancient-face
# Line 641  be set in `.emacs' instead." Line 675  be set in `.emacs' instead."
675       ()))       ()))
676    "Face used for normal interest ancient articles.")    "Face used for normal interest ancient articles.")
677    
678    (defface gnus-summary-high-undownloaded-face
679       '((((class color)
680           (background light))
681          (:bold t :foreground "cyan4"))
682         (((class color) (background dark))
683          (:bold t :foreground "LightGray"))
684         (t (:inverse-video t :bold t)))
685      "Face used for high interest uncached articles.")
686    
687    (defface gnus-summary-low-undownloaded-face
688       '((((class color)
689           (background light))
690          (:italic t :foreground "cyan4" :bold nil))
691         (((class color) (background dark))
692          (:italic t :foreground "LightGray" :bold nil))
693         (t (:inverse-video t :italic t)))
694      "Face used for low interest uncached articles.")
695    
696    (defface gnus-summary-normal-undownloaded-face
697       '((((class color)
698           (background light))
699          (:foreground "cyan4" :bold nil))
700         (((class color) (background dark))
701          (:foreground "LightGray" :bold nil))
702         (t (:inverse-video t)))
703      "Face used for normal interest uncached articles.")
704    
705  (defface gnus-summary-high-unread-face  (defface gnus-summary-high-unread-face
706    '((t    '((t
707       (:weight bold)))       (:bold t)))
708    "Face used for high interest unread articles.")    "Face used for high interest unread articles.")
709    
710  (defface gnus-summary-low-unread-face  (defface gnus-summary-low-unread-face
711    '((t    '((t
712       (:slant italic)))       (:italic t)))
713    "Face used for low interest unread articles.")    "Face used for low interest unread articles.")
714    
715  (defface gnus-summary-normal-unread-face  (defface gnus-summary-normal-unread-face
# Line 660  be set in `.emacs' instead." Line 721  be set in `.emacs' instead."
721    '((((class color)    '((((class color)
722        (background dark))        (background dark))
723       (:foreground "PaleGreen"       (:foreground "PaleGreen"
724                    :weight bold))                    :bold t))
725      (((class color)      (((class color)
726        (background light))        (background light))
727       (:foreground "DarkGreen"       (:foreground "DarkGreen"
728                    :weight bold))                    :bold t))
729      (t      (t
730       (:weight bold)))       (:bold t)))
731    "Face used for high interest read articles.")    "Face used for high interest read articles.")
732    
733  (defface gnus-summary-low-read-face  (defface gnus-summary-low-read-face
734    '((((class color)    '((((class color)
735        (background dark))        (background dark))
736       (:foreground "PaleGreen"       (:foreground "PaleGreen"
737                    :slant italic))                    :italic t))
738      (((class color)      (((class color)
739        (background light))        (background light))
740       (:foreground "DarkGreen"       (:foreground "DarkGreen"
741                    :slant italic))                    :italic t))
742      (t      (t
743       (:slant italic)))       (:italic t)))
744    "Face used for low interest read articles.")    "Face used for low interest read articles.")
745    
746  (defface gnus-summary-normal-read-face  (defface gnus-summary-normal-read-face
# Line 709  be set in `.emacs' instead." Line 770  be set in `.emacs' instead."
770    "Add the current buffer to the list of Gnus buffers."    "Add the current buffer to the list of Gnus buffers."
771    (push (current-buffer) gnus-buffers))    (push (current-buffer) gnus-buffers))
772    
773    (defmacro gnus-kill-buffer (buffer)
774      "Kill BUFFER and remove from the list of Gnus buffers."
775      `(let ((buf ,buffer))
776         (when (gnus-buffer-exists-p buf)
777           (setq gnus-buffers (delete (get-buffer buf) gnus-buffers))
778           (kill-buffer buf))))
779    
780  (defun gnus-buffers ()  (defun gnus-buffers ()
781    "Return a list of live Gnus buffers."    "Return a list of live Gnus buffers."
782    (while (and gnus-buffers    (while (and gnus-buffers
# Line 731  be set in `.emacs' instead." Line 799  be set in `.emacs' instead."
799  (defface gnus-splash-face  (defface gnus-splash-face
800    '((((class color)    '((((class color)
801        (background dark))        (background dark))
802       (:foreground "Brown"))       (:foreground "#888888"))
803      (((class color)      (((class color)
804        (background light))        (background light))
805       (:foreground "Brown"))       (:foreground "#888888"))
806      (t      (t
807       ()))       ()))
808    "Face of the splash screen.")    "Face for the splash screen.")
809    
810  (defun gnus-splash ()  (defun gnus-splash ()
811    (save-excursion    (save-excursion
# Line 765  be set in `.emacs' instead." Line 833  be set in `.emacs' instead."
833    
834  (defvar gnus-simple-splash nil)  (defvar gnus-simple-splash nil)
835    
836    ;;(format "%02x%02x%02x" 114 66 20) "724214"
837    
838    (defvar gnus-logo-color-alist
839      '((flame "#cc3300" "#ff2200")
840        (pine "#c0cc93" "#f8ffb8")
841        (moss "#a1cc93" "#d2ffb8")
842        (irish "#04cc90" "#05ff97")
843        (sky "#049acc" "#05deff")
844        (tin "#6886cc" "#82b6ff")
845        (velvet "#7c68cc" "#8c82ff")
846        (grape "#b264cc" "#cf7df")
847        (labia "#cc64c2" "#fd7dff")
848        (berry "#cc6485" "#ff7db5")
849        (dino "#724214" "#1e3f03")
850        (oort "#cccccc" "#888888")
851        (storm "#666699" "#99ccff")
852        (pdino "#9999cc" "#99ccff")
853        (purp "#9999cc" "#666699")
854        (no "#000000" "#ff0000")
855        (neutral "#b4b4b4" "#878787")
856        (september "#bf9900" "#ffcc00"))
857      "Color alist used for the Gnus logo.")
858    
859    (defcustom gnus-logo-color-style 'oort
860      "*Color styles used for the Gnus logo."
861      :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
862                               gnus-logo-color-alist))
863      :group 'gnus-xmas)
864    
865    (defvar gnus-logo-colors
866      (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
867      "Colors used for the Gnus logo.")
868    
869  (defun gnus-group-startup-message (&optional x y)  (defun gnus-group-startup-message (&optional x y)
870    "Insert startup message in current buffer."    "Insert startup message in current buffer."
871    ;; Insert the message.    ;; Insert the message.
# Line 773  be set in `.emacs' instead." Line 874  be set in `.emacs' instead."
874     ((and     ((and
875       (fboundp 'find-image)       (fboundp 'find-image)
876       (display-graphic-p)       (display-graphic-p)
877       (let ((image (find-image       (let* ((data-directory (nnheader-find-etc-directory "gnus"))
878                     `((:type xpm :file "gnus.xpm")              (image (find-image
879                       (:type pbm :file "gnus.pbm"                      `((:type xpm :file "gnus.xpm"
880                              ;; Account for the pbm's blackground.                               :color-symbols
881                              :background ,(face-foreground 'gnus-splash-face)                               (("thing" . ,(car gnus-logo-colors))
882                              :foreground ,(face-background 'default))                                ("shadow" . ,(cadr gnus-logo-colors))
883                       (:type xbm :file "gnus.xbm"                                ("oort" . "#eeeeee")
884                              ;; Account for the xbm's blackground.                                ("background" . ,(face-background 'default))))
885                              :background ,(face-foreground 'gnus-splash-face)                        (:type pbm :file "gnus.pbm"
886                              :foreground ,(face-background 'default))))))                               ;; Account for the pbm's blackground.
887                                 :background ,(face-foreground 'gnus-splash-face)
888                                 :foreground ,(face-background 'default))
889                          (:type xbm :file "gnus.xbm"
890                                 ;; Account for the xbm's blackground.
891                                 :background ,(face-foreground 'gnus-splash-face)
892                                 :foreground ,(face-background 'default))))))
893         (when image         (when image
894           (let ((size (image-size image)))           (let ((size (image-size image)))
895             (insert-char ?\n (max 0 (round (- (window-height)             (insert-char ?\n (max 0 (round (- (window-height)
# Line 833  be set in `.emacs' instead." Line 940  be set in `.emacs' instead."
940    
941  (eval-when (load)  (eval-when (load)
942    (let ((command (format "%s" this-command)))    (let ((command (format "%s" this-command)))
943      (if (and (string-match "gnus" command)      (when (string-match "gnus" command)
944               (not (string-match "gnus-other-frame" command)))        (if (string-match "gnus-other-frame" command)
945          (gnus-splash)            (gnus-get-buffer-create gnus-group-buffer)
946        (gnus-get-buffer-create gnus-group-buffer))))          (gnus-splash)))))
947    
948  ;;; Do the rest.  ;;; Do the rest.
949    
950  (require 'gnus-util)  (require 'gnus-util)
951  (require 'nnheader)  (require 'nnheader)
952    
953    (defcustom gnus-parameters nil
954      "Alist of group parameters.
955    
956    For example:
957       ((\"mail\\\\..*\"  (gnus-show-threads nil)
958                      (gnus-use-scoring nil)
959                      (gnus-summary-line-format
960                            \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
961                      (gcc-self . t)
962                      (display . all))
963         (\"mail\\\\.me\" (gnus-use-scoring  t))
964         (\"list\\\\..*\" (total-expire . t)
965                      (broken-reply-to . t)))"
966      :group 'gnus-group-various
967      :type '(repeat (cons regexp
968                           (repeat sexp))))
969    
970    (defvar gnus-group-parameters-more nil)
971    
972    (defmacro gnus-define-group-parameter (param &rest rest)
973      "Define a group parameter PARAM.
974    REST is a plist of following:
975    :type               One of `bool', `list' or nil.
976    :function           The name of the function.
977    :function-document  The documentation of the function.
978    :parameter-type     The type for customizing the parameter.
979    :parameter-document The documentation for the parameter.
980    :variable           The name of the variable.
981    :variable-document  The documentation for the variable.
982    :variable-group     The group for customizing the variable.
983    :variable-type      The type for customizing the variable.
984    :variable-default   The default value of the variable."
985      (let* ((type (plist-get rest :type))
986             (parameter-type (plist-get rest :parameter-type))
987             (parameter-document (plist-get rest :parameter-document))
988             (function (or (plist-get rest :function)
989                           (intern (format "gnus-parameter-%s" param))))
990             (function-document (or (plist-get rest :function-document) ""))
991             (variable (or (plist-get rest :variable)
992                           (intern (format "gnus-parameter-%s-alist" param))))
993             (variable-document (or (plist-get rest :variable-document) ""))
994             (variable-group (plist-get rest :variable-group))
995             (variable-type (or (plist-get rest :variable-type)
996                                `(quote (repeat
997                                         (list (regexp :tag "Group")
998                                               ,(car (cdr parameter-type)))))))
999             (variable-default (plist-get rest :variable-default)))
1000        (list
1001         'progn
1002         `(defcustom ,variable ,variable-default
1003            ,variable-document
1004            :group 'gnus-group-parameter
1005            :group ',variable-group
1006            :type ,variable-type)
1007         `(setq gnus-group-parameters-more
1008                (delq (assq ',param gnus-group-parameters-more)
1009                      gnus-group-parameters-more))
1010         `(add-to-list 'gnus-group-parameters-more
1011                       (list ',param
1012                             ,parameter-type
1013                             ,parameter-document))
1014         (if (eq type 'bool)
1015             `(defun ,function (name)
1016                ,function-document
1017                (let ((params (gnus-group-find-parameter name))
1018                      val)
1019                  (cond
1020                   ((memq ',param params)
1021                    t)
1022                   ((setq val (assq ',param params))
1023                    (cdr val))
1024                   ((stringp ,variable)
1025                    (string-match ,variable name))
1026                   (,variable
1027                    (let ((alist ,variable)
1028                          elem value)
1029                      (while (setq elem (pop alist))
1030                        (when (and name
1031                                   (string-match (car elem) name))
1032                          (setq alist nil
1033                                value (cdr elem))))
1034                      (if (consp value) (car value) value))))))
1035           `(defun ,function (name)
1036              ,function-document
1037              (and name
1038                   (or (gnus-group-find-parameter name ',param ,(and type t))
1039                       (let ((alist ,variable)
1040                             elem value)
1041                         (while (setq elem (pop alist))
1042                           (when (and name
1043                                      (string-match (car elem) name))
1044                             (setq alist nil
1045                                   value (cdr elem))))
1046                         ,(if type
1047                              'value
1048                            '(if (consp value) (car value) value))))))))))
1049    
1050  (defcustom gnus-home-directory "~/"  (defcustom gnus-home-directory "~/"
1051    "Directory variable that specifies the \"home\" directory.    "Directory variable that specifies the \"home\" directory.
1052  All other Gnus file and directory variables are initialized from this variable."  All other Gnus file and directory variables are initialized from this variable."
# Line 891  used to 899, you would say something alo Line 1095  used to 899, you would say something alo
1095    :group 'gnus-server    :group 'gnus-server
1096    :type 'file)    :type 'file)
1097    
 ;; This function is used to check both the environment variable  
 ;; NNTPSERVER and the /etc/nntpserver file to see whether one can find  
 ;; an nntp server name default.  
1098  (defun gnus-getenv-nntpserver ()  (defun gnus-getenv-nntpserver ()
1099      "Find default nntp server.
1100    Check the NNTPSERVER environment variable and the
1101    `gnus-nntpserver-file' file."
1102    (or (getenv "NNTPSERVER")    (or (getenv "NNTPSERVER")
1103        (and (file-readable-p gnus-nntpserver-file)        (and (file-readable-p gnus-nntpserver-file)
1104             (save-excursion             (with-temp-buffer
              (set-buffer (gnus-get-buffer-create " *gnus nntp*"))  
1105               (insert-file-contents gnus-nntpserver-file)               (insert-file-contents gnus-nntpserver-file)
1106               (let ((name (buffer-string)))               (let ((name (buffer-string)))
1107                 (prog1                 (unless (string-match "\\`[ \t\n]*$" name)
1108                     (if (string-match "\\'[ \t\n]*$" name)                   name))))))
                        nil  
                      name)  
                  (kill-buffer (current-buffer))))))))  
1109    
1110  (defcustom gnus-select-method  (defcustom gnus-select-method
1111    (condition-case nil    (condition-case nil
# Line 926  used to 899, you would say something alo Line 1126  used to 899, you would say something alo
1126  This variable should be a list, where the first element is how the  This variable should be a list, where the first element is how the
1127  news is to be fetched, the second is the address.  news is to be fetched, the second is the address.
1128    
1129  For instance, if you want to get your news via NNTP from  For instance, if you want to get your news via \"flab.flab.edu\" using
1130  \"flab.flab.edu\", you could say:  NNTP, you could say:
1131    
1132  \(setq gnus-select-method '(nntp \"flab.flab.edu\"))  \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
1133    
# Line 942  see the manual for details." Line 1142  see the manual for details."
1142    :group 'gnus-server    :group 'gnus-server
1143    :type 'gnus-select-method)    :type 'gnus-select-method)
1144    
1145  (defcustom gnus-message-archive-method  (defcustom gnus-message-archive-method "archive"
   (progn  
     ;; Don't require it at top level to avoid circularity.  
     (require 'message)  
     `(nnfolder  
       "archive"  
       (nnfolder-directory ,(nnheader-concat message-directory "archive"))  
       (nnfolder-active-file  
        ,(nnheader-concat message-directory "archive/active"))  
       (nnfolder-get-new-mail nil)  
       (nnfolder-inhibit-expiry t)))  
1146    "*Method used for archiving messages you've sent.    "*Method used for archiving messages you've sent.
1147  This should be a mail method.  This should be a mail method."
   
 It's probably not very effective to change this variable once you've  
 run Gnus once.  After doing that, you must edit this server from the  
 server buffer."  
1148    :group 'gnus-server    :group 'gnus-server
1149    :group 'gnus-message    :group 'gnus-message
1150    :type 'gnus-select-method)    :type '(choice (const :tag "Default archive method" "archive")
1151                     gnus-select-method))
1152    
1153  (defcustom gnus-message-archive-group nil  (defcustom gnus-message-archive-group nil
1154    "*Name of the group in which to save the messages you've written.    "*Name of the group in which to save the messages you've written.
# Line 974  If you want to save your mail in one gro Line 1161  If you want to save your mail in one gro
1161  write in another group, you could say something like:  write in another group, you could say something like:
1162    
1163   \(setq gnus-message-archive-group   \(setq gnus-message-archive-group
1164          '((if (message-news-p)          '((if (message-news-p)
1165                \"misc-news\"                \"misc-news\"
1166              \"misc-mail\")))              \"misc-mail\")))
1167    
1168  Normally the group names returned by this variable should be  Normally the group names returned by this variable should be
1169  unprefixed -- which implicitly means \"store on the archive server\".  unprefixed -- which implicitly means \"store on the archive server\".
# Line 1009  variable instead." Line 1196  variable instead."
1196  This is a list where each element is a complete select method (see  This is a list where each element is a complete select method (see
1197  `gnus-select-method').  `gnus-select-method').
1198    
1199  If, for instance, you want to read your mail with the nnml backend,  If, for instance, you want to read your mail with the nnml back end,
1200  you could set this variable:  you could set this variable:
1201    
1202  \(setq gnus-secondary-select-methods '((nnml \"\")))"  \(setq gnus-secondary-select-methods '((nnml \"\")))"
# Line 1050  It can also be a list of select methods, Line 1237  It can also be a list of select methods,
1237  list, Gnus will try all the methods in the list until it finds a match."  list, Gnus will try all the methods in the list until it finds a match."
1238    :group 'gnus-server    :group 'gnus-server
1239    :type '(choice (const :tag "default" nil)    :type '(choice (const :tag "default" nil)
1240                   (const :tag "DejaNews" (nnweb "refer" (nnweb-type dejanews)))                   (const current)
1241                     (const :tag "Google" (nnweb "refer" (nnweb-type google)))
1242                   gnus-select-method                   gnus-select-method
1243                   (repeat :menu-tag "Try multiple"                   (repeat :menu-tag "Try multiple"
1244                           :tag "Multiple"                           :tag "Multiple"
1245                           :value (current (nnweb "refer" (nnweb-type dejanews)))                           :value (current (nnweb "refer" (nnweb-type google)))
1246                           (choice :tag "Method"                           (choice :tag "Method"
1247                                   (const current)                                   (const current)
1248                                   (const :tag "DejaNews"                                   (const :tag "Google"
1249                                          (nnweb "refer" (nnweb-type dejanews)))                                          (nnweb "refer" (nnweb-type google)))
1250                                   gnus-select-method))))                                   gnus-select-method))))
1251    
1252  (defcustom gnus-group-faq-directory  (defcustom gnus-group-faq-directory
1253    '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"    '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
     "/ftp@sunsite.auc.dk:/pub/usenet/"  
1254      "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"      "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
1255      "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"      "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
1256      "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"      "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
1257        "/ftp@ftp.pasteur.fr:/pub/FAQ/"
1258      "/ftp@rtfm.mit.edu:/pub/usenet/"      "/ftp@rtfm.mit.edu:/pub/usenet/"
1259      "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"      "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
1260      "/ftp@ftp.sunet.se:/pub/usenet/"      "/ftp@ftp.sunet.se:/pub/usenet/"
1261      "/ftp@nctuccca.edu.tw:/USENET/FAQ/"      "/ftp@nctuccca.nctu.edu.tw:/pub/Documents/rtfm/usenet-by-group/"
1262      "/ftp@hwarang.postech.ac.kr:/pub/usenet/"      "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
1263      "/ftp@ftp.hk.super.net:/mirror/faqs/")      "/ftp@ftp.hk.super.net:/mirror/faqs/")
1264    "*Directory where the group FAQs are stored.    "*Directory where the group FAQs are stored.
# Line 1091  If the default site is too slow, try one Line 1279  If the default site is too slow, try one
1279                    ftp.seas.gwu.edu               /pub/rtfm                    ftp.seas.gwu.edu               /pub/rtfm
1280                    rtfm.mit.edu                   /pub/usenet                    rtfm.mit.edu                   /pub/usenet
1281     Europe:        ftp.uni-paderborn.de           /pub/FAQ     Europe:        ftp.uni-paderborn.de           /pub/FAQ
1282                    src.doc.ic.ac.uk               /usenet/news-FAQS                    src.doc.ic.ac.uk               /usenet/news-FAQS
1283                    ftp.sunet.se                   /pub/usenet                    ftp.sunet.se                   /pub/usenet
1284                    sunsite.auc.dk                 /pub/usenet                    ftp.pasteur.fr                 /pub/FAQ
1285     Asia:          nctuccca.edu.tw                /USENET/FAQ     Asia:          nctuccca.nctu.edu.tw           /pub/Documents/rtfm/usenet-by-group/
1286                    hwarang.postech.ac.kr          /pub/usenet                    hwarang.postech.ac.kr          /pub/usenet
1287                    ftp.hk.super.net               /mirror/faqs"                    ftp.hk.super.net               /mirror/faqs"
1288    :group 'gnus-group-various    :group 'gnus-group-various
1289    :type '(choice directory    :type '(choice directory
1290                   (repeat directory)))                   (repeat directory)))
1291    
1292    (defcustom gnus-group-charter-alist
1293      '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt"))
1294        ("de" . (concat "http://purl.net/charta/" name ".html"))
1295        ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
1296        ("england" . (concat "http://england.news-admin.org/charters/" name))
1297        ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
1298        ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
1299                            (gnus-replace-in-string name "europa\\." "") ".html"))
1300        ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
1301        ("aus" . (concat "http://aus.news-admin.org/groupinfo.cgi/" name))
1302        ("pl" . (concat "http://www.usenet.pl/opisy/" name))
1303        ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
1304        ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
1305        ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
1306        ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
1307        ("se" . (concat "http://www.usenet-se.net/Reglementen/"
1308                        (gnus-replace-in-string name "\\." "_") ".html"))
1309        ("milw" . (concat "http://usenet.mil.wi.us/"
1310                          (gnus-replace-in-string name "milw\\." "") "-charter"))
1311        ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
1312        ("netins" . (concat "http://www.netins.net/usenet/charter/"
1313                            (gnus-replace-in-string name "\\." "-") "-charter.html")))
1314      "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
1315    When FORM is evaluated `name' is bound to the name of the group."
1316      :group 'gnus-group-various
1317      :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
1318    
1319    (defcustom gnus-group-fetch-control-use-browse-url nil
1320      "*Non-nil means that control messages are displayed using `browse-url'.
1321    Otherwise they are fetched with ange-ftp and displayed in an ephemeral
1322    group."
1323      :group 'gnus-group-various
1324      :type 'boolean)
1325    
1326  (defcustom gnus-use-cross-reference t  (defcustom gnus-use-cross-reference t
1327    "*Non-nil means that cross referenced articles will be marked as read.    "*Non-nil means that cross referenced articles will be marked as read.
1328  If nil, ignore cross references.  If t, mark articles as read in  If nil, ignore cross references.  If t, mark articles as read in
# Line 1121  newsgroups." Line 1343  newsgroups."
1343  (defcustom gnus-large-newsgroup 200  (defcustom gnus-large-newsgroup 200
1344    "*The number of articles which indicates a large newsgroup.    "*The number of articles which indicates a large newsgroup.
1345  If the number of articles in a newsgroup is greater than this value,  If the number of articles in a newsgroup is greater than this value,
1346  confirmation is required for selecting the newsgroup."  confirmation is required for selecting the newsgroup.
1347    If it is nil, no confirmation is required."
1348    :group 'gnus-group-select    :group 'gnus-group-select
1349    :type 'integer)    :type '(choice (const :tag "No limit" nil)
1350                     integer))
1351    
1352  (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))  (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
1353    "*Non-nil means that the default name of a file to save articles in is the group name.    "*Non-nil means that the default name of a file to save articles in is the group name.
# Line 1139  Note that the default for this variable Line 1363  Note that the default for this variable
1363  type you're using.  On `usg-unix-v' and `xenix' this variable defaults  type you're using.  On `usg-unix-v' and `xenix' this variable defaults
1364  to nil while on all other systems it defaults to t."  to nil while on all other systems it defaults to t."
1365    :group 'gnus-start    :group 'gnus-start
1366    :type 'boolean)    :type '(radio (sexp :format "Non-nil\n"
1367                          :match (lambda (widget value)
1368                                   (and value (not (listp value))))
1369                          :value t)
1370                    (const nil)
1371                    (checklist (const :format "%v " not-score)
1372                               (const :format "%v " not-save)
1373                               (const not-kill))))
1374    
1375  (defcustom gnus-kill-files-directory gnus-directory  (defcustom gnus-kill-files-directory gnus-directory
1376    "*Name of the directory where kill files will be stored (default \"~/News\")."    "*Name of the directory where kill files will be stored (default \"~/News\")."
# Line 1188  cache to the full extent of the law." Line 1419  cache to the full extent of the law."
1419    :group 'gnus-meta    :group 'gnus-meta
1420    :type 'boolean)    :type 'boolean)
1421    
1422  (defcustom gnus-keep-backlog nil  (defcustom gnus-keep-backlog 20
1423    "*If non-nil, Gnus will keep read articles for later re-retrieval.    "*If non-nil, Gnus will keep read articles for later re-retrieval.
1424  If it is a number N, then Gnus will only keep the last N articles  If it is a number N, then Gnus will only keep the last N articles
1425  read.  If it is neither nil nor a number, Gnus will keep all read  read.  If it is neither nil nor a number, Gnus will keep all read
# Line 1214  articles.  This is not a good idea." Line 1445  articles.  This is not a good idea."
1445    :group 'gnus-meta    :group 'gnus-meta
1446    :type 'boolean)    :type 'boolean)
1447    
 (defcustom gnus-use-picons nil  
   "*If non-nil, display picons in a frame of their own."  
   :group 'gnus-meta  
   :type 'boolean)  
   
1448  (defcustom gnus-summary-prepare-exit-hook  (defcustom gnus-summary-prepare-exit-hook
1449    '(gnus-summary-expire-articles)    '(gnus-summary-expire-articles)
1450    "*A hook called when preparing to exit from the summary buffer.    "*A hook called when preparing to exit from the summary buffer.
# Line 1227  It calls `gnus-summary-expire-articles' Line 1453  It calls `gnus-summary-expire-articles'
1453    :type 'hook)    :type 'hook)
1454    
1455  (defcustom gnus-novice-user t  (defcustom gnus-novice-user t
1456    "*Non-nil means that you are a usenet novice.    "*Non-nil means that you are a Usenet novice.
1457  If non-nil, verbose messages may be displayed and confirmations may be  If non-nil, verbose messages may be displayed and confirmations may be
1458  required."  required."
1459    :group 'gnus-meta    :group 'gnus-meta
# Line 1267  slower." Line 1493  slower."
1493    :type 'boolean)    :type 'boolean)
1494    
1495  (defcustom gnus-shell-command-separator ";"  (defcustom gnus-shell-command-separator ";"
1496    "String used to separate to shell commands."    "String used to separate shell commands."
1497    :group 'gnus-files    :group 'gnus-files
1498    :type 'string)    :type 'string)
1499    
# Line 1276  slower." Line 1502  slower."
1502      ("nnspool" post address)      ("nnspool" post address)
1503      ("nnvirtual" post-mail virtual prompt-address)      ("nnvirtual" post-mail virtual prompt-address)
1504      ("nnmbox" mail respool address)      ("nnmbox" mail respool address)
1505      ("nnml" mail respool address)      ("nnml" post-mail respool address)
1506      ("nnmh" mail respool address)      ("nnmh" mail respool address)
1507      ("nndir" post-mail prompt-address physical-address)      ("nndir" post-mail prompt-address physical-address)
1508      ("nneething" none address prompt-address physical-address)      ("nneething" none address prompt-address physical-address)
# Line 1288  slower." Line 1514  slower."
1514      ("nnfolder" mail respool address)      ("nnfolder" mail respool address)
1515      ("nngateway" post-mail address prompt-address physical-address)      ("nngateway" post-mail address prompt-address physical-address)
1516      ("nnweb" none)      ("nnweb" none)
1517        ("nngoogle" post)
1518      ("nnslashdot" post)      ("nnslashdot" post)
1519      ("nnultimate" none)      ("nnultimate" none)
1520        ("nnrss" none)
1521        ("nnwfm" none)
1522      ("nnwarchive" none)      ("nnwarchive" none)
1523      ("nnlistserv" none)      ("nnlistserv" none)
1524      ("nnagent" post-mail)      ("nnagent" post-mail)
1525      ("nnimap" post-mail address prompt-address physical-address))      ("nnimap" post-mail address prompt-address physical-address)
1526        ("nnmaildir" mail respool address)
1527        ("nnnil" none))
1528    "*An alist of valid select methods.    "*An alist of valid select methods.
1529  The first element of each list lists should be a string with the name  The first element of each list lists should be a string with the name
1530  of the select method.  The other elements may be the category of  of the select method.  The other elements may be the category of
# Line 1332  this variable. I think." Line 1563  this variable. I think."
1563                      :inline t                      :inline t
1564                      (list :format "%v"                      (list :format "%v"
1565                            variable                            variable
1566                            (sexp :tag "Value"))))                            (sexp :tag "Value"))))))
     ))  
1567    
1568  (gnus-redefine-select-method-widget)  (gnus-redefine-select-method-widget)
1569    
# Line 1353  If this variable is nil, screen refresh Line 1583  If this variable is nil, screen refresh
1583  (defcustom gnus-mode-non-string-length nil  (defcustom gnus-mode-non-string-length nil
1584    "*Max length of mode-line non-string contents.    "*Max length of mode-line non-string contents.
1585  If this is nil, Gnus will take space as is needed, leaving the rest  If this is nil, Gnus will take space as is needed, leaving the rest
1586  of the modeline intact.  Note that the default of nil is unlikely  of the mode line intact.  Note that the default of nil is unlikely
1587  to be desirable; see the manual for further details."  to be desirable; see the manual for further details."
1588    :group 'gnus-various    :group 'gnus-various
1589    :type '(choice (const nil)    :type '(choice (const nil)
1590                   integer))                   integer))
1591    
1592  (defcustom gnus-auto-expirable-newsgroups nil  ;; There should be special validation for this.
1593    "*Groups in which to automatically mark read articles as expirable.  (define-widget 'gnus-email-address 'string
1594      "An email address.")
1595    
1596    (gnus-define-group-parameter
1597     to-address
1598     :function-document
1599     "Return GROUP's to-address."
1600     :variable-document
1601     "*Alist of group regexps and correspondent to-addresses."
1602     :parameter-type '(gnus-email-address :tag "To Address")
1603     :parameter-document "\
1604    This will be used when doing followups and posts.
1605    
1606    This is primarily useful in mail groups that represent closed
1607    mailing lists--mailing lists where it's expected that everybody that
1608    writes to the mailing list is subscribed to it.  Since using this
1609    parameter ensures that the mail only goes to the mailing list itself,
1610    it means that members won't receive two copies of your followups.
1611    
1612    Using `to-address' will actually work whether the group is foreign or
1613    not.  Let's say there's a group on the server that is called
1614    `fa.4ad-l'.  This is a real newsgroup, but the server has gotten the
1615    articles from a mail-to-news gateway.  Posting directly to this group
1616    is therefore impossible--you have to send mail to the mailing list
1617    address instead.
1618    
1619    The gnus-group-split mail splitting mechanism will behave as if this
1620    address was listed in gnus-group-split Addresses (see below).")
1621    
1622    (gnus-define-group-parameter
1623     to-list
1624     :function-document
1625     "Return GROUP's to-list."
1626     :variable-document
1627     "*Alist of group regexps and correspondent to-lists."
1628     :parameter-type '(gnus-email-address :tag "To List")
1629     :parameter-document "\
1630    This address will be used when doing a `a' in the group.
1631    
1632    It is totally ignored when doing a followup--except that if it is
1633    present in a news group, you'll get mail group semantics when doing
1634    `f'.
1635    
1636    The gnus-group-split mail splitting mechanism will behave as if this
1637    address was listed in gnus-group-split Addresses (see below).")
1638    
1639    (gnus-define-group-parameter
1640     subscribed
1641     :type bool
1642     :function-document
1643     "Return GROUP's subscription status."
1644     :variable-document
1645     "*Groups which are automatically considered subscribed."
1646     :parameter-type '(const :tag "Subscribed" t)
1647     :parameter-document "\
1648    Gnus assumed that you are subscribed to the To/List address.
1649    
1650    When constructing a list of subscribed groups using
1651    `gnus-find-subscribed-addresses', Gnus includes the To address given
1652    above, or the list address (if the To address has not been set).")
1653    
1654    (gnus-define-group-parameter
1655     auto-expire
1656     :type bool
1657     :function gnus-group-auto-expirable-p
1658     :function-document
1659     "Check whether GROUP is auto-expirable or not."
1660     :variable gnus-auto-expirable-newsgroups
1661     :variable-default nil
1662     :variable-document
1663     "*Groups in which to automatically mark read articles as expirable.
1664  If non-nil, this should be a regexp that should match all groups in  If non-nil, this should be a regexp that should match all groups in
1665  which to perform auto-expiry.  This only makes sense for mail groups."  which to perform auto-expiry.  This only makes sense for mail groups."
1666    :group 'nnmail-expire   :variable-group nnmail-expire
1667    :type '(choice (const nil)   :variable-type '(choice (const nil)
1668                   regexp))                           regexp)
1669     :parameter-type '(const :tag "Automatic Expire" t)
1670  (defcustom gnus-total-expirable-newsgroups nil   :parameter-document
1671    "*Groups in which to perform expiry of all read articles.   "All articles that are read will be marked as expirable.")
1672    
1673    (gnus-define-group-parameter
1674     total-expire
1675     :type bool
1676     :function gnus-group-total-expirable-p
1677     :function-document
1678     "Check whether GROUP is total-expirable or not."
1679     :variable gnus-total-expirable-newsgroups
1680     :variable-default nil
1681     :variable-document
1682     "*Groups in which to perform expiry of all read articles.
1683  Use with extreme caution.  All groups that match this regexp will be  Use with extreme caution.  All groups that match this regexp will be
1684  expiring - which means that all read articles will be deleted after  expiring - which means that all read articles will be deleted after
1685  \(say) one week.         (This only goes for mail groups and the like, of  \(say) one week.         (This only goes for mail groups and the like, of
1686  course.)"  course.)"
1687    :group 'nnmail-expire   :variable-group nnmail-expire
1688    :type '(choice (const nil)   :variable-type '(choice (const nil)
1689                   regexp))                           regexp)
1690     :parameter-type '(const :tag "Total Expire" t)
1691     :parameter-document
1692     "All read articles will be put through the expiry process
1693    
1694    This happens even if they are not marked as expirable.
1695    Use with caution.")
1696    
1697    (gnus-define-group-parameter
1698     charset
1699     :function-document
1700     "Return the default charset of GROUP."
1701     :variable gnus-group-charset-alist
1702     :variable-default
1703     '(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
1704       ("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
1705       ("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
1706       ("\\(^\\|:\\)tnn\\>\\|\\(^\\|:\\)pin\\>\\|\\(^\\|:\\)sci.lang.japan" iso-2022-7bit)
1707       ("\\(^\\|:\\)relcom\\>" koi8-r)
1708       ("\\(^\\|:\\)fido7\\>" koi8-r)
1709       ("\\(^\\|:\\)\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2)
1710       ("\\(^\\|:\\)israel\\>" iso-8859-1)
1711       ("\\(^\\|:\\)han\\>" euc-kr)
1712       ("\\(^\\|:\\)alt.chinese.text.big5\\>" chinese-big5)
1713       ("\\(^\\|:\\)soc.culture.vietnamese\\>" vietnamese-viqr)
1714       ("\\(^\\|:\\)\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1))
1715     :variable-document
1716     "Alist of regexps (to match group names) and default charsets to be used when reading."
1717     :variable-group gnus-charset
1718     :variable-type '(repeat (list (regexp :tag "Group")
1719                                   (symbol :tag "Charset")))
1720     :parameter-type '(symbol :tag "Charset")
1721     :parameter-document "\
1722    The default charset to use in the group.")
1723    
1724    (gnus-define-group-parameter
1725     post-method
1726     :type list
1727     :function-document
1728     "Return a posting method for GROUP."
1729     :variable gnus-post-method-alist
1730     :variable-document
1731     "Alist of regexps (to match group names) and method to be used when
1732    posting an article."
1733     :variable-group gnus-group-foreign
1734     :parameter-type
1735     '(choice :tag "Posting Method"
1736              (const :tag "Use native server" native)
1737              (const :tag "Use current server" current)
1738              (list :convert-widget
1739                    (lambda (widget)
1740                      (list 'sexp :tag "Methods"
1741                            :value gnus-select-method))))
1742     :parameter-document
1743     "Posting method for this group.")
1744    
1745    (gnus-define-group-parameter
1746     large-newsgroup-initial
1747     :type integer
1748     :function-document
1749     "Return GROUP's initial input of the number of articles."
1750     :variable-document
1751     "*Alist of group regexps and its initial input of the number of articles."
1752     :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
1753                              (const :tag "All" nil)
1754                              (integer))
1755     :parameter-document "\
1756    
1757    This number will be prompted as the initial value of the number of
1758    articles to list when the group is a large newsgroup (see
1759    `gnus-large-newsgroup').  If it is nil, the default value is the
1760    total number of articles in the group.")
1761    
1762    ;; The Gnus registry's ignored groups
1763    (gnus-define-group-parameter
1764     registry-ignore
1765     :type list
1766     :function-document
1767     "Whether this group should be ignored by the registry."
1768     :variable gnus-registry-ignored-groups
1769     :variable-default nil
1770     :variable-document
1771     "*Groups in which the registry should be turned off."
1772     :variable-group gnus-registry
1773     :variable-type '(repeat
1774                      (list
1775                       (regexp :tag "Group Name Regular Expression")
1776                       (boolean :tag "Ignored")))
1777    
1778     :parameter-type '(boolean :tag "Group Ignored by the Registry")
1779     :parameter-document
1780     "Whether the Gnus Registry should ignore this group.")
1781    
1782    ;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
1783    (defcustom gnus-install-group-spam-parameters t
1784      "*Disable the group parameters for spam detection.
1785    Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report."
1786      :type 'boolean
1787      :group 'gnus-start)
1788    
1789    (when gnus-install-group-spam-parameters
1790      (defvar gnus-group-spam-classification-spam t
1791        "Spam group classification (requires spam.el).
1792    This group contains spam messages.  On summary entry, unread messages
1793    will be marked as spam.  On summary exit, the specified spam
1794    processors will be invoked on spam-marked messages, then those
1795    messages will be expired, so the spam processor will only see a
1796    spam-marked message once.")
1797    
1798      (defvar gnus-group-spam-classification-ham 'ask
1799        "The ham value for the spam group parameter (requires spam.el).
1800    On summary exit, the specified ham processors will be invoked on
1801    ham-marked messages.  Exercise caution, since the ham processor will
1802    see the same message more than once because there is no ham message
1803    registry.")
1804    
1805      (gnus-define-group-parameter
1806       spam-contents
1807       :type list
1808       :function-document
1809       "The spam type (spam, ham, or neither) of the group."
1810       :variable gnus-spam-newsgroup-contents
1811       :variable-default nil
1812       :variable-document
1813       "*Groups in which to automatically mark new articles as spam on
1814    summary entry.  If non-nil, this should be a list of group name
1815    regexps that should match all groups in which to do automatic spam
1816    tagging, associated with a classification (spam, ham, or neither).
1817    This only makes sense for mail groups."
1818       :variable-group spam
1819       :variable-type '(repeat
1820                        (list :tag "Group contents spam/ham classification"
1821                              (regexp :tag "Group")
1822                              (choice
1823                               (variable-item gnus-group-spam-classification-spam)
1824                               (variable-item gnus-group-spam-classification-ham)
1825                               (const :tag "Unclassified" nil))))
1826    
1827       :parameter-type '(list :tag "Group contents spam/ham classification"
1828                              (choice :tag "Group contents classification for spam sorting"
1829                                      (variable-item gnus-group-spam-classification-spam)
1830                                      (variable-item gnus-group-spam-classification-ham)
1831                                      (const :tag "Unclassified" nil)))
1832       :parameter-document
1833       "The spam classification (spam, ham, or neither) of this group.
1834    When a spam group is entered, all unread articles are marked as spam.")
1835    
1836      (defvar gnus-group-spam-exit-processor-ifile "ifile"
1837        "OBSOLETE: The ifile summary exit spam processor.")
1838    
1839      (defvar gnus-group-spam-exit-processor-stat "stat"
1840        "OBSOLETE: The spam-stat summary exit spam processor.")
1841    
1842      (defvar gnus-group-spam-exit-processor-bogofilter "bogofilter"
1843        "OBSOLETE: The Bogofilter summary exit spam processor.")
1844    
1845      (defvar gnus-group-spam-exit-processor-blacklist "blacklist"
1846        "OBSOLETE: The Blacklist summary exit spam processor.")
1847    
1848      (defvar gnus-group-spam-exit-processor-report-gmane "report-gmane"
1849        "OBSOLETE: The Gmane reporting summary exit spam processor.
1850    Only applicable to NNTP groups with articles from Gmane.  See spam-report.el")
1851    
1852      (defvar gnus-group-spam-exit-processor-spamoracle "spamoracle-spam"
1853        "OBSOLETE: The spamoracle summary exit spam processor.")
1854    
1855      (defvar gnus-group-ham-exit-processor-ifile "ifile-ham"
1856        "OBSOLETE: The ifile summary exit ham processor.
1857    Only applicable to non-spam (unclassified and ham) groups.")
1858    
1859      (defvar gnus-group-ham-exit-processor-bogofilter "bogofilter-ham"
1860        "OBSOLETE: The Bogofilter summary exit ham processor.
1861    Only applicable to non-spam (unclassified and ham) groups.")
1862    
1863      (defvar gnus-group-ham-exit-processor-stat "stat-ham"
1864        "OBSOLETE: The spam-stat summary exit ham processor.
1865    Only applicable to non-spam (unclassified and ham) groups.")
1866    
1867      (defvar gnus-group-ham-exit-processor-whitelist "whitelist"
1868        "OBSOLETE: The whitelist summary exit ham processor.
1869    Only applicable to non-spam (unclassified and ham) groups.")
1870    
1871      (defvar gnus-group-ham-exit-processor-BBDB "bbdb"
1872        "OBSOLETE: The BBDB summary exit ham processor.
1873    Only applicable to non-spam (unclassified and ham) groups.")
1874    
1875      (defvar gnus-group-ham-exit-processor-copy "copy"
1876        "OBSOLETE: The ham copy exit ham processor.
1877    Only applicable to non-spam (unclassified and ham) groups.")
1878    
1879      (defvar gnus-group-ham-exit-processor-spamoracle "spamoracle-ham"
1880        "OBSOLETE: The spamoracle summary exit ham processor.
1881    Only applicable to non-spam (unclassified and ham) groups.")
1882    
1883      (gnus-define-group-parameter
1884       spam-process
1885       :type list
1886       :parameter-type
1887       '(choice
1888         :tag "Spam Summary Exit Processor"
1889         :value nil
1890         (list :tag "Spam Summary Exit Processor Choices"
1891               (set
1892                (variable-item gnus-group-spam-exit-processor-ifile)
1893                (variable-item gnus-group-spam-exit-processor-stat)
1894                (variable-item gnus-group-spam-exit-processor-bogofilter)
1895                (variable-item gnus-group-spam-exit-processor-blacklist)
1896                (variable-item gnus-group-spam-exit-processor-spamoracle)
1897                (variable-item gnus-group-spam-exit-processor-report-gmane)
1898                (variable-item gnus-group-ham-exit-processor-bogofilter)
1899                (variable-item gnus-group-ham-exit-processor-ifile)
1900                (variable-item gnus-group-ham-exit-processor-stat)
1901                (variable-item gnus-group-ham-exit-processor-whitelist)
1902                (variable-item gnus-group-ham-exit-processor-BBDB)
1903                (variable-item gnus-group-ham-exit-processor-spamoracle)
1904                (variable-item gnus-group-ham-exit-processor-copy)
1905                (const :tag "Spam: Gmane Report"  (spam spam-use-gmane))
1906                (const :tag "Spam: Bogofilter"    (spam spam-use-bogofilter))
1907                (const :tag "Spam: Blacklist"     (spam spam-use-blacklist))
1908                (const :tag "Spam: ifile"         (spam spam-use-ifile))
1909                (const :tag "Spam: Spam-stat"     (spam spam-use-stat))
1910                (const :tag "Spam: Spam Oracle"   (spam spam-use-spamoracle))
1911                (const :tag "Ham: ifile"          (ham spam-use-ifile))
1912                (const :tag "Ham: Bogofilter"     (ham spam-use-bogofilter))
1913                (const :tag "Ham: Spam-stat"      (ham spam-use-stat))
1914                (const :tag "Ham: Whitelist"      (ham spam-use-whitelist))
1915                (const :tag "Ham: BBDB"           (ham spam-use-BBDB))
1916                (const :tag "Ham: Copy"           (ham spam-use-ham-copy))
1917                (const :tag "Ham: Spam Oracle"    (ham spam-use-spamoracle)))))
1918       :function-document
1919       "Which spam or ham processors will be applied when the summary is exited."
1920       :variable gnus-spam-process-newsgroups
1921       :variable-default nil
1922       :variable-document
1923       "*Groups in which to automatically process spam or ham articles with
1924    a backend on summary exit.  If non-nil, this should be a list of group
1925    name regexps that should match all groups in which to do automatic
1926    spam processing, associated with the appropriate processor."
1927       :variable-group spam
1928       :variable-type
1929       '(repeat :tag "Spam/Ham Processors"
1930                (list :tag "Spam Summary Exit Processor Choices"
1931                      (regexp :tag "Group Regexp")
1932                      (set
1933                       :tag "Spam/Ham Summary Exit Processor"
1934                       (variable-item gnus-group-spam-exit-processor-ifile)
1935                       (variable-item gnus-group-spam-exit-processor-stat)
1936                       (variable-item gnus-group-spam-exit-processor-bogofilter)
1937                       (variable-item gnus-group-spam-exit-processor-blacklist)
1938                       (variable-item gnus-group-spam-exit-processor-spamoracle)
1939                       (variable-item gnus-group-spam-exit-processor-report-gmane)
1940                       (variable-item gnus-group-ham-exit-processor-bogofilter)
1941                       (variable-item gnus-group-ham-exit-processor-ifile)
1942                       (variable-item gnus-group-ham-exit-processor-stat)
1943                       (variable-item gnus-group-ham-exit-processor-whitelist)
1944                       (variable-item gnus-group-ham-exit-processor-BBDB)
1945                       (variable-item gnus-group-ham-exit-processor-spamoracle)
1946                       (variable-item gnus-group-ham-exit-processor-copy)
1947                       (const :tag "Spam: Gmane Report"  (spam spam-use-gmane))
1948                       (const :tag "Spam: Bogofilter"    (spam spam-use-bogofilter))
1949                       (const :tag "Spam: Blacklist"     (spam spam-use-blacklist))
1950                       (const :tag "Spam: ifile"         (spam spam-use-ifile))
1951                       (const :tag "Spam: Spam-stat"     (spam spam-use-stat))
1952                       (const :tag "Spam: Spam Oracle"   (spam spam-use-spamoracle))
1953                       (const :tag "Ham: ifile"          (ham spam-use-ifile))
1954                       (const :tag "Ham: Bogofilter"     (ham spam-use-bogofilter))
1955                       (const :tag "Ham: Spam-stat"      (ham spam-use-stat))
1956                       (const :tag "Ham: Whitelist"      (ham spam-use-whitelist))
1957                       (const :tag "Ham: BBDB"           (ham spam-use-BBDB))
1958                       (const :tag "Ham: Copy"           (ham spam-use-ham-copy))
1959                       (const :tag "Ham: Spam Oracle"    (ham spam-use-spamoracle)))))
1960    
1961       :parameter-document
1962       "Which spam or ham processors will be applied when the summary is exited.")
1963    
1964      (gnus-define-group-parameter
1965       spam-autodetect
1966       :type list
1967       :parameter-type
1968       '(boolean :tag "Spam autodetection")
1969       :function-document
1970       "Should spam be autodetected (with spam-split) in this group?"
1971       :variable gnus-spam-autodetect
1972       :variable-default nil
1973       :variable-document
1974       "*Groups in which spam should be autodetected when they are entered.
1975       Only unseen articles will be examined, unless
1976       spam-autodetect-recheck-messages is set."
1977       :variable-group spam
1978       :variable-type
1979       '(repeat
1980         :tag "Autodetection setting"
1981         (list
1982          (regexp :tag "Group Regexp")
1983          boolean))
1984       :parameter-document
1985       "Spam autodetection.
1986    Only unseen articles will be examined, unless
1987    spam-autodetect-recheck-messages is set.")
1988    
1989      (gnus-define-group-parameter
1990       spam-autodetect-methods
1991       :type list
1992       :parameter-type
1993       '(choice :tag "Spam autodetection-specific methods"
1994         (const none)
1995         (const default)
1996         (set :tag "Use specific methods"
1997              (variable-item spam-use-blacklist)
1998              (variable-item spam-use-regex-headers)
1999              (variable-item spam-use-regex-body)
2000              (variable-item spam-use-whitelist)
2001              (variable-item spam-use-BBDB)
2002              (variable-item spam-use-ifile)
2003              (variable-item spam-use-spamoracle)
2004              (variable-item spam-use-stat)
2005              (variable-item spam-use-blackholes)
2006              (variable-item spam-use-hashcash)
2007              (variable-item spam-use-bogofilter-headers)
2008              (variable-item spam-use-bogofilter)))
2009       :function-document
2010       "Methods to be used for autodetection in each group"
2011       :variable gnus-spam-autodetect-methods
2012       :variable-default nil
2013       :variable-document
2014       "*Methods for autodetecting spam per group.
2015    Requires the spam-autodetect parameter.  Only unseen articles
2016    will be examined, unless spam-autodetect-recheck-messages is
2017    set."
2018       :variable-group spam
2019       :variable-type
2020       '(repeat
2021         :tag "Autodetection methods"
2022         (list
2023          (regexp :tag "Group Regexp")
2024          (choice
2025           (const none)
2026           (const default)
2027           (set :tag "Use specific methods"
2028            (variable-item spam-use-blacklist)
2029            (variable-item spam-use-regex-headers)
2030            (variable-item spam-use-regex-body)
2031            (variable-item spam-use-whitelist)
2032            (variable-item spam-use-BBDB)
2033            (variable-item spam-use-ifile)
2034            (variable-item spam-use-spamoracle)
2035            (variable-item spam-use-stat)
2036            (variable-item spam-use-blackholes)
2037            (variable-item spam-use-hashcash)
2038            (variable-item spam-use-bogofilter-headers)
2039            (variable-item spam-use-bogofilter)))))
2040         :parameter-document
2041       "Spam autodetection methods.  
2042    Requires the spam-autodetect parameter.  Only unseen articles
2043    will be examined, unless spam-autodetect-recheck-messages is
2044    set.")
2045    
2046      (gnus-define-group-parameter
2047       spam-process-destination
2048       :type list
2049       :parameter-type
2050       '(choice :tag "Destination for spam-processed articles at summary exit"
2051                (string :tag "Move to a group")
2052                (repeat :tag "Move to multiple groups"
2053                        (string :tag "Destination group"))
2054                (const :tag "Expire" nil))
2055       :function-document
2056       "Where spam-processed articles will go at summary exit."
2057       :variable gnus-spam-process-destinations
2058       :variable-default nil
2059       :variable-document
2060       "*Groups in which to explicitly send spam-processed articles to
2061    another group, or expire them (the default).  If non-nil, this should
2062    be a list of group name regexps that should match all groups in which
2063    to do spam-processed article moving, associated with the destination
2064    group or nil for explicit expiration.  This only makes sense for
2065    mail groups."
2066       :variable-group spam
2067       :variable-type
2068       '(repeat
2069         :tag "Spam-processed articles destination"
2070         (list
2071          (regexp :tag "Group Regexp")
2072          (choice
2073           :tag "Destination for spam-processed articles at summary exit"
2074           (string :tag "Move to a group")
2075           (repeat :tag "Move to multiple groups"
2076                   (string :tag "Destination group"))
2077           (const :tag "Expire" nil))))
2078       :parameter-document
2079       "Where spam-processed articles will go at summary exit.")
2080      
2081      (gnus-define-group-parameter
2082       ham-process-destination
2083       :type list
2084       :parameter-type
2085       '(choice
2086         :tag "Destination for ham articles at summary exit from a spam group"
2087         (string :tag "Move to a group")
2088         (repeat :tag "Move to multiple groups"
2089                 (string :tag "Destination group"))
2090         (const :tag "Respool" respool)
2091         (const :tag "Do nothing" nil))
2092       :function-document
2093       "Where ham articles will go at summary exit from a spam group."
2094       :variable gnus-ham-process-destinations
2095       :variable-default nil
2096       :variable-document
2097       "*Groups in which to explicitly send ham articles to
2098    another group, or do nothing (the default).  If non-nil, this should
2099    be a list of group name regexps that should match all groups in which
2100    to do ham article moving, associated with the destination
2101    group or nil for explicit ignoring.  This only makes sense for
2102    mail groups, and only works in spam groups."
2103       :variable-group spam
2104       :variable-type
2105       '(repeat
2106         :tag "Ham articles destination"
2107         (list
2108          (regexp :tag "Group Regexp")
2109          (choice
2110           :tag "Destination for ham articles at summary exit from spam group"
2111           (string :tag "Move to a group")
2112           (repeat :tag "Move to multiple groups"
2113                    (string :tag "Destination group"))
2114           (const :tag "Respool" respool)
2115           (const :tag "Expire" nil))))
2116       :parameter-document
2117       "Where ham articles will go at summary exit from a spam group.")
2118    
2119      (gnus-define-group-parameter
2120       ham-marks
2121       :type 'list
2122       :parameter-type '(list :tag "Ham mark choices"
2123                              (set
2124                               (variable-item gnus-del-mark)
2125                               (variable-item gnus-read-mark)
2126                               (variable-item gnus-ticked-mark)
2127                               (variable-item gnus-killed-mark)
2128                               (variable-item gnus-kill-file-mark)
2129                               (variable-item gnus-low-score-mark)))
2130    
2131       :parameter-document
2132       "Marks considered ham (positively not spam).  Such articles will be
2133    processed as ham (non-spam) on group exit.  When nil, the global
2134    spam-ham-marks variable takes precedence."
2135       :variable-default '((".*" ((gnus-del-mark
2136                                   gnus-read-mark
2137                                   gnus-killed-mark
2138                                   gnus-kill-file-mark
2139                                   gnus-low-score-mark))))
2140       :variable-group spam
2141       :variable-document
2142       "*Groups in which to explicitly set the ham marks to some value.")
2143    
2144      (gnus-define-group-parameter
2145       spam-marks
2146       :type 'list
2147       :parameter-type '(list :tag "Spam mark choices"
2148                              (set
2149                               (variable-item gnus-spam-mark)
2150                               (variable-item gnus-killed-mark)
2151                               (variable-item gnus-kill-file-mark)
2152                               (variable-item gnus-low-score-mark)))
2153    
2154       :parameter-document
2155       "Marks considered spam.
2156    Such articles will be processed as spam on group exit.  When nil, the global
2157    spam-spam-marks variable takes precedence."
2158       :variable-default '((".*" ((gnus-spam-mark))))
2159       :variable-group spam
2160       :variable-document
2161       "*Groups in which to explicitly set the spam marks to some value."))
2162    
2163  (defcustom gnus-group-uncollapsed-levels 1  (defcustom gnus-group-uncollapsed-levels 1
2164    "Number of group name elements to leave alone when making a short group name."    "Number of group name elements to leave alone when making a short group name."
# Line 1466  and `grouplens-menu'." Line 2249  and `grouplens-menu'."
2249                (const pick-menu)                (const pick-menu)
2250                (const grouplens-menu)))                (const grouplens-menu)))
2251    
2252    ;; Byte-compiler warning.
2253    (defvar gnus-visual)
2254    ;; Find out whether the gnus-visual TYPE is wanted.
2255    (defun gnus-visual-p (&optional type class)
2256      (and gnus-visual                      ; Has to be non-nil, at least.
2257           (if (not type)                   ; We don't care about type.
2258               gnus-visual
2259             (if (listp gnus-visual)        ; It's a list, so we check it.
2260                 (or (memq type gnus-visual)
2261                     (memq class gnus-visual))
2262               t))))
2263    
2264  (defcustom gnus-mouse-face  (defcustom gnus-mouse-face
2265    (condition-case ()    (condition-case ()
2266        (if (gnus-visual-p 'mouse-face 'highlight)        (if (gnus-visual-p 'mouse-face 'highlight)
# Line 1488  face." Line 2283  face."
2283  (defvar gnus-plugged t  (defvar gnus-plugged t
2284    "Whether Gnus is plugged or not.")    "Whether Gnus is plugged or not.")
2285    
2286  (defcustom gnus-default-charset 'iso-8859-1  (defcustom gnus-agent-cache t
2287      "Controls use of the agent cache while plugged.
2288    When set, Gnus will prefer using the locally stored content rather
2289    than re-fetching it from the server.  You also need to enable
2290    `gnus-agent' for this to have any affect."
2291      :version "21.3"
2292      :group 'gnus-agent
2293      :type 'boolean)
2294    
2295    (defcustom gnus-default-charset 'undecided
2296    "Default charset assumed to be used when viewing non-ASCII characters.    "Default charset assumed to be used when viewing non-ASCII characters.
2297  This variable is overridden on a group-to-group basis by the  This variable is overridden on a group-to-group basis by the
2298  gnus-group-charset-alist variable and is only used on groups not  `gnus-group-charset-alist' variable and is only used on groups not
2299  covered by that variable."  covered by that variable."
2300    :type 'symbol    :type 'symbol
2301    :group 'gnus-charset)    :group 'gnus-charset)
2302    
2303  (defcustom gnus-default-posting-charset nil  ;; Fixme: Doc reference to agent.
2304    "Default charset assumed to be used when posting non-ASCII characters.  (defcustom gnus-agent t
2305  This variable is overridden on a group-to-group basis by the    "Whether we want to use the Gnus agent or not.
2306  gnus-group-posting-charset-alist variable and is only used on groups not  
2307  covered by that variable.  You may customize gnus-agent to disable its use.  However, some
2308  If nil, no default charset is assumed when posting."  back ends have started to use the agent as a client-side cache.
2309    :type 'symbol  Disabling the agent may result in noticeable loss of performance."
2310    :group 'gnus-charset)    :version "21.3"
2311      :group 'gnus-agent
2312      :type 'boolean)
2313    
2314    (defcustom gnus-other-frame-function 'gnus
2315      "Function called by the command `gnus-other-frame'."
2316      :group 'gnus-start
2317      :type '(choice (function-item gnus)
2318                     (function-item gnus-no-server)
2319                     (function-item gnus-slave)
2320                     (function-item gnus-slave-no-server)))
2321    
2322    (defcustom gnus-other-frame-parameters nil
2323      "Frame parameters used by `gnus-other-frame' to create a Gnus frame.
2324    This should be an alist for Emacs, or a plist for XEmacs."
2325      :group 'gnus-start
2326      :type (if (featurep 'xemacs)
2327                '(repeat (list :inline t :format "%v"
2328                               (symbol :tag "Property")
2329                               (sexp :tag "Value")))
2330              '(repeat (cons :format "%v"
2331                             (symbol :tag "Parameter")
2332                             (sexp :tag "Value")))))
2333    
2334    (defcustom gnus-user-agent 'emacs-gnus-type
2335      "Which information should be exposed in the User-Agent header.
2336    
2337    It can be one of the symbols `gnus' \(show only Gnus version\), `emacs-gnus'
2338    \(show only Emacs and Gnus versions\), `emacs-gnus-config' \(same as
2339    `emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as
2340    `emacs-gnus' plus system type\) or a custom string.  If you set it to a
2341    string, be sure to use a valid format, see RFC 2616."
2342      :group 'gnus-message
2343      :type '(choice
2344              (item :tag "Show Gnus and Emacs versions and system type"
2345                    emacs-gnus-type)
2346              (item :tag "Show Gnus and Emacs versions and system configuration"
2347                    emacs-gnus-config)
2348              (item :tag "Show Gnus and Emacs versions" emacs-gnus)
2349              (item :tag "Show only Gnus version" gnus)
2350              (string :tag "Other")))
2351    
2352    
2353  ;;; Internal variables  ;;; Internal variables
2354    
2355  (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")  (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
2356  (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")  (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
2357    (defvar gnus-agent-method-p-cache nil
2358      ; Reset each time gnus-agent-covered-methods is changed else
2359      ; gnus-agent-method-p may mis-report a methods status.
2360      )
2361    (defvar gnus-agent-target-move-group-header "X-Gnus-Agent-Move-To")
2362    (defvar gnus-draft-meta-information-header "X-Draft-From")
2363  (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)  (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
2364  (defvar gnus-original-article-buffer " *Original Article*")  (defvar gnus-original-article-buffer " *Original Article*")
2365  (defvar gnus-newsgroup-name nil)  (defvar gnus-newsgroup-name nil)
2366  (defvar gnus-ephemeral-servers nil)  (defvar gnus-ephemeral-servers nil)
2367    (defvar gnus-server-method-cache nil)
 (defvar gnus-agent nil  
   "Whether we want to use the Gnus agent or not.")  
2368    
2369  (defvar gnus-agent-fetching nil  (defvar gnus-agent-fetching nil
2370    "Whether Gnus agent is in fetching mode.")    "Whether Gnus agent is in fetching mode.")
2371    
2372    (defvar gnus-agent-covered-methods nil
2373      "A list of servers, NOT methods, showing which servers are covered by the agent.")
2374    
2375  (defvar gnus-command-method nil  (defvar gnus-command-method nil
2376    "Dynamically bound variable that says what the current backend is.")    "Dynamically bound variable that says what the current back end is.")
2377    
2378  (defvar gnus-current-select-method nil  (defvar gnus-current-select-method nil
2379    "The current method for selecting a newsgroup.")    "The current method for selecting a newsgroup.")
# Line 1560  If nil, no default charset is assumed wh Line 2411  If nil, no default charset is assumed wh
2411        ,(nnheader-concat gnus-cache-directory "active"))))        ,(nnheader-concat gnus-cache-directory "active"))))
2412    "List of predefined (convenience) servers.")    "List of predefined (convenience) servers.")
2413    
2414  (defvar gnus-topic-indentation "");; Obsolete variable.  (defvar gnus-topic-indentation "") ;; Obsolete variable.
2415    
2416  (defconst gnus-article-mark-lists  (defconst gnus-article-mark-lists
2417    '((marked . tick) (replied . reply)    '((marked . tick) (replied . reply)
# Line 1568  If nil, no default charset is assumed wh Line 2419  If nil, no default charset is assumed wh
2419      (bookmarks . bookmark) (dormant . dormant)      (bookmarks . bookmark) (dormant . dormant)
2420      (scored . score) (saved . save)      (scored . score) (saved . save)
2421      (cached . cache) (downloadable . download)      (cached . cache) (downloadable . download)
2422      (unsendable . unsend)))      (unsendable . unsend) (forwarded . forward)
2423        (recent . recent) (seen . seen)))
2424    
2425    (defconst gnus-article-special-mark-lists
2426      '((seen range)
2427        (killed range)
2428        (bookmark tuple)
2429        (score tuple)))
2430    
2431    ;; Propagate flags to server, with the following exceptions:
2432    ;; `seen' is private to each gnus installation
2433    ;; `cache' is a internal gnus flag for each gnus installation
2434    ;; `download' is a agent flag private to each gnus installation
2435    ;; `unsend' are for nndraft groups only
2436    ;; `score' is not a proper mark
2437    ;; `bookmark': don't propagated it, or fix the bug in update-mark.
2438    (defconst gnus-article-unpropagated-mark-lists
2439      '(seen cache download unsend score bookmark)
2440      "Marks that shouldn't be propagated to back ends.
2441    Typical marks are those that make no sense in a standalone back end,
2442    such as a mark that says whether an article is stored in the cache
2443    \(which doesn't make sense in a standalone back end).")
2444    
2445  (defvar gnus-headers-retrieved-by nil)  (defvar gnus-headers-retrieved-by nil)
2446  (defvar gnus-article-reply nil)  (defvar gnus-article-reply nil)
# Line 1585  If nil, no default charset is assumed wh Line 2457  If nil, no default charset is assumed wh
2457    "The mail address of the Gnus maintainers.")    "The mail address of the Gnus maintainers.")
2458    
2459  (defvar gnus-info-nodes  (defvar gnus-info-nodes
2460    '((gnus-group-mode "(gnus)The Group Buffer")    '((gnus-group-mode "(gnus)Group Buffer")
2461      (gnus-summary-mode "(gnus)The Summary Buffer")      (gnus-summary-mode "(gnus)Summary Buffer")
2462      (gnus-article-mode "(gnus)The Article Buffer")      (gnus-article-mode "(gnus)Article Buffer")
2463      (gnus-server-mode "(gnus)The Server Buffer")      (gnus-server-mode "(gnus)Server Buffer")
2464      (gnus-browse-mode "(gnus)Browse Foreign Server")      (gnus-browse-mode "(gnus)Browse Foreign Server")
2465      (gnus-tree-mode "(gnus)Tree Display"))      (gnus-tree-mode "(gnus)Tree Display"))
2466    "Alist of major modes and related Info nodes.")    "Alist of major modes and related Info nodes.")
# Line 1615  If nil, no default charset is assumed wh Line 2487  If nil, no default charset is assumed wh
2487    
2488  (defvar gnus-newsrc-alist nil  (defvar gnus-newsrc-alist nil
2489    "Assoc list of read articles.    "Assoc list of read articles.
2490  gnus-newsrc-hashtb should be kept so that both hold the same information.")  `gnus-newsrc-hashtb' should be kept so that both hold the same information.")
2491    
2492    (defvar gnus-registry-alist nil
2493      "Assoc list of registry data.
2494    gnus-registry.el will populate this if it's loaded.")
2495    
2496  (defvar gnus-newsrc-hashtb nil  (defvar gnus-newsrc-hashtb nil
2497    "Hashtable of gnus-newsrc-alist.")    "Hashtable of `gnus-newsrc-alist'.")
2498    
2499  (defvar gnus-killed-list nil  (defvar gnus-killed-list nil
2500    "List of killed newsgroups.")    "List of killed newsgroups.")
2501    
2502  (defvar gnus-killed-hashtb nil  (defvar gnus-killed-hashtb nil
2503    "Hash table equivalent of gnus-killed-list.")    "Hash table equivalent of `gnus-killed-list'.")
2504    
2505  (defvar gnus-zombie-list nil  (defvar gnus-zombie-list nil
2506    "List of almost dead newsgroups.")    "List of almost dead newsgroups.")
# Line 1654  gnus-newsrc-hashtb should be kept so tha Line 2530  gnus-newsrc-hashtb should be kept so tha
2530  (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"  (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
2531    "Regexp matching invalid groups.")    "Regexp matching invalid groups.")
2532    
2533    (defvar gnus-other-frame-object nil
2534      "A frame object which will be created by `gnus-other-frame'.")
2535    
2536  ;;; End of variables.  ;;; End of variables.
2537    
2538  ;; Define some autoload functions Gnus might use.  ;; Define some autoload functions Gnus might use.
# Line 1704  gnus-newsrc-hashtb should be kept so tha Line 2583  gnus-newsrc-hashtb should be kept so tha
2583        gnus-demon-remove-handler)        gnus-demon-remove-handler)
2584       ("gnus-demon" :interactive t       ("gnus-demon" :interactive t
2585        gnus-demon-init gnus-demon-cancel)        gnus-demon-init gnus-demon-cancel)
2586         ("gnus-fun" gnus-convert-gray-x-face-to-xpm gnus-display-x-face-in-from
2587          gnus-convert-image-to-gray-x-face gnus-convert-face-to-png
2588          gnus-face-from-file)
2589       ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree       ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree
2590        gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)        gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)
2591       ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close       ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close
# Line 1762  gnus-newsrc-hashtb should be kept so tha Line 2644  gnus-newsrc-hashtb should be kept so tha
2644       ("gnus-msg" (gnus-summary-send-map keymap)       ("gnus-msg" (gnus-summary-send-map keymap)
2645        gnus-article-mail gnus-copy-article-buffer gnus-extended-version)        gnus-article-mail gnus-copy-article-buffer gnus-extended-version)
2646       ("gnus-msg" :interactive t       ("gnus-msg" :interactive t
2647        gnus-group-post-news gnus-group-mail gnus-summary-post-news        gnus-group-post-news gnus-group-mail gnus-group-news
2648          gnus-summary-post-news gnus-summary-news-other-window
2649        gnus-summary-followup gnus-summary-followup-with-original        gnus-summary-followup gnus-summary-followup-with-original
2650        gnus-summary-cancel-article gnus-summary-supersede-article        gnus-summary-cancel-article gnus-summary-supersede-article
2651        gnus-post-news gnus-summary-reply gnus-summary-reply-with-original        gnus-post-news gnus-summary-reply gnus-summary-reply-with-original
# Line 1773  gnus-newsrc-hashtb should be kept so tha Line 2656  gnus-newsrc-hashtb should be kept so tha
2656        gnus-summary-wide-reply-with-original        gnus-summary-wide-reply-with-original
2657        gnus-summary-post-forward gnus-summary-wide-reply-with-original        gnus-summary-post-forward gnus-summary-wide-reply-with-original
2658        gnus-summary-post-forward)        gnus-summary-post-forward)
2659       ("gnus-picon" :interactive t gnus-article-display-picons       ("gnus-picon" :interactive t gnus-treat-from-picon)
       gnus-group-display-picons gnus-picons-article-display-x-face  
       gnus-picons-display-x-face)  
      ("gnus-picon" gnus-picons-buffer-name)  
2660       ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p       ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p
2661        gnus-grouplens-mode)        gnus-grouplens-mode)
2662       ("smiley" :interactive t gnus-smiley-display)       ("smiley" :interactive t smiley-region)
2663       ("gnus-win" gnus-configure-windows gnus-add-configuration)       ("gnus-win" gnus-configure-windows gnus-add-configuration)
2664       ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group       ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
2665        gnus-list-of-unread-articles gnus-list-of-read-articles        gnus-list-of-unread-articles gnus-list-of-read-articles
# Line 1809  gnus-newsrc-hashtb should be kept so tha Line 2689  gnus-newsrc-hashtb should be kept so tha
2689        gnus-article-de-base64-unreadable        gnus-article-de-base64-unreadable
2690        gnus-article-decode-HZ        gnus-article-decode-HZ
2691        gnus-article-wash-html        gnus-article-wash-html
2692        gnus-article-hide-pgp        gnus-article-unsplit-urls
2693        gnus-article-hide-pem gnus-article-hide-signature        gnus-article-hide-pem gnus-article-hide-signature
2694        gnus-article-strip-leading-blank-lines gnus-article-date-local        gnus-article-strip-leading-blank-lines gnus-article-date-local
2695        gnus-article-date-original gnus-article-date-lapsed        gnus-article-date-original gnus-article-date-lapsed
2696        gnus-article-show-all-headers  ;;      gnus-article-show-all-headers
2697        gnus-article-edit-mode gnus-article-edit-article        gnus-article-edit-mode gnus-article-edit-article
2698        gnus-article-edit-done gnus-article-decode-encoded-words        gnus-article-edit-done gnus-article-decode-encoded-words
2699        gnus-start-date-timer gnus-stop-date-timer        gnus-start-date-timer gnus-stop-date-timer
# Line 1835  gnus-newsrc-hashtb should be kept so tha Line 2715  gnus-newsrc-hashtb should be kept so tha
2715       ("gnus-agent" gnus-open-agent gnus-agent-get-function       ("gnus-agent" gnus-open-agent gnus-agent-get-function
2716        gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p        gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p
2717        gnus-agent-get-undownloaded-list gnus-agent-fetch-session        gnus-agent-get-undownloaded-list gnus-agent-fetch-session
2718        gnus-summary-set-agent-mark gnus-agent-save-group-info)        gnus-summary-set-agent-mark gnus-agent-save-group-info
2719          gnus-agent-request-article gnus-agent-retrieve-headers)
2720       ("gnus-agent" :interactive t       ("gnus-agent" :interactive t
2721        gnus-unplugged gnus-agentize gnus-agent-batch)        gnus-unplugged gnus-agentize gnus-agent-batch)
2722       ("gnus-vm" :interactive t gnus-summary-save-in-vm       ("gnus-vm" :interactive t gnus-summary-save-in-vm
2723        gnus-summary-save-article-vm)        gnus-summary-save-article-vm)
2724       ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-drafts)       ("compface" uncompface)
2725         ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue)
2726       ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)       ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)
2727       ("gnus-mlspl" :interactive t gnus-group-split-setup       ("gnus-mlspl" :interactive t gnus-group-split-setup
2728        gnus-group-split-update))))        gnus-group-split-update)
2729         ("gnus-delay" gnus-delay-initialize))))
2730    
2731  ;;; gnus-sum.el thingies  ;;; gnus-sum.el thingies
2732    
2733    
2734  (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n"  (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
2735    "*The format specification of the lines in the summary buffer.    "*The format specification of the lines in the summary buffer.
2736    
2737  It works along the same lines as a normal formatting string,  It works along the same lines as a normal formatting string,
# Line 1865  with some simple extensions. Line 2748  with some simple extensions.
2748  %x   Contents of the Xref: header (string)  %x   Contents of the Xref: header (string)
2749  %D   Date of the article (string)  %D   Date of the article (string)
2750  %d   Date of the article (string) in DD-MMM format  %d   Date of the article (string) in DD-MMM format
2751    %o   Date of the article (string) in YYYYMMDD`T'HHMMSS format
2752  %M   Message-id of the article (string)  %M   Message-id of the article (string)
2753  %r   References of the article (string)  %r   References of the article (string)
2754  %c   Number of characters in the article (integer)  %c   Number of characters in the article (integer)
2755    %k   Pretty-printed version of the above (string)
2756         For example, \"1.2k\" or \"0.4M\".
2757  %L   Number of lines in the article (integer)  %L   Number of lines in the article (integer)
2758  %I   Indentation based on thread level (a string of spaces)  %I   Indentation based on thread level (a string of spaces)
2759    %B   A complex trn-style thread tree (string)
2760         The variables `gnus-sum-thread-*' can be used for customization.
2761  %T   A string with two possible values: 80 spaces if the article  %T   A string with two possible values: 80 spaces if the article
2762       is on thread level two or larger and 0 spaces on level one       is on thread level two or larger and 0 spaces on level one
2763  %R   \"A\" if this article has been replied to, \" \" otherwise (character)  %R   \"A\" if this article has been replied to, \" \" otherwise (character)
# Line 1886  with some simple extensions. Line 2774  with some simple extensions.
2774  %V   Total thread score (number).  %V   Total thread score (number).
2775  %P   The line number (number).  %P   The line number (number).
2776  %O   Download mark (character).  %O   Download mark (character).
2777    %*   If present, indicates desired cursor position
2778         (instead of after first colon).
2779  %u   User defined specifier.  The next character in the format string should  %u   User defined specifier.  The next character in the format string should
2780       be a letter.  Gnus will call the function gnus-user-format-function-X,       be a letter.  Gnus will call the function gnus-user-format-function-X,
2781       where X is the letter following %u.  The function will be passed the       where X is the letter following %u.  The function will be passed the
# Line 1893  with some simple extensions. Line 2783  with some simple extensions.
2783       will be inserted into the summary just like information from any other       will be inserted into the summary just like information from any other
2784       summary specifier.       summary specifier.
2785    
 Text between %( and %) will be highlighted with `gnus-mouse-face'  
 when the mouse point is placed inside the area.  There can only be one  
 such area.  
   
2786  The %U (status), %R (replied) and %z (zcore) specs have to be handled  The %U (status), %R (replied) and %z (zcore) specs have to be handled
2787  with care.  For reasons of efficiency, Gnus will compute what column  with care.  For reasons of efficiency, Gnus will compute what column
2788  these characters will end up in, and \"hard-code\" that.  This means that  these characters will end up in, and \"hard-code\" that.  This means that
# Line 1904  it is invalid to have these specs after Line 2790  it is invalid to have these specs after
2790  you might not be arrested, but your summary buffer will look strange,  you might not be arrested, but your summary buffer will look strange,
2791  which is bad enough.  which is bad enough.
2792    
2793  The smart choice is to have these specs as for to the left as  The smart choice is to have these specs as far to the left as
2794  possible.  possible.
2795    
2796  This restriction may disappear in later versions of Gnus."  This restriction may disappear in later versions of Gnus.
2797    
2798    General format specifiers can also be used.
2799    See Info node `(gnus)Formatting Variables'."
2800      :link '(custom-manual "(gnus)Formatting Variables")
2801    :type 'string    :type 'string
2802    :group 'gnus-summary-format)    :group 'gnus-summary-format)
2803    
# Line 1951  This restriction may disappear in later Line 2841  This restriction may disappear in later
2841    "Get hash value of STRING in HASHTABLE."    "Get hash value of STRING in HASHTABLE."
2842    `(symbol-value (intern-soft ,string ,hashtable)))    `(symbol-value (intern-soft ,string ,hashtable)))
2843    
2844    (defmacro gnus-gethash-safe (string hashtable)
2845      "Get hash value of STRING in HASHTABLE.
2846    Return nil if not defined."
2847      `(let ((sym (intern-soft ,string ,hashtable)))
2848         (and (boundp sym) (symbol-value sym))))
2849    
2850  (defmacro gnus-sethash (string value hashtable)  (defmacro gnus-sethash (string value hashtable)
2851    "Set hash value.  Arguments are STRING, VALUE, and HASHTABLE."    "Set hash value.  Arguments are STRING, VALUE, and HASHTABLE."
2852    `(set (intern ,string ,hashtable) ,value))    `(set (intern ,string ,hashtable) ,value))
# Line 2036  This restriction may disappear in later Line 2932  This restriction may disappear in later
2932  (defmacro gnus-get-info (group)  (defmacro gnus-get-info (group)
2933    `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))    `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
2934    
 ;; Byte-compiler warning.  
 (defvar gnus-visual)  
 ;; Find out whether the gnus-visual TYPE is wanted.  
 (defun gnus-visual-p (&optional type class)  
   (and gnus-visual                      ; Has to be non-nil, at least.  
        (if (not type)                   ; We don't care about type.  
            gnus-visual  
          (if (listp gnus-visual)        ; It's a list, so we check it.  
              (or (memq type gnus-visual)  
                  (memq class gnus-visual))  
            t))))  
   
2935  ;;; Load the compatibility functions.  ;;; Load the compatibility functions.
2936    
2937  (require 'gnus-ems)  (require 'gnus-ems)
# Line 2076  This restriction may disappear in later Line 2960  This restriction may disappear in later
2960  ;;; Gnus Utility Functions  ;;; Gnus Utility Functions
2961  ;;;  ;;;
2962    
2963    (defun gnus-find-subscribed-addresses ()
2964      "Return a regexp matching the addresses of all subscribed mail groups.
2965    It consists of the `to-address' or `to-list' parameter of all groups
2966    with a `subscribed' parameter."
2967      (let (group address addresses)
2968        (dolist (entry (cdr gnus-newsrc-alist))
2969          (setq group (car entry))
2970          (when (gnus-parameter-subscribed group)
2971            (setq address (mail-strip-quoted-names
2972                           (or (gnus-group-fast-parameter group 'to-address)
2973                               (gnus-group-fast-parameter group 'to-list))))
2974            (when address
2975              (add-to-list 'addresses address))))
2976        (when addresses
2977          (list (mapconcat 'regexp-quote addresses "\\|")))))
2978    
2979  (defmacro gnus-string-or (&rest strings)  (defmacro gnus-string-or (&rest strings)
2980    "Return the first element of STRINGS that is a non-blank string.    "Return the first element of STRINGS that is a non-blank string.
# Line 2099  If ARG, insert string at point." Line 2998  If ARG, insert string at point."
2998        (insert (message gnus-version))        (insert (message gnus-version))
2999      (message gnus-version)))      (message gnus-version)))
3000    
3001  (defun gnus-continuum-version (version)  (defun gnus-continuum-version (&optional version)
3002    "Return VERSION as a floating point number."    "Return VERSION as a floating point number."
3003      (interactive)
3004      (unless version
3005        (setq version gnus-version))
3006    (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)    (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
3007              (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version))              (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version))
3008      (let ((alpha (and (match-beginning 1) (match-string 1 version)))      (let ((alpha (and (match-beginning 1) (match-string 1 version)))
# Line 2116  If ARG, insert string at point." Line 3018  If ARG, insert string at point."
3018                      0))                      0))
3019        (string-to-number        (string-to-number
3020         (if (zerop major)         (if (zerop major)
3021             (format "%s00%02d%02d"               (format "%s00%02d%02d"
3022                     (if (member alpha '("(ding)" "d"))                       (if (member alpha '("(ding)" "d"))
3023                         "4.99"                           "4.99"
3024                       (+ 5 (* 0.02                         (+ 5 (* 0.02
3025                               (abs                                 (abs
3026                                (- (mm-char-int (aref (downcase alpha) 0))                                  (- (mm-char-int (aref (downcase alpha) 0))
3027                                   (mm-char-int ?t))))                                     (mm-char-int ?t))))
3028                          -0.01))                            -0.01))
3029                     minor least)                       minor least)
3030           (format "%d.%02d%02d" major minor least))))))           (format "%d.%02d%02d" major minor least))))))
3031    
3032  (defun gnus-info-find-node ()  (defun gnus-info-find-node (&optional nodename)
3033    "Find Info documentation of Gnus."    "Find Info documentation of Gnus."
3034    (interactive)    (interactive)
3035    ;; Enlarge info window if needed.    ;; Enlarge info window if needed.
3036    (let (gnus-info-buffer)    (let (gnus-info-buffer)
3037      (Info-goto-node (cadr (assq major-mode gnus-info-nodes)))      (Info-goto-node (or nodename (cadr (assq major-mode gnus-info-nodes))))
3038      (setq gnus-info-buffer (current-buffer))      (setq gnus-info-buffer (current-buffer))
3039      (gnus-configure-windows 'info)))      (gnus-configure-windows 'info)))
3040    
# Line 2274  that that variable is buffer-local to th Line 3176  that that variable is buffer-local to th
3176    (let ((group (or group gnus-newsgroup-name)))    (let ((group (or group gnus-newsgroup-name)))
3177      (not (gnus-check-backend-function 'request-replace-article group))))      (not (gnus-check-backend-function 'request-replace-article group))))
3178    
 (defun gnus-group-total-expirable-p (group)  
   "Check whether GROUP is total-expirable or not."  
   (let ((params (gnus-group-find-parameter group))  
         val)  
     (cond  
      ((memq 'total-expire params)  
       t)  
      ((setq val (assq 'total-expire params)) ; (auto-expire . t)  
       (cdr val))  
      (gnus-total-expirable-newsgroups   ; Check var.  
       (string-match gnus-total-expirable-newsgroups group)))))  
   
 (defun gnus-group-auto-expirable-p (group)  
   "Check whether GROUP is auto-expirable or not."  
   (let ((params (gnus-group-find-parameter group))  
         val)  
     (cond  
      ((memq 'auto-expire params)  
       t)  
      ((setq val (assq 'auto-expire params)) ; (auto-expire . t)  
       (cdr val))  
      (gnus-auto-expirable-newsgroups    ; Check var.  
       (string-match gnus-auto-expirable-newsgroups group)))))  
   
3179  (defun gnus-virtual-group-p (group)  (defun gnus-virtual-group-p (group)
3180    "Say whether GROUP is virtual or not."    "Say whether GROUP is virtual or not."
3181    (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))    (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))
# Line 2305  that that variable is buffer-local to th Line 3183  that that variable is buffer-local to th
3183    
3184  (defun gnus-news-group-p (group &optional article)  (defun gnus-news-group-p (group &optional article)
3185    "Return non-nil if GROUP (and ARTICLE) come from a news server."    "Return non-nil if GROUP (and ARTICLE) come from a news server."
3186    (or (gnus-member-of-valid 'post group) ; Ordinary news group.    (cond ((gnus-member-of-valid 'post group) ;Ordinary news group
3187        (and (gnus-member-of-valid 'post-mail group) ; Combined group.           t)                             ;is news of course.
3188             (if (or (null article)          ((not (gnus-member-of-valid 'post-mail group)) ;Non-combined.
3189                     (not (< article 0)))           nil)                           ;must be mail then.
3190                 (eq (gnus-request-type group article) 'news)          ((vectorp article)              ;Has header info.
3191               (if (not (vectorp article))           (eq (gnus-request-type group (mail-header-id article)) 'news))
3192                   nil          ((null article)                 ;Hasn't header info
3193                 ;; It's a real article.           (eq (gnus-request-type group) 'news)) ;(unknown ==> mail)
3194                 (eq (gnus-request-type group (mail-header-id article))          ((< article 0)                  ;Virtual message
3195                     'news))))))           nil)                           ;we don't know, guess mail.
3196            (t                              ;Has positive number
3197             (eq (gnus-request-type group article) 'news)))) ;use it.
3198    
3199  ;; Returns a list of writable groups.  ;; Returns a list of writable groups.
3200  (defun gnus-writable-groups ()  (defun gnus-writable-groups ()
# Line 2376  that that variable is buffer-local to th Line 3256  that that variable is buffer-local to th
3256                                     (nth 1 method))))                                     (nth 1 method))))
3257        method)))        method)))
3258    
3259    (defsubst gnus-server-to-method (server)
3260      "Map virtual server names to select methods."
3261      (or (and server (listp server) server)
3262          (cdr (assoc server gnus-server-method-cache))
3263          (let ((result
3264                 (or
3265                  ;; Perhaps this is the native server?
3266                  (and (equal server "native") gnus-select-method)
3267                  ;; It should be in the server alist.
3268                  (cdr (assoc server gnus-server-alist))
3269                  ;; It could be in the predefined server alist.
3270                  (cdr (assoc server gnus-predefined-server-alist))
3271                  ;; If not, we look through all the opened server
3272                  ;; to see whether we can find it there.
3273                  (let ((opened gnus-opened-servers))
3274                    (while (and opened
3275                                (not (equal server (format "%s:%s" (caaar opened)
3276                                                           (cadaar opened)))))
3277                      (pop opened))
3278                    (caar opened))
3279                  ;; It could be a named method, search all servers
3280                  (let ((servers gnus-secondary-select-methods))
3281                    (while (and servers
3282                                (not (equal server (format "%s:%s" (caar servers)
3283                                                           (cadar servers)))))
3284                      (pop servers))
3285                    (car servers))
3286                  ;; This could be some sort of foreign server that I
3287                  ;; simply haven't opened (yet).  Do a brute-force scan
3288                  ;; of the entire gnus-newsrc-alist for the server name
3289                  ;; of every method.  As a side-effect, loads the
3290                  ;; gnus-server-method-cache so this only happens once,
3291                  ;; if at all.
3292                  (let (match)
3293                    (mapcar
3294                     (lambda (info)
3295                       (let ((info-method (gnus-info-method info)))
3296                         (unless (stringp info-method)
3297                           (let ((info-server (gnus-method-to-server info-method)))
3298                             (when (equal server info-server)
3299                               (setq match info-method))))))
3300                     (cdr gnus-newsrc-alist))
3301                    match))))
3302            (when result
3303              (push (cons server result) gnus-server-method-cache))
3304            result)))
3305    
3306    (defsubst gnus-method-to-server (method)
3307      (catch 'server-name
3308        (setq method (or method gnus-select-method))
3309    
3310        ;; Perhaps it is already in the cache.
3311        (mapc (lambda (name-method)
3312                (if (equal (cdr name-method) method)
3313                    (throw 'server-name (car name-method))))
3314              gnus-server-method-cache)
3315    
3316        (mapc
3317         (lambda (server-alist)
3318           (mapc (lambda (name-method)
3319                   (when (gnus-methods-equal-p (cdr name-method) method)
3320                     (unless (member name-method gnus-server-method-cache)
3321                       (push name-method gnus-server-method-cache))
3322                     (throw 'server-name (car name-method))))
3323                 server-alist))
3324         (let ((alists (list gnus-server-alist
3325                             gnus-predefined-server-alist)))
3326           (if gnus-select-method
3327               (push (list (cons "native" gnus-select-method)) alists))
3328           alists))
3329    
3330        (let* ((name (if (member (cadr method) '(nil ""))
3331                         (format "%s" (car method))
3332                       (format "%s:%s" (car method) (cadr method))))
3333               (name-method (cons name method)))
3334          (unless (member name-method gnus-server-method-cache)
3335            (push name-method gnus-server-method-cache))
3336          name)))
3337    
3338  (defsubst gnus-server-get-method (group method)  (defsubst gnus-server-get-method (group method)
3339    ;; Input either a server name, and extended server name, or a    ;; Input either a server name, and extended server name, or a
3340    ;; select method, and return a select method.    ;; select method, and return a select method.
# Line 2393  that that variable is buffer-local to th Line 3352  that that variable is buffer-local to th
3352          (t          (t
3353           (gnus-server-add-address method))))           (gnus-server-add-address method))))
3354    
 (defun gnus-server-to-method (server)  
   "Map virtual server names to select methods."  
   (or  
    ;; Is this a method, perhaps?  
    (and server (listp server) server)  
    ;; Perhaps this is the native server?  
    (and (equal server "native") gnus-select-method)  
    ;; It should be in the server alist.  
    (cdr (assoc server gnus-server-alist))  
    ;; It could be in the predefined server alist.  
    (cdr (assoc server gnus-predefined-server-alist))  
    ;; If not, we look through all the opened server  
    ;; to see whether we can find it there.  
    (let ((opened gnus-opened-servers))  
      (while (and opened  
                  (not (equal server (format "%s:%s" (caaar opened)  
                                             (cadaar opened)))))  
        (pop opened))  
      (caar opened))  
    ;; It could be a named method, search all servers  
    (let ((servers gnus-secondary-select-methods))  
      (while (and servers  
                  (not (equal server (format "%s:%s" (caar servers)  
                                             (cadar servers)))))  
        (pop servers))  
      (car servers))))  
   
3355  (defmacro gnus-method-equal (ss1 ss2)  (defmacro gnus-method-equal (ss1 ss2)
3356    "Say whether two servers are equal."    "Say whether two servers are equal."
3357    `(let ((s1 ,ss1)    `(let ((s1 ,ss1)
# Line 2474  that that variable is buffer-local to th Line 3406  that that variable is buffer-local to th
3406        (and active        (and active
3407             (file-exists-p active))))))             (file-exists-p active))))))
3408    
3409  (defun gnus-group-prefixed-name (group method)  (defsubst gnus-method-to-server-name (method)
3410    "Return the whole name from GROUP and METHOD."    (concat
3411    (and (stringp method) (setq method (gnus-server-to-method method)))     (format "%s" (car method))
3412       (when (and
3413              (or (assoc (format "%s" (car method))
3414                         (gnus-methods-using 'address))
3415                  (gnus-server-equal method gnus-message-archive-method))
3416              (nth 1 method)
3417              (not (string= (nth 1 method) "")))
3418         (concat "+" (nth 1 method)))))
3419    
3420    (defsubst gnus-method-to-full-server-name (method)
3421      (format "%s+%s" (car method) (nth 1 method)))
3422    
3423    (defun gnus-group-prefixed-name (group method &optional full)
3424      "Return the whole name from GROUP and METHOD.
3425    Call with full set to get the fully qualified group name (even if the
3426    server is native)."
3427      (when (stringp method)
3428        (setq method (gnus-server-to-method method)))
3429    (if (or (not method)    (if (or (not method)
3430            (gnus-server-equal method "native"))            (and (not full) (gnus-server-equal method "native"))
3431              ;;;!!! This might not be right.  We'll see...
3432              ;(string-match ":" group)
3433              )
3434          group
3435        (concat (gnus-method-to-server-name method) ":" group)))
3436    
3437    (defun gnus-group-guess-prefixed-name (group)
3438      "Guess the whole name from GROUP and METHOD."
3439      (gnus-group-prefixed-name group (gnus-find-method-for-group
3440                                   group)))
3441    
3442    (defun gnus-group-full-name (group method)
3443      "Return the full name from GROUP and METHOD, even if the method is native."
3444      (gnus-group-prefixed-name group method t))
3445    
3446    (defun gnus-group-guess-full-name (group)
3447      "Guess the full name from GROUP, even if the method is native."
3448      (if (gnus-group-prefixed-p group)
3449          group
3450        (gnus-group-full-name group (gnus-find-method-for-group group))))
3451    
3452    (defun gnus-group-guess-full-name-from-command-method (group)
3453      "Guess the full name from GROUP, even if the method is native."
3454      (if (gnus-group-prefixed-p group)
3455        group        group
3456      (concat (format "%s" (car method))      (gnus-group-full-name group gnus-command-method)))
             (when (and  
                    (or (assoc (format "%s" (car method))  
                               (gnus-methods-using 'address))  
                        (gnus-server-equal method gnus-message-archive-method))  
                    (nth 1 method)  
                    (not (string= (nth 1 method) "")))  
               (concat "+" (nth 1 method)))  
             ":" group)))  
3457    
3458  (defun gnus-group-real-prefix (group)  (defun gnus-group-real-prefix (group)
3459    "Return the prefix of the current group name."    "Return the prefix of the current group name."
3460    (if (string-match "^[^:]+:" group)    (if (stringp group)
3461        (substring group 0 (match-end 0))        (if (string-match "^[^:]+:" group)
3462      ""))            (substring group 0 (match-end 0))
3463            "")
3464        nil))
3465    
3466    (defun gnus-group-short-name (group)
3467      "Return the short group name."
3468      (let ((prefix (gnus-group-real-prefix group)))
3469        (if (< 0 (length prefix))
3470            (substring group (length prefix) nil)
3471          group)))
3472    
3473    (defun gnus-group-prefixed-p (group)
3474      "Return the prefix of the current group name."
3475      (< 0 (length (gnus-group-real-prefix group))))
3476    
3477    (defun gnus-summary-buffer-name (group)
3478      "Return the summary buffer name of GROUP."
3479      (concat "*Summary " (gnus-group-decoded-name group) "*"))
3480    
3481  (defun gnus-group-method (group)  (defun gnus-group-method (group)
3482    "Return the server or method used for selecting GROUP.    "Return the server or method used for selecting GROUP.
# Line 2528  You should probably use `gnus-find-metho Line 3510  You should probably use `gnus-find-metho
3510  (defsubst gnus-secondary-method-p (method)  (defsubst gnus-secondary-method-p (method)
3511    "Return whether METHOD is a secondary select method."    "Return whether METHOD is a secondary select method."
3512    (let ((methods gnus-secondary-select-methods)    (let ((methods gnus-secondary-select-methods)
3513          (gmethod (gnus-server-get-method nil method)))          (gmethod (inline (gnus-server-get-method nil method))))
3514      (while (and methods      (while (and methods
3515                  (not (gnus-method-equal                  (not (gnus-method-equal
3516                        (gnus-server-get-method nil (car methods))                        (inline (gnus-server-get-method nil (car methods)))
3517                        gmethod)))                        gmethod)))
3518        (setq methods (cdr methods)))        (setq methods (cdr methods)))
3519      methods))      methods))
# Line 2569  You should probably use `gnus-find-metho Line 3551  You should probably use `gnus-find-metho
3551    "Say whether the group is secondary or not."    "Say whether the group is secondary or not."
3552    (gnus-secondary-method-p (gnus-find-method-for-group group)))    (gnus-secondary-method-p (gnus-find-method-for-group group)))
3553    
3554    (defun gnus-parameters-get-parameter (group)
3555      "Return the group parameters for GROUP from `gnus-parameters'."
3556      (let (params-list)
3557        (dolist (elem gnus-parameters)
3558          (when (string-match (car elem) group)
3559            (setq params-list
3560                  (nconc (gnus-expand-group-parameters
3561                          (car elem) (cdr elem) group)
3562                         params-list))))
3563        params-list))
3564    
3565    (defun gnus-expand-group-parameter (match value group)
3566      "Use MATCH to expand VALUE in GROUP."
3567      (with-temp-buffer
3568        (insert group)
3569        (goto-char (point-min))
3570        (while (re-search-forward match nil t)
3571          (replace-match value))
3572        (buffer-string)))
3573    
3574    (defun gnus-expand-group-parameters (match parameters group)
3575      "Go through PARAMETERS and expand them according to the match data."
3576      (let (new)
3577        (dolist (elem parameters)
3578          (if (and (stringp (cdr elem))
3579                   (string-match "\\\\[0-9&]" (cdr elem)))
3580              (push (cons (car elem)
3581                          (gnus-expand-group-parameter match (cdr elem) group))
3582                    new)
3583            (push elem new)))
3584        new))
3585    
3586    (defun gnus-group-fast-parameter (group symbol &optional allow-list)
3587      "For GROUP, return the value of SYMBOL.
3588    
3589    You should call this in the `gnus-group-buffer' buffer.
3590    The function `gnus-group-find-parameter' will do that for you."
3591      ;; The speed trick:  No cons'ing and quit early.
3592      (let* ((params (funcall gnus-group-get-parameter-function group))
3593             ;; Start easy, check the "real" group parameters.
3594             (simple-results
3595              (gnus-group-parameter-value params symbol allow-list t)))
3596        (if simple-results
3597            ;; Found results; return them.
3598            (car simple-results)
3599          ;; We didn't found it there, try `gnus-parameters'.
3600          (let ((result nil)
3601                (head nil)
3602                (tail gnus-parameters))
3603            ;; A good old-fashioned non-cl loop.
3604            (while tail
3605              (setq head (car tail)
3606                    tail (cdr tail))
3607              ;; The car is regexp matching for matching the group name.
3608              (when (string-match (car head) group)
3609                ;; The cdr is the parameters.
3610                (setq result (gnus-group-parameter-value (cdr head)
3611                                                         symbol allow-list))
3612                (when result
3613                  ;; Expand if necessary.
3614                  (if (and (stringp result) (string-match "\\\\[0-9&]" result))
3615                      (setq result (gnus-expand-group-parameter (car head)
3616                                                                result group)))
3617                  ;; Exit the loop early.
3618                  (setq tail nil))))
3619            ;; Done.
3620            result))))
3621    
3622  (defun gnus-group-find-parameter (group &optional symbol allow-list)  (defun gnus-group-find-parameter (group &optional symbol allow-list)
3623    "Return the group parameters for GROUP.    "Return the group parameters for GROUP.
3624  If SYMBOL, return the value of that symbol in the group parameters."  If SYMBOL, return the value of that symbol in the group parameters.
3625    
3626    If you call this function inside a loop, consider using the faster
3627    `gnus-group-fast-parameter' instead."
3628    (save-excursion    (save-excursion
3629      (set-buffer gnus-group-buffer)      (set-buffer gnus-group-buffer)
3630      (let ((parameters (funcall gnus-group-get-parameter-function group)))      (if symbol
3631        (if symbol          (gnus-group-fast-parameter group symbol allow-list)
3632            (gnus-group-parameter-value parameters symbol allow-list)        (nconc
3633          parameters))))         (copy-sequence
3634            (funcall gnus-group-get-parameter-function group))
3635           (gnus-parameters-get-parameter group)))))
3636    
3637  (defun gnus-group-get-parameter (group &optional symbol allow-list)  (defun gnus-group-get-parameter (group &optional symbol allow-list)
3638    "Return the group parameters for GROUP.    "Return the group parameters for GROUP.
# Line 2589  also examines the topic parameters." Line 3644  also examines the topic parameters."
3644          (gnus-group-parameter-value params symbol allow-list)          (gnus-group-parameter-value params symbol allow-list)
3645        params)))        params)))
3646    
3647  (defun gnus-group-parameter-value (params symbol &optional allow-list)  (defun gnus-group-parameter-value (params symbol &optional
3648                                              allow-list present-p)
3649    "Return the value of SYMBOL in group PARAMS."    "Return the value of SYMBOL in group PARAMS."
3650    ;; We only wish to return group parameters (dotted lists) and    ;; We only wish to return group parameters (dotted lists) and
3651    ;; not local variables, which may have the same names.    ;; not local variables, which may have the same names.
# Line 2603  also examines the topic parameters." Line 3659  also examines the topic parameters."
3659                         (eq (car elem) symbol)                         (eq (car elem) symbol)
3660                         (or allow-list                         (or allow-list
3661                             (atom (cdr elem))))                             (atom (cdr elem))))
3662                (throw 'found (cdr elem))))))))                (throw 'found (if present-p (list (cdr elem))
3663                                  (cdr elem)))))))))
3664    
3665  (defun gnus-group-add-parameter (group param)  (defun gnus-group-add-parameter (group param)
3666    "Add parameter PARAM to GROUP."    "Add parameter PARAM to GROUP."
# Line 2662  just the host name." Line 3719  just the host name."
3719                                 depth (+ depth 1)))                                 depth (+ depth 1)))
3720                         depth))))                         depth))))
3721      ;; Separate foreign select method from group name and collapse.      ;; Separate foreign select method from group name and collapse.
3722      ;; If method contains a server, collapse to non-domain server name,     ;; If method contains a server, collapse to non-domain server name,
3723      ;; otherwise collapse to select method.      ;; otherwise collapse to select method.
3724      (let* ((colon (string-match ":" group))      (let* ((colon (string-match ":" group))
3725             (server (and colon (substring group 0 colon)))             (server (and colon (substring group 0 colon)))
# Line 2809  If NEWSGROUP is nil, return the global k Line 3866  If NEWSGROUP is nil, return the global k
3866            (list (intern server) "")))            (list (intern server) "")))
3867      gnus-select-method))      gnus-select-method))
3868    
3869    (defun gnus-server-string (server)
3870      "Return a readable string that describes SERVER."
3871      (let* ((server (gnus-server-to-method server))
3872             (address (nth 1 server)))
3873        (if (and address
3874                 (not (zerop (length address))))
3875            (format "%s using %s" address (car server))
3876          (format "%s" (car server)))))
3877    
3878  (defun gnus-find-method-for-group (group &optional info)  (defun gnus-find-method-for-group (group &optional info)
3879    "Find the select method that GROUP uses."    "Find the select method that GROUP uses."
3880    (or gnus-override-method    (or gnus-override-method
3881        (and (not group)        (and (not group)
3882             gnus-select-method)             gnus-select-method)
3883        (and (not (gnus-group-entry group));; a new group        (and (not (gnus-group-entry group)) ;; a new group
3884             (gnus-group-name-to-method group))             (gnus-group-name-to-method group))
3885        (let ((info (or info (gnus-get-info group)))        (let ((info (or info (gnus-get-info group)))
3886              method)              method)
# Line 2857  Disallow invalid group names." Line 3923  Disallow invalid group names."
3923               (setq group (read-string (concat prefix prompt)               (setq group (read-string (concat prefix prompt)
3924                                        (cons (or default "") 0)                                        (cons (or default "") 0)
3925                                        'gnus-group-history)))                                        'gnus-group-history)))
3926          (setq prefix (format "Invalid group name: \"%s\".  " group)          (let ((match (match-string 0 group)))
3927                group nil)))            ;; Might be okay (e.g. for nnimap), so ask the user:
3928              (unless (and (not (string-match "^$\\|:" match))
3929                           (message-y-or-n-p
3930                            "Proceed and create group anyway? " t
3931    "The group name \"" group "\" contains a forbidden character: \"" match "\".
3932    
3933    Usually, it's dangerous to create a group with this name, because it's not
3934    supported by all back ends and servers.  On IMAP servers it should work,
3935    though.  If you are really sure, you can proceed anyway and create the group.
3936    
3937    You may customize the variable `gnus-invalid-group-regexp', which currently is
3938    set to \"" gnus-invalid-group-regexp
3939    "\", if you want to get rid of this query permanently."))
3940                (setq prefix (format "Invalid group name: \"%s\".  " group)
3941                      group nil)))))
3942      group))      group))
3943    
3944  (defun gnus-read-method (prompt)  (defun gnus-read-method (prompt)
3945    "Prompt the user for a method.    "Prompt the user for a method.
3946  Allow completion over sensible values."  Allow completion over sensible values."
3947    (let* ((servers    (let* ((open-servers
3948            (append gnus-valid-select-methods            (mapcar (lambda (i) (cons (format "%s:%s" (caar i) (cadar i)) i))
3949                    (mapcar (lambda (i) (list (format "%s:%s" (caar i)                    gnus-opened-servers))
3950                                                      (cadar i))))           (valid-methods
3951                            gnus-opened-servers)            (let (methods)
3952                (dolist (method gnus-valid-select-methods)
3953                  (if (or (memq 'prompt-address method)
3954                          (not (assoc (format "%s:" (car method)) open-servers)))
3955                      (push method methods)))
3956                methods))
3957             (servers
3958              (append valid-methods
3959                      open-servers
3960                    gnus-predefined-server-alist                    gnus-predefined-server-alist
3961                    gnus-server-alist))                    gnus-server-alist))
3962           (method           (method
# Line 2883  Allow completion over sensible values." Line 3971  Allow completion over sensible values."
3971                                 (assoc method gnus-valid-select-methods))                                 (assoc method gnus-valid-select-methods))
3972                           (read-string "Address: ")                           (read-string "Address: ")
3973                         "")))                         "")))
3974          (or (let ((opened gnus-opened-servers))          (or (cadr (assoc (format "%s:%s" method address) open-servers))
               (while (and opened  
                           (not (equal (format "%s:%s" method address)  
                                       (format "%s:%s" (caaar opened)  
                                               (cadaar opened)))))  
                 (pop opened))  
               (caar opened))  
3975              (list (intern method) address))))              (list (intern method) address))))
3976       ((assoc method servers)       ((assoc method servers)
3977        method)        method)
3978       (t       (t
3979        (list (intern method) "")))))        (list (intern method) "")))))
3980    
3981    ;;; Agent functions
3982    
3983    (defun gnus-agent-method-p (method)
3984      "Say whether METHOD is covered by the agent."
3985      (or (eq (car gnus-agent-method-p-cache) method)
3986          (setq gnus-agent-method-p-cache
3987                (cons method
3988                      (member (if (stringp method)
3989                                  method
3990                                (gnus-method-to-server method)) gnus-agent-covered-methods))))
3991      (cdr gnus-agent-method-p-cache))
3992    
3993    (defun gnus-online (method)
3994      (not
3995       (if gnus-plugged
3996           (eq (cadr (assoc method gnus-opened-servers)) 'offline)
3997         (gnus-agent-method-p method))))
3998    
3999  ;;; User-level commands.  ;;; User-level commands.
4000    
4001  ;;;###autoload  ;;;###autoload
4002  (defun gnus-slave-no-server (&optional arg)  (defun gnus-slave-no-server (&optional arg)
4003    "Read network news as a slave, without connecting to local server."    "Read network news as a slave, without connecting to the local server."
4004    (interactive "P")    (interactive "P")
4005    (gnus-no-server arg t))    (gnus-no-server arg t))
4006    
4007  ;;;###autoload  ;;;###autoload
4008  (defun gnus-no-server (&optional arg slave)  (defun gnus-no-server (&optional arg slave)
4009    "Read network news.    "Read network news.
4010  If ARG is a positive number, Gnus will use that as the  If ARG is a positive number, Gnus will use that as the startup
4011  startup level.  If ARG is nil, Gnus will be started at level 2.  level. If ARG is nil, Gnus will be started at level 2.  If ARG is
4012  If ARG is non-nil and not a positive number, Gnus will  non-nil and not a positive number, Gnus will prompt the user for the
4013  prompt the user for the name of an NNTP server to use.  name of an NNTP server to use.
4014  As opposed to `gnus', this command will not connect to the local server."  As opposed to `gnus', this command will not connect to the local
4015    server."
4016    (interactive "P")    (interactive "P")
4017    (gnus-no-server-1 arg slave))    (gnus-no-server-1 arg slave))
4018    
# Line 2922  As opposed to `gnus', this command will Line 4023  As opposed to `gnus', this command will
4023    (gnus arg nil 'slave))    (gnus arg nil 'slave))
4024    
4025  ;;;###autoload  ;;;###autoload
4026  (defun gnus-other-frame (&optional arg)  (defun gnus-other-frame (&optional arg display)
4027    "Pop up a frame to read news."    "Pop up a frame to read news.
4028    This will call one of the Gnus commands which is specified by the user
4029    option `gnus-other-frame-function' (default `gnus') with the argument
4030    ARG if Gnus is not running, otherwise just pop up a Gnus frame.  The
4031    optional second argument DISPLAY should be a standard display string
4032    such as \"unix:0\" to specify where to pop up a frame.  If DISPLAY is
4033    omitted or the function `make-frame-on-display' is not available, the
4034    current display is used."
4035    (interactive "P")    (interactive "P")
4036    (let ((window (get-buffer-window gnus-group-buffer)))    (if (fboundp 'make-frame-on-display)
4037      (cond (window        (unless display
4038             (select-frame (window-frame window)))          (setq display (gnus-frame-or-window-display-name (selected-frame))))
4039            (t      (setq display nil))
4040             (select-frame (make-frame)))))    (let ((alive (gnus-alive-p)))
4041    (gnus arg))      (unless (and alive
4042                     (catch 'found
4043                       (walk-windows
4044                        (lambda (window)
4045                          (when (and (or (not display)
4046                                         (equal display
4047                                                (gnus-frame-or-window-display-name
4048                                                 window)))
4049                                     (with-current-buffer (window-buffer window)
4050                                       (string-match "\\`gnus-"
4051                                                     (symbol-name major-mode))))
4052                            (gnus-select-frame-set-input-focus
4053                             (setq gnus-other-frame-object (window-frame window)))
4054                            (select-window window)
4055                            (throw 'found t)))
4056                        'ignore t)))
4057          (gnus-select-frame-set-input-focus
4058           (setq gnus-other-frame-object
4059                 (if display
4060                     (make-frame-on-display display gnus-other-frame-parameters)
4061                   (make-frame gnus-other-frame-parameters))))
4062          (if alive
4063              (switch-to-buffer gnus-group-buffer)
4064            (funcall gnus-other-frame-function arg)
4065            (add-hook 'gnus-exit-gnus-hook
4066                      '(lambda nil
4067                         (when (and (frame-live-p gnus-other-frame-object)
4068                                    (cdr (frame-list)))
4069                           (delete-frame gnus-other-frame-object))
4070                         (setq gnus-other-frame-object nil)))))))
4071    
4072  ;;(setq thing ?                         ; this is a comment  ;;(setq thing ?                         ; this is a comment
4073  ;;      more 'yes)  ;;      more 'yes)
# Line 2939  As opposed to `gnus', this command will Line 4076  As opposed to `gnus', this command will
4076  (defun gnus (&optional arg dont-connect slave)  (defun gnus (&optional arg dont-connect slave)
4077    "Read network news.    "Read network news.
4078  If ARG is non-nil and a positive number, Gnus will use that as the  If ARG is non-nil and a positive number, Gnus will use that as the
4079  startup level.  If ARG is non-nil and not a positive number, Gnus will  startup level.  If ARG is non-nil and not a positive number, Gnus will
4080  prompt the user for the name of an NNTP server to use."  prompt the user for the name of an NNTP server to use."
4081    (interactive "P")    (interactive "P")
4082      (unless (byte-code-function-p (symbol-function 'gnus))
4083        (message "You should byte-compile Gnus")
4084        (sit-for 2))
4085    (gnus-1 arg dont-connect slave))    (gnus-1 arg dont-connect slave))
4086    
4087  ;; Allow redefinition of Gnus functions.  ;; Allow redefinition of Gnus functions.

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26