1 ;;; gnus.el --- a newsreader for GNU Emacs
3 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,
4 ;; 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
6 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7 ;; Lars Magne Ingebrigtsen <larsi@gnus.org>
8 ;; Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
9 ;; Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
10 ;; Keywords: news, mail
12 ;; This file is part of GNU Emacs.
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation; either version 2, or (at your option)
19 ;; GNU Emacs is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;; GNU General Public License for more details.
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27 ;; Boston, MA 02111-1307, USA.
33 (eval '(run-hooks 'gnus-load-hook))
35 (eval-when-compile (require 'cl))
36 (eval-when-compile (require 'static))
44 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
48 (defgroup gnus-format nil
49 "Dealing with formatting issues."
53 (defgroup gnus-charset nil
54 "Group character set issues."
55 :link '(custom-manual "(gnus)Charsets")
59 (defgroup gnus-cache nil
63 (defgroup gnus-start nil
64 "Starting your favorite newsreader."
67 (defgroup gnus-start-server nil
68 "Server options at startup."
71 ;; These belong to gnus-group.el.
72 (defgroup gnus-group nil
74 :link '(custom-manual "(gnus)The Group Buffer")
77 (defgroup gnus-group-foreign nil
79 :link '(custom-manual "(gnus)Foreign Groups")
82 (defgroup gnus-group-new nil
83 "Automatic subscription of new groups."
86 (defgroup gnus-group-levels nil
88 :link '(custom-manual "(gnus)Group Levels")
91 (defgroup gnus-group-select nil
93 :link '(custom-manual "(gnus)Selecting a Group")
96 (defgroup gnus-group-listing nil
97 "Showing slices of the group list."
98 :link '(custom-manual "(gnus)Listing Groups")
101 (defgroup gnus-group-visual nil
102 "Sorting the group buffer."
103 :link '(custom-manual "(gnus)Group Buffer Format")
107 (defgroup gnus-group-various nil
108 "Various group options."
109 :link '(custom-manual "(gnus)Scanning New Messages")
112 ;; These belong to gnus-sum.el.
113 (defgroup gnus-summary nil
115 :link '(custom-manual "(gnus)The Summary Buffer")
118 (defgroup gnus-summary-exit nil
119 "Leaving summary buffers."
120 :link '(custom-manual "(gnus)Exiting the Summary Buffer")
121 :group 'gnus-summary)
123 (defgroup gnus-summary-marks nil
124 "Marks used in summary buffers."
125 :link '(custom-manual "(gnus)Marking Articles")
126 :group 'gnus-summary)
128 (defgroup gnus-thread nil
129 "Ordering articles according to replies."
130 :link '(custom-manual "(gnus)Threading")
131 :group 'gnus-summary)
133 (defgroup gnus-summary-format nil
134 "Formatting of the summary buffer."
135 :link '(custom-manual "(gnus)Summary Buffer Format")
136 :group 'gnus-summary)
138 (defgroup gnus-summary-choose nil
140 :link '(custom-manual "(gnus)Choosing Articles")
141 :group 'gnus-summary)
143 (defgroup gnus-summary-maneuvering nil
144 "Summary movement commands."
145 :link '(custom-manual "(gnus)Summary Maneuvering")
146 :group 'gnus-summary)
148 (defgroup gnus-picon nil
149 "Show pictures of people, domains, and newsgroups."
152 (defgroup gnus-summary-mail nil
153 "Mail group commands."
154 :link '(custom-manual "(gnus)Mail Group Commands")
155 :group 'gnus-summary)
157 (defgroup gnus-summary-sort nil
158 "Sorting the summary buffer."
159 :link '(custom-manual "(gnus)Sorting")
160 :group 'gnus-summary)
162 (defgroup gnus-summary-visual nil
163 "Highlighting and menus in the summary buffer."
164 :link '(custom-manual "(gnus)Summary Highlighting")
166 :group 'gnus-summary)
168 (defgroup gnus-summary-various nil
169 "Various summary buffer options."
170 :link '(custom-manual "(gnus)Various Summary Stuff")
171 :group 'gnus-summary)
173 (defgroup gnus-summary-pick nil
174 "Pick mode in the summary buffer."
175 :link '(custom-manual "(gnus)Pick and Read")
177 :group 'gnus-summary)
179 (defgroup gnus-summary-tree nil
180 "Tree display of threads in the summary buffer."
181 :link '(custom-manual "(gnus)Tree Display")
183 :group 'gnus-summary)
185 ;; Belongs to gnus-uu.el
186 (defgroup gnus-extract-view nil
187 "Viewing extracted files."
188 :link '(custom-manual "(gnus)Viewing Files")
189 :group 'gnus-extract)
191 ;; Belongs to gnus-score.el
192 (defgroup gnus-score nil
193 "Score and kill file handling."
196 (defgroup gnus-score-kill nil
200 (defgroup gnus-score-adapt nil
201 "Adaptive score files."
204 (defgroup gnus-score-default nil
205 "Default values for score files."
208 (defgroup gnus-score-expire nil
209 "Expiring score rules."
212 (defgroup gnus-score-decay nil
213 "Decaying score rules."
216 (defgroup gnus-score-files nil
217 "Score and kill file names."
221 (defgroup gnus-score-various nil
222 "Various scoring and killing options."
226 (defgroup gnus-visual nil
227 "Options controlling the visual fluff."
231 (defgroup gnus-agent nil
232 "Offline support for Gnus."
235 (defgroup gnus-files nil
236 "Files used by Gnus."
239 (defgroup gnus-dribble-file nil
241 :link '(custom-manual "(gnus)Auto Save")
244 (defgroup gnus-newsrc nil
245 "Storing Gnus state."
248 (defgroup gnus-server nil
249 "Options related to newsservers and other servers used by Gnus."
252 (defgroup gnus-server-visual nil
253 "Highlighting and menus in the server buffer."
257 (defgroup gnus-message '((message custom-group))
258 "Composing replies and followups in Gnus."
261 (defgroup gnus-meta nil
262 "Meta variables controlling major portions of Gnus.
263 In general, modifying these variables does not take affect until Gnus
264 is restarted, and sometimes reloaded."
267 (defgroup gnus-various nil
268 "Other Gnus options."
269 :link '(custom-manual "(gnus)Various Various")
272 (defgroup gnus-mime nil
273 "Variables for controlling the Gnus MIME interface."
276 (defgroup gnus-exit nil
278 :link '(custom-manual "(gnus)Exiting Gnus")
281 (defgroup gnus-fun nil
282 "Frivolous Gnus extensions."
283 :link '(custom-manual "(gnus)Exiting Gnus")
286 (defcustom gnus-inhibit-startup-message nil
287 "If non-nil, the startup message will not be displayed.
288 This variable is used before `.gnus.el' is loaded, so it should
289 be set in `.emacs' instead."
293 (defcustom gnus-play-startup-jingle nil
294 "If non-nil, play the Gnus jingle at startup."
298 (unless (fboundp 'gnus-group-remove-excess-properties)
299 (defalias 'gnus-group-remove-excess-properties 'ignore))
301 (unless (fboundp 'gnus-set-text-properties)
302 (defalias 'gnus-set-text-properties 'set-text-properties))
304 (unless (featurep 'gnus-xmas)
305 (defalias 'gnus-make-overlay 'make-overlay)
306 (defalias 'gnus-delete-overlay 'delete-overlay)
307 (defalias 'gnus-overlay-put 'overlay-put)
308 (defalias 'gnus-move-overlay 'move-overlay)
309 (defalias 'gnus-overlay-buffer 'overlay-buffer)
310 (defalias 'gnus-overlay-start 'overlay-start)
311 (defalias 'gnus-overlay-end 'overlay-end)
312 (defalias 'gnus-extent-detached-p 'ignore)
313 (defalias 'gnus-extent-start-open 'ignore)
314 (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
315 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
316 (defalias 'gnus-character-to-event 'identity)
317 (defalias 'gnus-add-text-properties 'add-text-properties)
318 (defalias 'gnus-put-text-property 'put-text-property)
319 (defvar gnus-mode-line-image-cache t)
320 (if (fboundp 'find-image)
321 (defun gnus-mode-line-buffer-identification (line)
322 (let ((str (car-safe line)))
323 (if (and (stringp str)
324 (string-match "^Gnus:" str))
325 (progn (add-text-properties
328 (if (eq t gnus-mode-line-image-cache)
329 (setq gnus-mode-line-image-cache
331 '((:type xpm :file "gnus-pointer.xpm"
333 (:type xbm :file "gnus-pointer.xbm"
335 gnus-mode-line-image-cache)
336 'help-echo "This is Gnus")
340 (defalias 'gnus-mode-line-buffer-identification 'identity))
341 (defalias 'gnus-characterp 'numberp)
342 (defalias 'gnus-deactivate-mark 'deactivate-mark)
343 (defalias 'gnus-window-edges 'window-edges)
344 (defalias 'gnus-key-press-event-p 'numberp)
345 ;;(defalias 'gnus-decode-rfc1522 'ignore)
348 ;; We define these group faces here to avoid the display
349 ;; update forced when creating new faces.
351 (defface gnus-group-news-1-face
354 (:foreground "PaleTurquoise" :bold t))
357 (:foreground "ForestGreen" :bold t))
360 "Level 1 newsgroup face.")
362 (defface gnus-group-news-1-empty-face
365 (:foreground "PaleTurquoise"))
368 (:foreground "ForestGreen"))
371 "Level 1 empty newsgroup face.")
373 (defface gnus-group-news-2-face
376 (:foreground "turquoise" :bold t))
379 (:foreground "CadetBlue4" :bold t))
382 "Level 2 newsgroup face.")
384 (defface gnus-group-news-2-empty-face
387 (:foreground "turquoise"))
390 (:foreground "CadetBlue4"))
393 "Level 2 empty newsgroup face.")
395 (defface gnus-group-news-3-face
404 "Level 3 newsgroup face.")
406 (defface gnus-group-news-3-empty-face
415 "Level 3 empty newsgroup face.")
417 (defface gnus-group-news-4-face
426 "Level 4 newsgroup face.")
428 (defface gnus-group-news-4-empty-face
437 "Level 4 empty newsgroup face.")
439 (defface gnus-group-news-5-face
448 "Level 5 newsgroup face.")
450 (defface gnus-group-news-5-empty-face
459 "Level 5 empty newsgroup face.")
461 (defface gnus-group-news-6-face
470 "Level 6 newsgroup face.")
472 (defface gnus-group-news-6-empty-face
481 "Level 6 empty newsgroup face.")
483 (defface gnus-group-news-low-face
486 (:foreground "DarkTurquoise" :bold t))
489 (:foreground "DarkGreen" :bold t))
492 "Low level newsgroup face.")
494 (defface gnus-group-news-low-empty-face
497 (:foreground "DarkTurquoise"))
500 (:foreground "DarkGreen"))
503 "Low level empty newsgroup face.")
505 (defface gnus-group-mail-1-face
508 (:foreground "aquamarine1" :bold t))
511 (:foreground "DeepPink3" :bold t))
514 "Level 1 mailgroup face.")
516 (defface gnus-group-mail-1-empty-face
519 (:foreground "aquamarine1"))
522 (:foreground "DeepPink3"))
524 (:italic t :bold t)))
525 "Level 1 empty mailgroup face.")
527 (defface gnus-group-mail-2-face
530 (:foreground "aquamarine2" :bold t))
533 (:foreground "HotPink3" :bold t))
536 "Level 2 mailgroup face.")
538 (defface gnus-group-mail-2-empty-face
541 (:foreground "aquamarine2"))
544 (:foreground "HotPink3"))
547 "Level 2 empty mailgroup face.")
549 (defface gnus-group-mail-3-face
552 (:foreground "aquamarine3" :bold t))
555 (:foreground "magenta4" :bold t))
558 "Level 3 mailgroup face.")
560 (defface gnus-group-mail-3-empty-face
563 (:foreground "aquamarine3"))
566 (:foreground "magenta4"))
569 "Level 3 empty mailgroup face.")
571 (defface gnus-group-mail-low-face
574 (:foreground "aquamarine4" :bold t))
577 (:foreground "DeepPink4" :bold t))
580 "Low level mailgroup face.")
582 (defface gnus-group-mail-low-empty-face
585 (:foreground "aquamarine4"))
588 (:foreground "DeepPink4"))
591 "Low level empty mailgroup face.")
593 ;; Summary mode faces.
595 (defface gnus-summary-selected-face '((t
597 "Face used for selected articles.")
599 (defface gnus-summary-cancelled-face
601 (:foreground "yellow" :background "black")))
602 "Face used for cancelled articles.")
604 (defface gnus-summary-high-ticked-face
607 (:foreground "pink" :bold t))
610 (:foreground "firebrick" :bold t))
613 "Face used for high interest ticked articles.")
615 (defface gnus-summary-low-ticked-face
618 (:foreground "pink" :italic t))
621 (:foreground "firebrick" :italic t))
624 "Face used for low interest ticked articles.")
626 (defface gnus-summary-normal-ticked-face
629 (:foreground "pink"))
632 (:foreground "firebrick"))
635 "Face used for normal interest ticked articles.")
637 (defface gnus-summary-high-ancient-face
640 (:foreground "SkyBlue" :bold t))
643 (:foreground "RoyalBlue" :bold t))
646 "Face used for high interest ancient articles.")
648 (defface gnus-summary-low-ancient-face
651 (:foreground "SkyBlue" :italic t))
654 (:foreground "RoyalBlue" :italic t))
657 "Face used for low interest ancient articles.")
659 (defface gnus-summary-normal-ancient-face
662 (:foreground "SkyBlue"))
665 (:foreground "RoyalBlue"))
668 "Face used for normal interest ancient articles.")
670 (defface gnus-summary-high-undownloaded-face
673 (:bold t :foreground "cyan4" :bold nil))
674 (((class color) (background dark))
675 (:bold t :foreground "LightGray" :bold nil))
676 (t (:inverse-video t :bold t)))
677 "Face used for high interest uncached articles.")
679 (defface gnus-summary-low-undownloaded-face
682 (:italic t :foreground "cyan4" :bold nil))
683 (((class color) (background dark))
684 (:italic t :foreground "LightGray" :bold nil))
685 (t (:inverse-video t :italic t)))
686 "Face used for low interest uncached articles.")
688 (defface gnus-summary-normal-undownloaded-face
691 (:foreground "cyan4" :bold nil))
692 (((class color) (background dark))
693 (:foreground "LightGray" :bold nil))
694 (t (:inverse-video t)))
695 "Face used for normal interest uncached articles.")
697 (defface gnus-summary-high-unread-face
700 "Face used for high interest unread articles.")
702 (defface gnus-summary-low-unread-face
705 "Face used for low interest unread articles.")
707 (defface gnus-summary-normal-unread-face
710 "Face used for normal interest unread articles.")
712 (defface gnus-summary-incorporated-face
715 "Face used for incorporated articles.")
717 (defface gnus-summary-high-read-face
720 (:foreground "PaleGreen"
724 (:foreground "DarkGreen"
728 "Face used for high interest read articles.")
730 (defface gnus-summary-low-read-face
733 (:foreground "PaleGreen"
737 (:foreground "DarkGreen"
741 "Face used for low interest read articles.")
743 (defface gnus-summary-normal-read-face
746 (:foreground "PaleGreen"))
749 (:foreground "DarkGreen"))
752 "Face used for normal interest read articles.")
759 (defvar gnus-buffers nil)
761 (defun gnus-get-buffer-create (name)
762 "Do the same as `get-buffer-create', but store the created buffer."
763 (or (get-buffer name)
764 (car (push (get-buffer-create name) gnus-buffers))))
766 (defun gnus-add-buffer ()
767 "Add the current buffer to the list of Gnus buffers."
768 (push (current-buffer) gnus-buffers))
770 (defun gnus-buffers ()
771 "Return a list of live Gnus buffers."
772 (while (and gnus-buffers
773 (not (buffer-name (car gnus-buffers))))
775 (let ((buffers gnus-buffers))
777 (if (buffer-name (cadr buffers))
779 (setcdr buffers (cddr buffers)))))
784 (defvar gnus-group-buffer "*Group*")
787 (autoload 'gnus-play-jingle "gnus-audio"))
789 (defface gnus-splash-face
792 (:foreground "#888888"))
795 (:foreground "#888888"))
798 "Face for the splash screen.")
800 (defun gnus-splash ()
802 (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer))
803 (let ((buffer-read-only nil))
805 (unless gnus-inhibit-startup-message
806 (gnus-group-startup-message)
808 (when gnus-play-startup-jingle
809 (gnus-play-jingle))))))
811 (defun gnus-indent-rigidly (start end arg)
812 "Indent rigidly using only spaces and no tabs."
815 (narrow-to-region start end)
817 (indent-rigidly start end arg)
818 ;; We translate tabs into spaces -- not everybody uses
819 ;; an 8-character tab.
820 (goto-char (point-min))
821 (while (search-forward "\t" nil t)
822 (replace-match " " t t))))))
824 (defvar gnus-simple-splash nil)
826 ;;(format "%02x%02x%02x" 114 66 20) "724214"
828 (defvar gnus-logo-color-alist
829 '((flame "#cc3300" "#ff2200")
830 (pine "#c0cc93" "#f8ffb8")
831 (moss "#a1cc93" "#d2ffb8")
832 (irish "#04cc90" "#05ff97")
833 (sky "#049acc" "#05deff")
834 (tin "#6886cc" "#82b6ff")
835 (velvet "#7c68cc" "#8c82ff")
836 (grape "#b264cc" "#cf7df")
837 (labia "#cc64c2" "#fd7dff")
838 (berry "#cc6485" "#ff7db5")
839 (dino "#724214" "#1e3f03")
840 (oort "#cccccc" "#888888")
841 (storm "#666699" "#99ccff")
842 (pdino "#9999cc" "#99ccff")
843 (purp "#9999cc" "#666699")
844 (neutral "#b4b4b4" "#878787")
845 (september "#bf9900" "#ffcc00"))
846 "Color alist used for the Gnus logo.")
848 (defcustom gnus-logo-color-style 'oort
849 "*Color styles used for the Gnus logo."
850 :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
851 gnus-logo-color-alist))
854 (defvar gnus-logo-colors
855 (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
856 "Colors used for the Gnus logo.")
858 (defun gnus-group-startup-message (&optional x y)
859 "Insert startup message in current buffer."
860 ;; Insert the message.
863 ((and (fboundp 'find-image)
865 (let* ((bg (face-background 'default))
866 (fg (face-foreground 'gnus-splash-face))
867 (data-directory (nnheader-find-etc-directory "gnus"))
869 `((:type xpm :file "gnus.xpm"
871 (("thing" . ,(car gnus-logo-colors))
872 ("shadow" . ,(cadr gnus-logo-colors))
874 ("background" . ,bg)))
875 (:type pbm :file "gnus.pbm"
876 ;; Account for the pbm's blackground.
877 :background ,bg :foreground ,fg)
878 (:type xbm :file "gnus.xbm"
879 ;; Account for the xbm's blackground.
880 :background ,bg :foreground ,fg)))))
884 (concat gnus-product-name " " gnus-version-number
885 (if (zerop (string-to-number gnus-revision-number))
887 (concat " (r" gnus-revision-number ")"))
888 " based on " gnus-original-product-name " v"
889 gnus-original-version-number)
890 'face `(variable-pitch :background ,bg :foreground ,fg)))
891 (let ((fill-column (window-width)))
892 (center-region (point-min) (point)))
893 (let ((size (image-size image)))
894 (insert-char ?\n (max 1 (round (- (window-height)
895 (or y (cdr size))) 2)))
897 (propertize " " 'display
899 ,(max 0 (round (- (window-width)
900 (or x (car size))) 2)))))
901 (insert-image image))
902 (setq gnus-simple-splash nil)
907 _ ___ __ ___ __ _ ___
926 (goto-char (point-min))
927 (insert gnus-product-name " " gnus-version-number
928 (if (zerop (string-to-number gnus-revision-number))
930 (concat " (r" gnus-revision-number ")"))
931 " based on " gnus-original-product-name " v"
932 gnus-original-version-number)
933 (insert-char ?\ (prog1
934 (max 0 (/ (- (window-width) (point)) 2))
935 (goto-char (point-min))))
938 (gnus-indent-rigidly (point) (point-max)
939 (/ (max (- (window-width) (or x 46)) 0) 2))
940 (goto-char (point-min))
942 (let* ((pheight (count-lines (point-min) (point-max)))
943 (wheight (window-height))
944 (rest (- wheight pheight)))
945 (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n)))
947 (put-text-property (point-min) (point-max) 'face 'gnus-splash-face)
948 (setq gnus-simple-splash t)))
949 (goto-char (point-min))
950 (setq mode-line-buffer-identification (concat " " gnus-version))
951 (set-buffer-modified-p t))
954 (let ((command (format "%s" this-command)))
955 (if (and (string-match "gnus" command)
956 (not (string-match "gnus-other-frame" command)))
958 (gnus-get-buffer-create gnus-group-buffer))))
965 (defcustom gnus-parameters nil
966 "Alist of group parameters.
969 ((\"mail\\\\..*\" (gnus-show-threads nil)
970 (gnus-use-scoring nil)
971 (gnus-summary-line-format
972 \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
975 (\"mail\\\\.me\" (gnus-use-scoring t))
976 (\"list\\\\..*\" (total-expire . t)
977 (broken-reply-to . t)))"
978 :group 'gnus-group-various
979 :type '(repeat (cons regexp
982 (defvar gnus-group-parameters-more nil)
984 (defvar gnus-colon-keywords
986 (when (boundp 'dgnushack-colon-keywords)
987 (symbol-value 'dgnushack-colon-keywords)))
988 "List of the colon keywords should be bound at run-time. This variable
989 defaults to a proper value only if this file is byte-compiled by make.")
991 (dolist (keyword gnus-colon-keywords)
992 (set keyword keyword))
994 (defmacro gnus-define-group-parameter (param &rest rest)
995 "Define a group parameter PARAM.
996 REST is a plist of following:
997 :type One of `bool', `list' or `nil'.
998 :function The name of the function.
999 :function-document The documentation of the function.
1000 :parameter-type The type for customizing the parameter.
1001 :parameter-document The documentation for the parameter.
1002 :variable The name of the variable.
1003 :variable-document The documentation for the variable.
1004 :variable-group The group for customizing the variable.
1005 :variable-type The type for customizing the variable.
1006 :variable-default The default value of the variable."
1007 (let* ((type (plist-get rest :type))
1008 (parameter-type (plist-get rest :parameter-type))
1009 (parameter-document (plist-get rest :parameter-document))
1010 (function (or (plist-get rest :function)
1011 (intern (format "gnus-parameter-%s" param))))
1012 (function-document (or (plist-get rest :function-document) ""))
1013 (variable (or (plist-get rest :variable)
1014 (intern (format "gnus-parameter-%s-alist" param))))
1015 (variable-document (or (plist-get rest :variable-document) ""))
1016 (variable-group (plist-get rest :variable-group))
1017 (variable-type (or (plist-get rest :variable-type)
1019 (list (regexp :tag "Group")
1020 ,(car (cdr parameter-type)))))))
1021 (variable-default (plist-get rest :variable-default)))
1024 `(defcustom ,variable ,variable-default
1026 :group 'gnus-group-parameter
1027 :group ',variable-group
1028 :type ,variable-type)
1029 `(setq gnus-group-parameters-more
1030 (delq (assq ',param gnus-group-parameters-more)
1031 gnus-group-parameters-more))
1032 `(add-to-list 'gnus-group-parameters-more
1035 ,parameter-document))
1037 `(defun ,function (name)
1039 (let ((params (gnus-group-find-parameter name))
1042 ((memq ',param params)
1044 ((setq val (assq ',param params))
1046 ((stringp ,variable)
1047 (string-match ,variable name))
1049 (let ((alist ,variable)
1051 (while (setq elem (pop alist))
1053 (string-match (car elem) name))
1056 (if (consp value) (car value) value))))))
1057 `(defun ,function (name)
1060 (or (gnus-group-find-parameter name ',param ,(and type t))
1061 (let ((alist ,variable)
1063 (while (setq elem (pop alist))
1065 (string-match (car elem) name))
1070 '(if (consp value) (car value) value))))))))))
1072 (defcustom gnus-home-directory "~/"
1073 "Directory variable that specifies the \"home\" directory.
1074 All other Gnus path variables are initialized from this variable."
1078 (defcustom gnus-directory (or (getenv "SAVEDIR")
1079 (nnheader-concat gnus-home-directory "News/"))
1080 "*Directory variable from which all other Gnus file variables are derived.
1082 Note that Gnus is mostly loaded when the `.gnus.el' file is read.
1083 This means that other directory variables that are initialized from
1084 this variable won't be set properly if you set this variable in `.gnus.el'.
1085 Set this variable in `.emacs' instead."
1089 (defcustom gnus-default-directory nil
1090 "*Default directory for all Gnus buffers."
1092 :type '(choice (const :tag "current" nil)
1095 ;; Site dependent variables. These variables should be defined in
1098 (defvar gnus-default-nntp-server nil
1099 "Specify a default NNTP server.
1100 This variable should be defined in paths.el, and should never be set
1102 If you want to change servers, you should use `gnus-select-method'.
1103 See the documentation to that variable.")
1105 ;; Don't touch this variable.
1106 (defvar gnus-nntp-service "nntp"
1107 "NNTP service name (\"nntp\" or 119).
1108 This is an obsolete variable, which is scarcely used. If you use an
1109 nntp server for your newsgroup and want to change the port number
1110 used to 899, you would say something along these lines:
1112 (setq gnus-select-method '(nntp \"my.nntp.server\" (nntp-port-number 899)))")
1114 (defcustom gnus-nntpserver-file "/etc/nntpserver"
1115 "A file with only the name of the nntp server in it."
1120 ;; This function is used to check both the environment variable
1121 ;; NNTPSERVER and the /etc/nntpserver file to see whether one can find
1122 ;; an nntp server name default.
1123 (defun gnus-getenv-nntpserver ()
1124 (or (getenv "NNTPSERVER")
1125 (and (file-readable-p gnus-nntpserver-file)
1127 (set-buffer (gnus-get-buffer-create " *gnus nntp*"))
1128 (insert-file-contents gnus-nntpserver-file)
1129 (let ((name (buffer-string)))
1131 (if (string-match "\\'[ \t\n]*$" name)
1134 (kill-buffer (current-buffer))))))))
1136 (defcustom gnus-select-method
1139 (list 'nntp (or (condition-case nil
1140 (gnus-getenv-nntpserver)
1142 (when (and gnus-default-nntp-server
1143 (not (string= gnus-default-nntp-server "")))
1144 gnus-default-nntp-server)
1146 (if (or (null gnus-nntp-service)
1147 (equal gnus-nntp-service "nntp"))
1149 (list gnus-nntp-service)))
1151 "Default method for selecting a newsgroup.
1152 This variable should be a list, where the first element is how the
1153 news is to be fetched, the second is the address.
1155 For instance, if you want to get your news via \"flab.flab.edu\" using
1156 NNTP, you could say:
1158 \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
1160 If you want to use your local spool, say:
1162 \(setq gnus-select-method (list 'nnspool (system-name)))
1164 If you use this variable, you must set `gnus-nntp-server' to nil.
1166 There is a lot more to know about select methods and virtual servers -
1167 see the manual for details."
1169 :type 'gnus-select-method)
1171 (defcustom gnus-message-archive-method "archive"
1172 "*Method used for archiving messages you've sent.
1173 This should be a mail method."
1175 :group 'gnus-message
1176 :type 'gnus-select-method)
1178 (defcustom gnus-message-archive-group nil
1179 "*Name of the group in which to save the messages you've written.
1180 This can either be a string; a list of strings; or an alist
1181 of regexps/functions/forms to be evaluated to return a string (or a list
1182 of strings). The functions are called with the name of the current
1183 group (or nil) as a parameter.
1185 If you want to save your mail in one group and the news articles you
1186 write in another group, you could say something like:
1188 \(setq gnus-message-archive-group
1189 '((if (message-news-p)
1193 Normally the group names returned by this variable should be
1194 unprefixed -- which implicitly means \"store on the archive server\".
1195 However, you may wish to store the message on some other server. In
1196 that case, just return a fully prefixed name of the group --
1197 \"nnml+private:mail.misc\", for instance."
1198 :group 'gnus-message
1199 :type '(choice (const :tag "none" nil)
1204 (defcustom gnus-secondary-servers nil
1205 "List of NNTP servers that the user can choose between interactively.
1206 To make Gnus query you for a server, you have to give `gnus' a
1207 non-numeric prefix - `C-u M-x gnus', in short."
1209 :type '(repeat string))
1211 (defcustom gnus-nntp-server nil
1212 "*The name of the host running the NNTP server.
1213 This variable is semi-obsolete. Use the `gnus-select-method'
1216 :type '(choice (const :tag "disable" nil)
1219 (defcustom gnus-secondary-select-methods nil
1220 "A list of secondary methods that will be used for reading news.
1221 This is a list where each element is a complete select method (see
1222 `gnus-select-method').
1224 If, for instance, you want to read your mail with the nnml back end,
1225 you could set this variable:
1227 \(setq gnus-secondary-select-methods '((nnml \"\")))"
1229 :type '(repeat gnus-select-method))
1231 (defvar gnus-backup-default-subscribed-newsgroups
1232 '("news.announce.newusers" "news.groups.questions" "gnu.emacs.gnus")
1233 "Default default new newsgroups the first time Gnus is run.
1234 Should be set in paths.el, and shouldn't be touched by the user.")
1236 (defcustom gnus-local-domain nil
1237 "Local domain name without a host name.
1238 The DOMAINNAME environment variable is used instead if it is defined.
1239 If the function `system-name' returns the full Internet name, there is
1240 no need to set this variable."
1241 :group 'gnus-message
1242 :type '(choice (const :tag "default" nil)
1245 (defvar gnus-local-organization nil
1246 "String with a description of what organization (if any) the user belongs to.
1247 Obsolete variable; use `message-user-organization' instead.")
1249 ;; Customization variables
1251 (defcustom gnus-refer-article-method nil
1252 "Preferred method for fetching an article by Message-ID.
1253 If you are reading news from the local spool (with nnspool), fetching
1254 articles by Message-ID is painfully slow. By setting this method to an
1255 nntp method, you might get acceptable results.
1257 The value of this variable must be a valid select method as discussed
1258 in the documentation of `gnus-select-method'.
1260 It can also be a list of select methods, as well as the special symbol
1261 `current', which means to use the current select method. If it is a
1262 list, Gnus will try all the methods in the list until it finds a match."
1264 :type '(choice (const :tag "default" nil)
1265 (const :tag "Google" (nnweb "refer" (nnweb-type google)))
1267 (repeat :menu-tag "Try multiple"
1269 :value (current (nnweb "refer" (nnweb-type google)))
1270 (choice :tag "Method"
1272 (const :tag "Google"
1273 (nnweb "refer" (nnweb-type google)))
1274 gnus-select-method))))
1276 (defcustom gnus-group-faq-directory
1277 '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
1278 "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
1279 "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
1280 "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
1281 "/ftp@ftp.pasteur.fr:/pub/FAQ/"
1282 "/ftp@rtfm.mit.edu:/pub/usenet/"
1283 "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
1284 "/ftp@ftp.sunet.se:/pub/usenet/"
1285 "/ftp@nctuccca.edu.tw:/USENET/FAQ/"
1286 "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
1287 "/ftp@ftp.hk.super.net:/mirror/faqs/")
1288 "*Directory where the group FAQs are stored.
1289 This will most commonly be on a remote machine, and the file will be
1290 fetched by ange-ftp.
1292 This variable can also be a list of directories. In that case, the
1293 first element in the list will be used by default. The others can
1294 be used when being prompted for a site.
1296 Note that Gnus uses an aol machine as the default directory. If this
1297 feels fundamentally unclean, just think of it as a way to finally get
1298 something of value back from them.
1300 If the default site is too slow, try one of these:
1302 North America: mirrors.aol.com /pub/rtfm/usenet
1303 ftp.seas.gwu.edu /pub/rtfm
1304 rtfm.mit.edu /pub/usenet
1305 Europe: ftp.uni-paderborn.de /pub/FAQ
1306 src.doc.ic.ac.uk /usenet/news-FAQS
1307 ftp.sunet.se /pub/usenet
1308 ftp.pasteur.fr /pub/FAQ
1309 Asia: nctuccca.edu.tw /USENET/FAQ
1310 hwarang.postech.ac.kr /pub/usenet
1311 ftp.hk.super.net /mirror/faqs"
1312 :group 'gnus-group-various
1313 :type '(choice directory
1314 (repeat directory)))
1316 (defcustom gnus-group-charter-alist
1317 '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt"))
1318 ("de" . (concat "http://purl.net/charta/" name ".html"))
1319 ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
1320 ("england" . (concat "http://england.news-admin.org/charters/" name))
1321 ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
1322 ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
1323 (gnus-replace-in-string name "europa\\." "") ".html"))
1324 ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
1325 ("aus" . (concat "http://aus.news-admin.org/groupinfo.php/" name))
1326 ("pl" . (concat "http://www.usenet.pl/opisy/" name))
1327 ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
1328 ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
1329 ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
1330 ("wales" . (concat "http://www.wales-usenet.org/english/groups/" name ".html"))
1331 ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
1332 ("se" . (concat "http://www.usenet-se.net/Reglementen/"
1333 (gnus-replace-in-string name "\\." "_") ".html"))
1334 ("milw" . (concat "http://usenet.mil.wi.us/"
1335 (gnus-replace-in-string name "milw\\." "") "-charter"))
1336 ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
1337 ("netins" . (concat "http://www.netins.net/usenet/charter/"
1338 (gnus-replace-in-string name "\\." "-") "-charter.html")))
1339 "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
1340 When FORM is evaluated `name' is bound to the name of the group."
1341 :group 'gnus-group-various
1342 :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
1344 (defcustom gnus-group-fetch-control-use-browse-url nil
1345 "*Non-nil means that control messages are displayed using `browse-url'.
1346 Otherwise they are fetched with ange-ftp and displayed in an ephemeral
1348 :group 'gnus-group-various
1351 (defcustom gnus-use-cross-reference t
1352 "*Non-nil means that cross referenced articles will be marked as read.
1353 If nil, ignore cross references. If t, mark articles as read in
1354 subscribed newsgroups. If neither t nor nil, mark as read in all
1357 :type '(choice (const :tag "off" nil)
1358 (const :tag "subscribed" t)
1362 (defcustom gnus-process-mark ?#
1364 :group 'gnus-group-visual
1365 :group 'gnus-summary-marks
1368 (defcustom gnus-large-newsgroup 200
1369 "*The number of articles which indicates a large newsgroup.
1370 If the number of articles in a newsgroup is greater than this value,
1371 confirmation is required for selecting the newsgroup.
1372 If it is `nil', no confirmation is required."
1373 :group 'gnus-group-select
1374 :type '(choice (const :tag "No limit" nil)
1377 (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
1378 "*Non-nil means that the default name of a file to save articles in is the group name.
1379 If it's nil, the directory form of the group name is used instead.
1381 If this variable is a list, and the list contains the element
1382 `not-score', long file names will not be used for score files; if it
1383 contains the element `not-save', long file names will not be used for
1384 saving; and if it contains the element `not-kill', long file names
1385 will not be used for kill files.
1387 Note that the default for this variable varies according to what system
1388 type you're using. On `usg-unix-v' and `xenix' this variable defaults
1389 to nil while on all other systems it defaults to t."
1393 (defcustom gnus-kill-files-directory gnus-directory
1394 "*Name of the directory where kill files will be stored (default \"~/News\")."
1395 :group 'gnus-score-files
1396 :group 'gnus-score-kill
1399 (defcustom gnus-save-score nil
1400 "*If non-nil, save group scoring info."
1401 :group 'gnus-score-various
1405 (defcustom gnus-use-undo t
1406 "*If non-nil, allow undoing in Gnus group mode buffers."
1410 (defcustom gnus-use-adaptive-scoring nil
1411 "*If non-nil, use some adaptive scoring scheme.
1412 If a list, then the values `word' and `line' are meaningful. The
1413 former will perform adaption on individual words in the subject
1414 header while `line' will perform adaption on several headers."
1416 :group 'gnus-score-adapt
1417 :type '(set (const word) (const line)))
1419 (defcustom gnus-use-cache 'passive
1420 "*If nil, Gnus will ignore the article cache.
1421 If `passive', it will allow entering (and reading) articles
1422 explicitly entered into the cache. If anything else, use the
1423 cache to the full extent of the law."
1426 :type '(choice (const :tag "off" nil)
1427 (const :tag "passive" passive)
1428 (const :tag "active" t)))
1430 (defcustom gnus-use-trees nil
1431 "*If non-nil, display a thread tree buffer."
1435 (defcustom gnus-use-grouplens nil
1436 "*If non-nil, use GroupLens ratings."
1440 (defcustom gnus-keep-backlog 20
1441 "*If non-nil, Gnus will keep read articles for later re-retrieval.
1442 If it is a number N, then Gnus will only keep the last N articles
1443 read. If it is neither nil nor a number, Gnus will keep all read
1444 articles. This is not a good idea."
1446 :type '(choice (const :tag "off" nil)
1451 (defcustom gnus-use-nocem nil
1452 "*If non-nil, Gnus will read NoCeM cancel messages."
1456 (defcustom gnus-suppress-duplicates nil
1457 "*If non-nil, Gnus will mark duplicate copies of the same article as read."
1461 (defcustom gnus-use-scoring t
1462 "*If non-nil, enable scoring."
1466 (defcustom gnus-summary-prepare-exit-hook
1467 '(gnus-summary-expire-articles)
1468 "*A hook called when preparing to exit from the summary buffer.
1469 It calls `gnus-summary-expire-articles' by default."
1470 :group 'gnus-summary-exit
1473 (defcustom gnus-novice-user t
1474 "*Non-nil means that you are a usenet novice.
1475 If non-nil, verbose messages may be displayed and confirmations may be
1480 (defcustom gnus-expert-user nil
1481 "*Non-nil means that you will never be asked for confirmation about anything.
1482 That doesn't mean *anything* anything; particularly destructive
1483 commands will still require prompting."
1487 (defcustom gnus-interactive-catchup t
1488 "*If non-nil, require your confirmation when catching up a group."
1489 :group 'gnus-group-select
1492 (defcustom gnus-interactive-exit t
1493 "*If non-nil, require your confirmation when exiting Gnus."
1497 (defcustom gnus-extract-address-components 'gnus-extract-address-components
1498 "Function for extracting address components from a From header.
1499 Three pre-defined functions exist: `gnus-extract-address-components',
1500 which is the default, quite fast, and too simplistic solution,
1501 `mail-extract-address-components', which works much better, but is
1502 slower, and `std11-extract-address-components'."
1503 :group 'gnus-summary-format
1504 :type '(radio (function-item gnus-extract-address-components)
1505 (function-item mail-extract-address-components)
1506 (function-item std11-extract-address-components)
1507 (function :tag "Other")))
1509 (defcustom gnus-carpal nil
1510 "*If non-nil, display clickable icons."
1514 (defcustom gnus-shell-command-separator ";"
1515 "String used to separate to shell commands."
1519 (defcustom gnus-valid-select-methods
1520 '(("nntp" post address prompt-address physical-address)
1521 ("nnspool" post address)
1522 ("nnvirtual" post-mail virtual prompt-address)
1523 ("nnmbox" mail respool address)
1524 ("nnml" post-mail respool address)
1525 ("nnmh" mail respool address)
1526 ("nndir" post-mail prompt-address physical-address)
1527 ("nneething" none address prompt-address physical-address)
1528 ("nndoc" none address prompt-address)
1529 ("nnbabyl" mail address respool)
1530 ("nnkiboze" post virtual)
1531 ("nnsoup" post-mail address)
1532 ("nndraft" post-mail)
1533 ("nnfolder" mail respool address)
1534 ("nngateway" post-mail address prompt-address physical-address)
1543 ("nnagent" post-mail)
1544 ("nnimap" post-mail address prompt-address physical-address)
1545 ("nnmaildir" mail respool address)
1547 "*An alist of valid select methods.
1548 The first element of each list lists should be a string with the name
1549 of the select method. The other elements may be the category of
1550 this method (i. e., `post', `mail', `none' or whatever) or other
1551 properties that this method has (like being respoolable).
1552 If you implement a new select method, all you should have to change is
1553 this variable. I think."
1555 :type '(repeat (group (string :tag "Name")
1556 (radio-button-choice (const :format "%v " post)
1557 (const :format "%v " mail)
1558 (const :format "%v " none)
1560 (checklist :inline t
1561 (const :format "%v " address)
1562 (const :format "%v " prompt-address)
1563 (const :format "%v " physical-address)
1564 (const :format "%v " virtual)
1567 (defun gnus-redefine-select-method-widget ()
1568 "Recomputes the select-method widget based on the value of
1569 `gnus-valid-select-methods'."
1570 (define-widget 'gnus-select-method 'list
1571 "Widget for entering a select method."
1573 :tag "Select Method"
1574 :args `((choice :tag "Method"
1575 ,@(mapcar (lambda (entry)
1576 (list 'const :format "%v\n"
1577 (intern (car entry))))
1578 gnus-valid-select-methods)
1579 (symbol :tag "other"))
1580 (string :tag "Address")
1581 (repeat :tag "Options"
1585 (sexp :tag "Value"))))))
1587 (gnus-redefine-select-method-widget)
1589 (defcustom gnus-updated-mode-lines '(group article summary tree)
1590 "List of buffers that should update their mode lines.
1591 The list may contain the symbols `group', `article', `tree' and
1592 `summary'. If the corresponding symbol is present, Gnus will keep
1593 that mode line updated with information that may be pertinent.
1594 If this variable is nil, screen refresh may be quicker."
1595 :group 'gnus-various
1596 :type '(set (const group)
1601 ;; Added by Keinonen Kari <kk85613@cs.tut.fi>.
1602 (defcustom gnus-mode-non-string-length nil
1603 "*Max length of mode-line non-string contents.
1604 If this is nil, Gnus will take space as is needed, leaving the rest
1605 of the modeline intact. Note that the default of nil is unlikely
1606 to be desirable; see the manual for further details."
1607 :group 'gnus-various
1608 :type '(choice (const nil)
1611 ;; There should be special validation for this.
1612 (define-widget 'gnus-email-address 'string
1615 (gnus-define-group-parameter
1618 "Return GROUP's to-address."
1620 "*Alist of group regexps and correspondent to-addresses."
1621 :parameter-type '(gnus-email-address :tag "To Address")
1622 :parameter-document "\
1623 This will be used when doing followups and posts.
1625 This is primarily useful in mail groups that represent closed
1626 mailing lists--mailing lists where it's expected that everybody that
1627 writes to the mailing list is subscribed to it. Since using this
1628 parameter ensures that the mail only goes to the mailing list itself,
1629 it means that members won't receive two copies of your followups.
1631 Using `to-address' will actually work whether the group is foreign or
1632 not. Let's say there's a group on the server that is called
1633 `fa.4ad-l'. This is a real newsgroup, but the server has gotten the
1634 articles from a mail-to-news gateway. Posting directly to this group
1635 is therefore impossible--you have to send mail to the mailing list
1638 The gnus-group-split mail splitting mechanism will behave as if this
1639 address was listed in gnus-group-split Addresses (see below).")
1641 (gnus-define-group-parameter
1644 "Return GROUP's to-list."
1646 "*Alist of group regexps and correspondent to-lists."
1647 :parameter-type '(gnus-email-address :tag "To List")
1648 :parameter-document "\
1649 This address will be used when doing a `a' in the group.
1651 It is totally ignored when doing a followup--except that if it is
1652 present in a news group, you'll get mail group semantics when doing
1655 The gnus-group-split mail splitting mechanism will behave as if this
1656 address was listed in gnus-group-split Addresses (see below).")
1658 (gnus-define-group-parameter
1662 "Return GROUP's subscription status."
1664 "*Groups which are automatically considered subscribed."
1665 :parameter-type '(const :tag "Subscribed" t)
1666 :parameter-document "\
1667 Gnus assumed that you are subscribed to the To/List address.
1669 When constructing a list of subscribed groups using
1670 `gnus-find-subscribed-addresses', Gnus includes the To address given
1671 above, or the list address (if the To address has not been set).")
1673 (gnus-define-group-parameter
1676 :function gnus-group-auto-expirable-p
1678 "Check whether GROUP is auto-expirable or not."
1679 :variable gnus-auto-expirable-newsgroups
1680 :variable-default nil
1682 "*Groups in which to automatically mark read articles as expirable.
1683 If non-nil, this should be a regexp that should match all groups in
1684 which to perform auto-expiry. This only makes sense for mail groups."
1685 :variable-group nnmail-expire
1686 :variable-type '(choice (const nil)
1688 :parameter-type '(const :tag "Automatic Expire" t)
1690 "All articles that are read will be marked as expirable.")
1692 (gnus-define-group-parameter
1695 :function gnus-group-total-expirable-p
1697 "Check whether GROUP is total-expirable or not."
1698 :variable gnus-total-expirable-newsgroups
1699 :variable-default nil
1701 "*Groups in which to perform expiry of all read articles.
1702 Use with extreme caution. All groups that match this regexp will be
1703 expiring - which means that all read articles will be deleted after
1704 \(say) one week. (This only goes for mail groups and the like, of
1706 :variable-group nnmail-expire
1707 :variable-type '(choice (const nil)
1709 :parameter-type '(const :tag "Total Expire" t)
1711 "All read articles will be put through the expiry process
1713 This happens even if they are not marked as expirable.
1716 (gnus-define-group-parameter
1719 "Return the default charset of GROUP."
1720 :variable gnus-group-charset-alist
1722 '(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
1723 ("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
1724 ("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
1725 ("\\(^\\|:\\)tnn\\>\\|\\(^\\|:\\)pin\\>\\|\\(^\\|:\\)sci.lang.japan" iso-2022-7bit)
1726 ("\\(^\\|:\\)relcom\\>" koi8-r)
1727 ("\\(^\\|:\\)fido7\\>" koi8-r)
1728 ("\\(^\\|:\\)\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2)
1729 ("\\(^\\|:\\)israel\\>" iso-8859-1)
1730 ("\\(^\\|:\\)han\\>" euc-kr)
1731 ("\\(^\\|:\\)alt.chinese.text.big5\\>" chinese-big5)
1732 ("\\(^\\|:\\)soc.culture.vietnamese\\>" vietnamese-viqr)
1733 ("\\(^\\|:\\)\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1))
1735 "Alist of regexps (to match group names) and default charsets to be used when reading."
1736 :variable-group gnus-charset
1737 :variable-type '(repeat (list (regexp :tag "Group")
1738 (symbol :tag "Charset")))
1739 :parameter-type '(symbol :tag "Charset")
1740 :parameter-document "\
1741 The default charset to use in the group.")
1743 (gnus-define-group-parameter
1747 "Return a posting method for GROUP."
1748 :variable gnus-post-method-alist
1750 "Alist of regexps (to match group names) and method to be used when
1751 posting an article."
1752 :variable-group gnus-group-foreign
1754 '(choice :tag "Posting Method"
1755 (const :tag "Use native server" native)
1756 (const :tag "Use current server" current)
1757 (list :convert-widget
1759 (list 'sexp :tag "Methods"
1760 :value gnus-select-method))))
1762 "Posting method for this group.")
1764 (gnus-define-group-parameter
1765 large-newsgroup-initial
1768 "Return GROUP's initial input of the number of articles."
1770 "*Alist of group regexps and its initial input of the number of articles."
1771 :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
1772 (const :tag "All" nil)
1774 :parameter-document "\
1776 This number will be prompted as the initial value of the number of
1777 articles to list when the group is a large newsgroup (see
1778 `gnus-large-newsgroup'). If it is `nil', the default value is the
1779 total number of articles in the group.")
1781 ;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
1782 (defvar gnus-group-spam-classification-spam t
1783 "Spam group classification (requires spam.el).
1784 This group contains spam messages. On summary entry, unread messages
1785 will be marked as spam. On summary exit, the specified spam
1786 processors will be invoked on spam-marked messages, then those
1787 messages will be expired, so the spam processor will only see a
1788 spam-marked message once.")
1790 (defvar gnus-group-spam-classification-ham 'ask
1791 "The ham value for the spam group parameter (requires spam.el).
1792 On summary exit, the specified ham processors will be invoked on
1793 ham-marked messages. Exercise caution, since the ham processor will
1794 see the same message more than once because there is no ham message
1797 (gnus-define-group-parameter
1801 "The spam type (spam, ham, or neither) of the group."
1802 :variable gnus-spam-newsgroup-contents
1803 :variable-default nil
1805 "*Groups in which to automatically mark new articles as spam on
1806 summary entry. If non-nil, this should be a list of group name
1807 regexps that should match all groups in which to do automatic spam
1808 tagging, associated with a classification (spam, ham, or neither).
1809 This only makes sense for mail groups."
1810 :variable-group spam
1811 :variable-type '(repeat
1812 (list :tag "Group contents spam/ham classification"
1813 (regexp :tag "Group")
1815 (variable-item gnus-group-spam-classification-spam)
1816 (variable-item gnus-group-spam-classification-ham)
1817 (other :tag "Unclassified" nil))))
1819 :parameter-type '(list :tag "Group contents spam/ham classification"
1820 (choice :tag "Group contents classification for spam sorting"
1821 (variable-item gnus-group-spam-classification-spam)
1822 (variable-item gnus-group-spam-classification-ham)
1823 (other :tag "Unclassified" nil)))
1825 "The spam classification (spam, ham, or neither) of this group.
1826 When a spam group is entered, all unread articles are marked as spam.")
1828 (defvar gnus-group-spam-exit-processor-ifile "ifile"
1829 "The ifile summary exit spam processor.
1830 Only applicable to spam groups.")
1832 (defvar gnus-group-spam-exit-processor-stat "stat"
1833 "The spam-stat summary exit spam processor.
1834 Only applicable to spam groups.")
1836 (defvar gnus-group-spam-exit-processor-bogofilter "bogofilter"
1837 "The Bogofilter summary exit spam processor.
1838 Only applicable to spam groups.")
1840 (defvar gnus-group-spam-exit-processor-blacklist "blacklist"
1841 "The Blacklist summary exit spam processor.
1842 Only applicable to spam groups.")
1844 (defvar gnus-group-ham-exit-processor-ifile "ifile-ham"
1845 "The ifile summary exit ham processor.
1846 Only applicable to non-spam (unclassified and ham) groups.")
1848 (defvar gnus-group-ham-exit-processor-stat "stat-ham"
1849 "The spam-stat summary exit ham processor.
1850 Only applicable to non-spam (unclassified and ham) groups.")
1852 (defvar gnus-group-ham-exit-processor-whitelist "whitelist"
1853 "The whitelist summary exit ham processor.
1854 Only applicable to non-spam (unclassified and ham) groups.")
1856 (defvar gnus-group-ham-exit-processor-BBDB "bbdb"
1857 "The BBDB summary exit ham processor.
1858 Only applicable to non-spam (unclassified and ham) groups.")
1860 (gnus-define-group-parameter
1863 :parameter-type '(choice :tag "Spam Summary Exit Processor"
1865 (list :tag "Spam Summary Exit Processor Choices"
1867 (variable-item gnus-group-spam-exit-processor-ifile)
1868 (variable-item gnus-group-spam-exit-processor-stat)
1869 (variable-item gnus-group-spam-exit-processor-bogofilter)
1870 (variable-item gnus-group-spam-exit-processor-blacklist)
1871 (variable-item gnus-group-ham-exit-processor-ifile)
1872 (variable-item gnus-group-ham-exit-processor-stat)
1873 (variable-item gnus-group-ham-exit-processor-whitelist)
1874 (variable-item gnus-group-ham-exit-processor-BBDB))))
1876 "Which spam or ham processors will be applied to the GROUP articles at summary exit."
1877 :variable gnus-spam-process-newsgroups
1878 :variable-default nil
1880 "*Groups in which to automatically process spam or ham articles with
1881 a backend on summary exit. If non-nil, this should be a list of group
1882 name regexps that should match all groups in which to do automatic
1883 spam processing, associated with the appropriate processor. This only makes sense
1885 :variable-group spam
1886 :variable-type '(repeat :tag "Spam/Ham Processors"
1887 (list :tag "Spam Summary Exit Processor Choices"
1888 (regexp :tag "Group Regexp")
1889 (set :tag "Spam/Ham Summary Exit Processor"
1890 (variable-item gnus-group-spam-exit-processor-ifile)
1891 (variable-item gnus-group-spam-exit-processor-stat)
1892 (variable-item gnus-group-spam-exit-processor-bogofilter)
1893 (variable-item gnus-group-spam-exit-processor-blacklist)
1894 (variable-item gnus-group-ham-exit-processor-ifile)
1895 (variable-item gnus-group-ham-exit-processor-stat)
1896 (variable-item gnus-group-ham-exit-processor-whitelist)
1897 (variable-item gnus-group-ham-exit-processor-BBDB))))
1899 "Which spam processors will be applied to the spam or ham GROUP articles at summary exit.")
1901 (gnus-define-group-parameter
1902 spam-process-destination
1903 :parameter-type '(choice :tag "Destination for spam-processed articles at summary exit"
1904 (string :tag "Move to a group")
1905 (other :tag "Expire" nil))
1907 "Where spam-processed articles will go at summary exit."
1908 :variable gnus-spam-process-destinations
1909 :variable-default nil
1911 "*Groups in which to explicitly send spam-processed articles to
1912 another group, or expire them (the default). If non-nil, this should
1913 be a list of group name regexps that should match all groups in which
1914 to do spam-processed article moving, associated with the destination
1915 group or `nil' for explicit expiration. This only makes sense for
1917 :variable-group spam
1918 :variable-type '(repeat
1919 :tag "Spam-processed articles destination"
1921 (regexp :tag "Group Regexp")
1923 :tag "Destination for spam-processed articles at summary exit"
1924 (string :tag "Move to a group")
1925 (other :tag "Expire" nil))))
1927 "Where spam-processed articles will go at summary exit.")
1929 (gnus-define-group-parameter
1930 ham-process-destination
1931 :parameter-type '(choice
1932 :tag "Destination for ham articles at summary exit from a spam group"
1933 (string :tag "Move to a group")
1934 (other :tag "Do nothing" nil))
1936 "Where ham articles will go at summary exit from a spam group."
1937 :variable gnus-ham-process-destinations
1938 :variable-default nil
1940 "*Groups in which to explicitly send ham articles to
1941 another group, or do nothing (the default). If non-nil, this should
1942 be a list of group name regexps that should match all groups in which
1943 to do ham article moving, associated with the destination
1944 group or `nil' for explicit ignoring. This only makes sense for
1945 mail groups, and only works in spam groups."
1946 :variable-group spam
1947 :variable-type '(repeat
1948 :tag "Ham articles destination"
1950 (regexp :tag "Group Regexp")
1952 :tag "Destination for ham articles at summary exit from spam group"
1953 (string :tag "Move to a group")
1954 (other :tag "Expire" nil))))
1956 "Where ham articles will go at summary exit from a spam group.")
1958 (defcustom gnus-group-uncollapsed-levels 1
1959 "Number of group name elements to leave alone when making a short group name."
1960 :group 'gnus-group-visual
1963 (defcustom gnus-group-use-permanent-levels nil
1964 "*If non-nil, once you set a level, Gnus will use this level."
1965 :group 'gnus-group-levels
1970 (defcustom gnus-load-hook nil
1971 "A hook run while Gnus is loaded."
1975 (defcustom gnus-apply-kill-hook '(gnus-apply-kill-file)
1976 "A hook called to apply kill files to a group.
1977 This hook is intended to apply a kill file to the selected newsgroup.
1978 The function `gnus-apply-kill-file' is called by default.
1980 Since a general kill file is too heavy to use only for a few
1981 newsgroups, I recommend you to use a lighter hook function. For
1982 example, if you'd like to apply a kill file to articles which contains
1983 a string `rmgroup' in subject in newsgroup `control', you can use the
1986 (setq gnus-apply-kill-hook
1989 (cond ((string-match \"control\" gnus-newsgroup-name)
1990 (gnus-kill \"Subject\" \"rmgroup\")
1991 (gnus-expunge \"X\"))))))"
1992 :group 'gnus-score-kill
1993 :options '(gnus-apply-kill-file)
1996 (defcustom gnus-group-change-level-function nil
1997 "Function run when a group level is changed.
1998 It is called with three parameters -- GROUP, LEVEL and OLDLEVEL."
1999 :group 'gnus-group-levels
2004 (defcustom gnus-visual
2005 '(summary-highlight group-highlight article-highlight
2007 summary-menu group-menu article-menu
2008 tree-highlight menu highlight
2009 browse-menu server-menu
2010 page-marker tree-menu binary-menu pick-menu
2012 "*Enable visual features.
2013 If `visual' is disabled, there will be no menus and few faces. Most of
2014 the visual customization options below will be ignored. Gnus will use
2015 less space and be faster as a result.
2017 This variable can also be a list of visual elements to switch on. For
2018 instance, to switch off all visual things except menus, you can say:
2020 (setq gnus-visual '(menu))
2022 Valid elements include `summary-highlight', `group-highlight',
2023 `article-highlight', `mouse-face', `summary-menu', `group-menu',
2024 `article-menu', `tree-highlight', `menu', `highlight', `browse-menu',
2025 `server-menu', `page-marker', `tree-menu', `binary-menu', `pick-menu',
2026 and `grouplens-menu'."
2029 :type '(set (const summary-highlight)
2030 (const group-highlight)
2031 (const article-highlight)
2033 (const summary-menu)
2035 (const article-menu)
2036 (const tree-highlight)
2045 (const grouplens-menu)))
2047 ;; Byte-compiler warning.
2048 (defvar gnus-visual)
2049 ;; Find out whether the gnus-visual TYPE is wanted.
2050 (defun gnus-visual-p (&optional type class)
2051 (and gnus-visual ; Has to be non-nil, at least.
2052 (if (not type) ; We don't care about type.
2054 (if (listp gnus-visual) ; It's a list, so we check it.
2055 (or (memq type gnus-visual)
2056 (memq class gnus-visual))
2059 (defcustom gnus-mouse-face
2061 (if (gnus-visual-p 'mouse-face 'highlight)
2062 (if (boundp 'gnus-mouse-face)
2063 (or gnus-mouse-face 'highlight)
2067 "*Face used for group or summary buffer mouse highlighting.
2068 The line beneath the mouse pointer will be highlighted with this
2073 (defcustom gnus-article-save-directory gnus-directory
2074 "*Name of the directory articles will be saved in (default \"~/News\")."
2075 :group 'gnus-article-saving
2078 (defvar gnus-plugged t
2079 "Whether Gnus is plugged or not.")
2081 (defcustom gnus-agent-cache t
2082 "Whether Gnus use agent cache.
2083 You also need to enable `gnus-agent'."
2088 (defcustom gnus-default-charset 'iso-8859-1
2089 "Default charset assumed to be used when viewing non-ASCII characters.
2090 This variable is overridden on a group-to-group basis by the
2091 gnus-group-charset-alist variable and is only used on groups not
2092 covered by that variable."
2094 :group 'gnus-charset)
2096 (defcustom gnus-agent t
2097 "Whether we want to use the Gnus agent or not.
2098 Putting (gnus-agentize) in ~/.gnus is obsolete by (setq gnus-agent t)."
2103 (defcustom gnus-other-frame-function 'gnus
2104 "Function called by the command `gnus-other-frame'."
2106 :type '(choice (function-item gnus)
2107 (function-item gnus-no-server)
2108 (function-item gnus-slave)
2109 (function-item gnus-slave-no-server)))
2111 (defcustom gnus-other-frame-parameters nil
2112 "Frame parameters used by `gnus-other-frame' to create a Gnus frame.
2113 This should be an alist for FSF Emacs, or a plist for XEmacs."
2115 :type (if (featurep 'xemacs)
2116 '(repeat (list :inline t :format "%v"
2117 (symbol :tag "Property")
2118 (sexp :tag "Value")))
2119 '(repeat (cons :format "%v"
2120 (symbol :tag "Parameter")
2121 (sexp :tag "Value")))))
2124 ;;; Internal variables
2126 (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
2127 (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
2128 (defvar gnus-draft-meta-information-header "X-Draft-From")
2129 (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
2130 (defvar gnus-original-article-buffer " *Original Article*")
2131 (defvar gnus-newsgroup-name nil)
2132 (defvar gnus-ephemeral-servers nil)
2133 (defvar gnus-server-method-cache nil)
2135 (defvar gnus-agent-fetching nil
2136 "Whether Gnus agent is in fetching mode.")
2138 (defvar gnus-agent-covered-methods nil)
2140 (defvar gnus-command-method nil
2141 "Dynamically bound variable that says what the current back end is.")
2143 (defvar gnus-current-select-method nil
2144 "The current method for selecting a newsgroup.")
2146 (defvar gnus-tree-buffer "*Tree*"
2147 "Buffer where Gnus thread trees are displayed.")
2150 (defvar gnus-use-generic-from nil)
2152 ;; Variable holding the user answers to all method prompts.
2153 (defvar gnus-method-history nil)
2155 ;; Variable holding the user answers to all mail method prompts.
2156 (defvar gnus-mail-method-history nil)
2158 ;; Variable holding the user answers to all group prompts.
2159 (defvar gnus-group-history nil)
2161 (defvar gnus-server-alist nil
2162 "List of available servers.")
2164 (defcustom gnus-cache-directory
2165 (nnheader-concat gnus-directory "cache/")
2166 "*The directory where cached articles will be stored."
2170 (defvar gnus-predefined-server-alist
2173 (nnspool-spool-directory ,gnus-cache-directory)
2174 (nnspool-nov-directory ,gnus-cache-directory)
2175 (nnspool-active-file
2176 ,(nnheader-concat gnus-cache-directory "active"))))
2177 "List of predefined (convenience) servers.")
2179 (defvar gnus-topic-indentation "");; Obsolete variable.
2181 (defconst gnus-article-mark-lists
2182 '((marked . tick) (replied . reply)
2183 (expirable . expire) (killed . killed)
2184 (bookmarks . bookmark) (dormant . dormant)
2185 (scored . score) (saved . save)
2186 (cached . cache) (downloadable . download)
2187 (unsendable . unsend) (forwarded . forward)
2188 (recent . recent) (seen . seen)))
2190 (defconst gnus-article-special-mark-lists
2196 ;; Propagate flags to server, with the following exceptions:
2197 ;; `seen' is private to each gnus installation
2198 ;; `cache' is a internal gnus flag for each gnus installation
2199 ;; `download' is a agent flag private to each gnus installation
2200 ;; `unsend' are for nndraft groups only
2201 ;; `score' is not a proper mark
2202 ;; `bookmark': don't propagated it, or fix the bug in update-mark.
2203 (defconst gnus-article-unpropagated-mark-lists
2204 '(seen cache download unsend score bookmark)
2205 "Marks that shouldn't be propagated to back ends.
2206 Typical marks are those that make no sense in a standalone back end,
2207 such as a mark that says whether an article is stored in the cache
2208 \(which doesn't make sense in a standalone back end).")
2210 (defvar gnus-headers-retrieved-by nil)
2211 (defvar gnus-article-reply nil)
2212 (defvar gnus-override-method nil)
2213 (defvar gnus-article-check-size nil)
2214 (defvar gnus-opened-servers nil)
2216 (defvar gnus-current-kill-article nil)
2218 (defvar gnus-have-read-active-file nil)
2220 (defconst gnus-maintainer
2221 "semi-gnus-ja@meadowy.org (T-gnus Bugfixing Girls + Boys)"
2222 "The mail address of the T-gnus maintainers.")
2224 (defcustom gnus-info-filename nil
2225 "*Controls language of gnus Info.
2226 If nil and current-language-environment is Japanese, go to gnus-ja.
2227 Otherwise go to corresponding Info.
2228 This variable can be nil, gnus or gnus-ja."
2230 :type '(choice (const nil)
2231 (const :tag "English" gnus)
2232 (const :tag "Japanese" gnus-ja)))
2234 (defvar gnus-info-nodes
2235 '((gnus-group-mode "Group Buffer")
2236 (gnus-summary-mode "Summary Buffer")
2237 (gnus-article-mode "Article Buffer")
2238 (gnus-server-mode "Server Buffer")
2239 (gnus-browse-mode "Browse Foreign Server")
2240 (gnus-tree-mode "Tree Display"))
2241 "Alist of major modes and related Info nodes.")
2243 (defvar gnus-group-buffer "*Group*")
2244 (defvar gnus-summary-buffer "*Summary*")
2245 (defvar gnus-article-buffer "*Article*")
2246 (defvar gnus-server-buffer "*Server*")
2248 (defvar gnus-slave nil
2249 "Whether this Gnus is a slave or not.")
2251 (defvar gnus-batch-mode nil
2252 "Whether this Gnus is running in batch mode or not.")
2254 (defvar gnus-variable-list
2255 '(gnus-newsrc-options gnus-newsrc-options-n
2256 gnus-newsrc-last-checked-date
2257 gnus-newsrc-alist gnus-server-alist
2258 gnus-killed-list gnus-zombie-list
2259 gnus-topic-topology gnus-topic-alist
2260 gnus-agent-covered-methods)
2261 "Gnus variables saved in the quick startup file.")
2263 (defvar gnus-product-variable-file-list
2264 (let ((version (product-version (product-find 'gnus-vers)))
2265 (codesys (static-if (boundp 'MULE) '*ctext* 'ctext)))
2267 ((product-version ,version)
2269 (correct-string-widths))
2271 gnus-format-specs-compiled)
2273 ((product-version ,version)
2275 (correct-string-widths))
2277 gnus-format-specs)))
2278 "Alist of the methods for checking whether the contents of the T-gnus
2279 quick startup files are valid. One is for the byte-compiled format
2280 specifications, the other is for the source form. Each element should
2281 be a list which looks like follows:
2284 ((VARIABLE EXPECTED_VALUE_or_NIL)
2285 (VARIABLE EXPECTED_VALUE_or_NIL)
2287 CODING-SYSTEM_FOR_READING_FILE
2288 SYMBOL_OF_FORMAT_SPECS)")
2290 (defcustom gnus-compile-user-specs t
2291 "If non-nil, the user-defined format specs will be byte-compiled
2293 It has an effect on the values of `gnus-*-line-format-spec'."
2297 (defvar gnus-newsrc-alist nil
2298 "Assoc list of read articles.
2299 gnus-newsrc-hashtb should be kept so that both hold the same information.")
2301 (defvar gnus-newsrc-hashtb nil
2302 "Hashtable of gnus-newsrc-alist.")
2304 (defvar gnus-killed-list nil
2305 "List of killed newsgroups.")
2307 (defvar gnus-killed-hashtb nil
2308 "Hash table equivalent of gnus-killed-list.")
2310 (defvar gnus-zombie-list nil
2311 "List of almost dead newsgroups.")
2313 (defvar gnus-description-hashtb nil
2314 "Descriptions of newsgroups.")
2316 (defvar gnus-list-of-killed-groups nil
2317 "List of newsgroups that have recently been killed by the user.")
2319 (defvar gnus-active-hashtb nil
2320 "Hashtable of active articles.")
2322 (defvar gnus-moderated-hashtb nil
2323 "Hashtable of moderated newsgroups.")
2325 ;; Save window configuration.
2326 (defvar gnus-prev-winconf nil)
2328 (defvar gnus-reffed-article-number nil)
2330 ;;; Let the byte-compiler know that we know about this variable.
2331 (defvar rmail-default-rmail-file)
2333 (defvar gnus-dead-summary nil)
2335 (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
2336 "Regexp matching invalid groups.")
2338 (defvar gnus-other-frame-object nil
2339 "A frame object which will be created by `gnus-other-frame'.")
2341 ;;; End of variables.
2343 ;; Define some autoload functions Gnus might use.
2346 ;; This little mapcar goes through the list below and marks the
2347 ;; symbols in question as autoloaded functions.
2350 (let ((interactive (nth 1 (memq ':interactive package))))
2354 (when (consp function)
2355 (setq keymap (car (memq 'keymap function)))
2356 (setq function (car function)))
2357 (unless (fboundp function)
2358 (autoload function (car package) nil interactive keymap))))
2359 (if (eq (nth 1 package) ':interactive)
2362 '(("info" :interactive t Info-goto-node)
2364 ("ps-print" ps-print-preprint)
2365 ("message" :interactive t
2366 message-send-and-exit message-yank-original)
2367 ("babel" babel-as-string)
2368 ("nnmail" nnmail-split-fancy nnmail-article-group)
2369 ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers)
2370 ("rmailout" rmail-output rmail-output-to-rmail-file)
2371 ("rmail" rmail-insert-rmail-file-header rmail-count-new-messages
2372 rmail-show-message rmail-summary-exists
2373 rmail-select-summary rmail-update-summary)
2374 ("gnus-audio" :interactive t gnus-audio-play)
2375 ("gnus-xmas" gnus-xmas-splash)
2376 ("gnus-soup" :interactive t
2377 gnus-group-brew-soup gnus-brew-soup gnus-soup-add-article
2378 gnus-soup-send-replies gnus-soup-save-areas gnus-soup-pack-packet)
2379 ("nnsoup" nnsoup-pack-replies)
2380 ("score-mode" :interactive t gnus-score-mode)
2381 ("gnus-mh" gnus-summary-save-article-folder
2382 gnus-Folder-save-name gnus-folder-save-name)
2383 ("gnus-mh" :interactive t gnus-summary-save-in-folder)
2384 ("gnus-demon" gnus-demon-add-nocem gnus-demon-add-scanmail
2385 gnus-demon-add-rescan gnus-demon-add-scan-timestamps
2386 gnus-demon-add-disconnection gnus-demon-add-handler
2387 gnus-demon-remove-handler)
2388 ("gnus-demon" :interactive t
2389 gnus-demon-init gnus-demon-cancel)
2390 ("gnus-fun" gnus-convert-gray-x-face-to-xpm gnus-display-x-face-in-from
2391 gnus-convert-image-to-gray-x-face gnus-convert-face-to-png
2392 gnus-face-from-file)
2393 ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree
2394 gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)
2395 ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close
2396 gnus-nocem-unwanted-article-p)
2397 ("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info
2398 gnus-server-server-name)
2399 ("gnus-srvr" gnus-browse-foreign-server)
2400 ("gnus-cite" :interactive t
2401 gnus-article-highlight-citation gnus-article-hide-citation-maybe
2402 gnus-article-hide-citation gnus-article-fill-cited-article
2403 gnus-article-hide-citation-in-followups)
2404 ("gnus-kill" gnus-kill gnus-apply-kill-file-internal
2405 gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author
2406 gnus-execute gnus-expunge gnus-batch-kill gnus-batch-score)
2407 ("gnus-cache" gnus-cache-possibly-enter-article gnus-cache-save-buffers
2408 gnus-cache-possibly-remove-articles gnus-cache-request-article
2409 gnus-cache-retrieve-headers gnus-cache-possibly-alter-active
2410 gnus-cache-enter-remove-article gnus-cached-article-p
2411 gnus-cache-open gnus-cache-close gnus-cache-update-article
2412 gnus-cache-articles-in-group)
2413 ("gnus-cache" :interactive t gnus-jog-cache gnus-cache-enter-article
2414 gnus-cache-remove-article gnus-summary-insert-cached-articles)
2415 ("gnus-score" :interactive t
2416 gnus-summary-increase-score gnus-summary-set-score
2417 gnus-summary-raise-thread gnus-summary-raise-same-subject
2418 gnus-summary-raise-score gnus-summary-raise-same-subject-and-select
2419 gnus-summary-lower-thread gnus-summary-lower-same-subject
2420 gnus-summary-lower-score gnus-summary-lower-same-subject-and-select
2421 gnus-summary-current-score gnus-score-delta-default
2422 gnus-score-flush-cache gnus-score-close
2423 gnus-possibly-score-headers gnus-score-followup-article
2424 gnus-score-followup-thread)
2426 (gnus-summary-score-map keymap) gnus-score-save gnus-score-headers
2427 gnus-current-score-file-nondirectory gnus-score-adaptive
2428 gnus-score-find-trace gnus-score-file-name)
2429 ("gnus-cus" :interactive t gnus-custom-mode gnus-group-customize
2430 gnus-score-customize)
2431 ("gnus-topic" :interactive t gnus-topic-mode)
2432 ("gnus-topic" gnus-topic-remove-group gnus-topic-set-parameters
2433 gnus-subscribe-topics)
2434 ("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode)
2435 ("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap))
2436 ("gnus-uu" :interactive t
2437 gnus-uu-digest-mail-forward gnus-uu-digest-post-forward
2438 gnus-uu-mark-series gnus-uu-mark-region gnus-uu-mark-buffer
2439 gnus-uu-mark-by-regexp gnus-uu-mark-all
2440 gnus-uu-mark-sparse gnus-uu-mark-thread gnus-uu-decode-uu
2441 gnus-uu-decode-uu-and-save gnus-uu-decode-unshar
2442 gnus-uu-decode-unshar-and-save gnus-uu-decode-save
2443 gnus-uu-decode-binhex gnus-uu-decode-uu-view
2444 gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view
2445 gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view
2446 gnus-uu-decode-binhex-view gnus-uu-unmark-thread
2447 gnus-uu-mark-over gnus-uu-post-news)
2448 ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh
2449 gnus-uu-unmark-thread)
2450 ("gnus-msg" (gnus-summary-send-map keymap)
2451 gnus-article-mail gnus-copy-article-buffer gnus-following-method)
2452 ("gnus-msg" :interactive t
2453 gnus-group-post-news gnus-group-mail gnus-group-news
2454 gnus-summary-post-news gnus-summary-news-other-window
2455 gnus-summary-followup gnus-summary-followup-with-original
2456 gnus-summary-cancel-article gnus-summary-supersede-article
2457 gnus-post-news gnus-summary-reply gnus-summary-reply-with-original
2458 gnus-summary-mail-forward gnus-summary-mail-other-window
2459 gnus-summary-resend-message gnus-summary-resend-bounced-mail
2460 gnus-summary-wide-reply gnus-summary-followup-to-mail
2461 gnus-summary-followup-to-mail-with-original gnus-bug
2462 gnus-summary-wide-reply-with-original gnus-summary-post-forward
2463 gnus-summary-digest-mail-forward gnus-summary-digest-post-forward)
2464 ("gnus-picon" :interactive t gnus-treat-from-picon)
2465 ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p
2466 gnus-grouplens-mode)
2467 ("smiley" :interactive t smiley-region)
2468 ("gnus-win" gnus-configure-windows gnus-add-configuration)
2469 ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
2470 gnus-list-of-unread-articles gnus-list-of-read-articles
2471 gnus-offer-save-summaries gnus-make-thread-indent-array
2472 gnus-summary-exit gnus-update-read-articles gnus-summary-last-subject
2473 gnus-summary-skip-intangible gnus-summary-article-number
2474 gnus-data-header gnus-data-find gnus-summary-jump-to-other-group)
2475 ("gnus-group" gnus-group-insert-group-line gnus-group-quit
2476 gnus-group-list-groups gnus-group-first-unread-group
2477 gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc
2478 gnus-group-setup-buffer gnus-group-get-new-news
2479 gnus-group-make-help-group gnus-group-update-group
2480 gnus-group-iterate gnus-group-group-name)
2481 ("gnus-bcklg" gnus-backlog-request-article gnus-backlog-enter-article
2482 gnus-backlog-remove-article)
2483 ("gnus-art" gnus-article-read-summary-keys gnus-article-save
2484 gnus-article-prepare gnus-article-set-window-start
2485 gnus-article-next-page gnus-article-prev-page
2486 gnus-request-article-this-buffer gnus-article-mode
2487 gnus-article-setup-buffer gnus-narrow-to-page
2488 gnus-article-delete-invisible-text gnus-treat-article)
2489 ("gnus-art" :interactive t
2490 gnus-article-hide-headers gnus-article-hide-boring-headers
2491 gnus-article-treat-overstrike
2492 gnus-article-remove-cr gnus-article-remove-trailing-blank-lines
2493 gnus-article-display-x-face
2494 gnus-article-decode-HZ
2495 gnus-article-wash-html
2496 gnus-article-unsplit-urls
2497 gnus-article-hide-pgp
2498 gnus-article-hide-pem gnus-article-hide-signature
2499 gnus-article-strip-leading-blank-lines gnus-article-date-local
2500 gnus-article-date-original gnus-article-date-lapsed
2501 gnus-article-show-all-headers
2502 ;; gnus-article-show-all
2503 gnus-article-edit-mode gnus-article-edit-article
2504 gnus-article-edit-done article-decode-encoded-words
2505 gnus-start-date-timer gnus-stop-date-timer)
2506 ("gnus-int" gnus-request-type)
2507 ("gnus-start" gnus-newsrc-parse-options gnus-1 gnus-no-server-1
2508 gnus-dribble-enter gnus-read-init-file gnus-dribble-touch)
2509 ("gnus-dup" gnus-dup-suppress-articles gnus-dup-unsuppress-article
2510 gnus-dup-enter-articles)
2511 ("gnus-range" gnus-copy-sequence)
2512 ("gnus-eform" gnus-edit-form)
2513 ("gnus-move" :interactive t
2514 gnus-group-move-group-to-server gnus-change-server)
2515 ("gnus-logic" gnus-score-advanced)
2516 ("gnus-undo" gnus-undo-mode gnus-undo-register)
2517 ("gnus-async" gnus-async-request-fetched-article gnus-async-prefetch-next
2518 gnus-async-prefetch-article gnus-async-prefetch-remove-group
2519 gnus-async-halt-prefetch)
2522 ("gnus-offline" :interactive t
2523 gnus-offline-toggle-plugged
2524 gnus-offline-set-unplugged-state
2525 gnus-offline-toggle-auto-hangup
2526 gnus-offline-toggle-on/off-send-mail
2527 gnus-offline-toggle-articles-to-fetch
2528 gnus-offline-set-interval-time
2529 gnus-offline-agent-expire)
2530 ("miee" :interactive t gnspool-get-news
2531 mail-spool-send news-spool-post)
2532 ("international/mw32misc" define-process-argument-editing
2533 general-process-argument-editing-function)
2534 ("gnus-agent" gnus-open-agent gnus-agent-get-function
2535 gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p
2536 gnus-agent-get-undownloaded-list gnus-agent-fetch-session
2537 gnus-summary-set-agent-mark gnus-agent-save-group-info
2538 gnus-agent-request-article gnus-agent-retrieve-headers)
2539 ("gnus-agent" :interactive t
2540 gnus-unplugged gnus-agentize gnus-agent-batch)
2541 ("gnus-vm" :interactive t gnus-summary-save-in-vm
2542 gnus-summary-save-article-vm)
2543 ("compface" uncompface)
2544 ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue)
2545 ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)
2546 ("gnus-mlspl" :interactive t gnus-group-split-setup
2547 gnus-group-split-update)
2548 ("gnus-delay" gnus-delay-initialize))))
2551 (unless (featurep 'xemacs)
2552 (if (>= emacs-major-version 21)
2553 (autoload 'x-face-decode-message-header "x-face-e21")
2554 (autoload 'x-face-mule-gnus-article-display-x-face "x-face-mule"))))
2556 (unless (and (fboundp 'base64-encode-string)
2557 (subrp (symbol-function 'base64-encode-string)))
2560 ;; To search articles with Namazu.
2561 (autoload 'gnus-namazu-search "gnus-namazu" nil t)
2562 (autoload 'gnus-namazu-create-index "gnus-namazu" nil t)
2563 (autoload 'gnus-namazu-update-index "gnus-namazu" nil t)
2564 (autoload 'gnus-namazu-update-all-indices "gnus-namazu" nil t)
2566 ;; To make nnir groups.
2567 (autoload 'gnus-group-make-nnir-group "nnir" nil t)
2569 ;; To make shimbun groups.
2570 (autoload 'gnus-group-make-shimbun-group "nnshimbun" nil t)
2572 ;; A tool for the developers.
2573 (autoload 'find-cl-run-time-functions "gnus-clfns" nil t)
2575 ;;; gnus-sum.el thingies
2578 (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
2579 "*The format specification of the lines in the summary buffer.
2581 It works along the same lines as a normal formatting string,
2582 with some simple extensions.
2584 %N Article number, left padded with spaces (string)
2586 %s Subject if it is at the root of a thread, and \"\" otherwise (string)
2587 %n Name of the poster (string)
2588 %a Extracted name of the poster (string)
2589 %A Extracted address of the poster (string)
2590 %F Contents of the From: header (string)
2591 %f Contents of the From: or To: headers (string)
2592 %x Contents of the Xref: header (string)
2593 %D Date of the article (string)
2594 %d Date of the article (string) in DD-MMM format
2595 %o Date of the article (string) in YYYYMMDD`T'HHMMSS format
2596 %M Message-id of the article (string)
2597 %r References of the article (string)
2598 %c Number of characters in the article (integer)
2599 %k Pretty-printed version of the above (string)
2600 For example, \"1.2k\" or \"0.4M\".
2601 %L Number of lines in the article (integer)
2602 %I Indentation based on thread level (a string of spaces)
2603 %B A complex trn-style thread tree (string)
2604 The variables `gnus-sum-thread-*' can be used for customization.
2605 %T A string with two possible values: 80 spaces if the article
2606 is on thread level two or larger and 0 spaces on level one
2607 %R \"A\" if this article has been replied to, \" \" otherwise (character)
2608 %U Status of this article (character, \"R\", \"K\", \"-\" or \" \")
2609 %[ Opening bracket (character, \"[\" or \"<\")
2610 %] Closing bracket (character, \"]\" or \">\")
2611 %> Spaces of length thread-level (string)
2612 %< Spaces of length (- 20 thread-level) (string)
2613 %i Article score (number)
2614 %z Article zcore (character)
2615 %t Number of articles under the current thread (number).
2616 %e Whether the thread is empty or not (character).
2617 %l GroupLens score (string).
2618 %V Total thread score (number).
2619 %P The line number (number).
2620 %O Download mark (character).
2621 %* If present, indicates desired cursor position
2622 (instead of after first colon).
2623 %u User defined specifier. The next character in the format string should
2624 be a letter. Gnus will call the function gnus-user-format-function-X,
2625 where X is the letter following %u. The function will be passed the
2626 current header as argument. The function should return a string, which
2627 will be inserted into the summary just like information from any other
2630 The %U (status), %R (replied) and %z (zcore) specs have to be handled
2631 with care. For reasons of efficiency, Gnus will compute what column
2632 these characters will end up in, and \"hard-code\" that. This means that
2633 it is invalid to have these specs after a variable-length spec. Well,
2634 you might not be arrested, but your summary buffer will look strange,
2635 which is bad enough.
2637 The smart choice is to have these specs as far to the left as
2640 This restriction may disappear in later versions of Gnus.
2642 General format specifiers can also be used.
2643 See Info node `(gnus)Formatting Variables'."
2644 :link '(custom-manual "(gnus)Formatting Variables")
2646 :group 'gnus-summary-format)
2649 ;;; Skeleton keymaps
2652 (defun gnus-suppress-keymap (keymap)
2653 (suppress-keymap keymap)
2654 (let ((keys `([backspace] [delete] "\177" "\M-u"))) ;gnus-mouse-2
2656 (define-key keymap (pop keys) 'undefined))))
2658 (defvar gnus-article-mode-map
2659 (let ((keymap (make-sparse-keymap)))
2660 (gnus-suppress-keymap keymap)
2662 (defvar gnus-summary-mode-map
2663 (let ((keymap (make-keymap)))
2664 (gnus-suppress-keymap keymap)
2666 (defvar gnus-group-mode-map
2667 (let ((keymap (make-keymap)))
2668 (gnus-suppress-keymap keymap)
2673 ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
2674 ;; If you want the cursor to go somewhere else, set these two
2675 ;; functions in some startup hook to whatever you want.
2676 (defalias 'gnus-summary-position-point 'gnus-goto-colon)
2677 (defalias 'gnus-group-position-point 'gnus-goto-colon)
2679 ;;; Various macros and substs.
2681 (defun gnus-header-from (header)
2682 (mail-header-from header))
2684 (defmacro gnus-gethash (string hashtable)
2685 "Get hash value of STRING in HASHTABLE."
2686 `(symbol-value (intern-soft ,string ,hashtable)))
2688 (defmacro gnus-gethash-safe (string hashtable)
2689 "Get hash value of STRING in HASHTABLE.
2690 Return nil if not defined."
2691 `(let ((sym (intern-soft ,string ,hashtable)))
2692 (and (boundp sym) (symbol-value sym))))
2694 (defmacro gnus-sethash (string value hashtable)
2695 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
2696 `(set (intern ,string ,hashtable) ,value))
2697 (put 'gnus-sethash 'edebug-form-spec '(form form form))
2699 (defmacro gnus-group-unread (group)
2700 "Get the currently computed number of unread articles in GROUP."
2701 `(car (gnus-gethash ,group gnus-newsrc-hashtb)))
2703 (defmacro gnus-group-entry (group)
2704 "Get the newsrc entry for GROUP."
2705 `(gnus-gethash ,group gnus-newsrc-hashtb))
2707 (defmacro gnus-active (group)
2708 "Get active info on GROUP."
2709 `(gnus-gethash ,group gnus-active-hashtb))
2711 (defmacro gnus-set-active (group active)
2712 "Set GROUP's active info."
2713 `(gnus-sethash ,group ,active gnus-active-hashtb))
2715 ;; Info access macros.
2717 (defmacro gnus-info-group (info)
2719 (defmacro gnus-info-rank (info)
2721 (defmacro gnus-info-read (info)
2723 (defmacro gnus-info-marks (info)
2725 (defmacro gnus-info-method (info)
2727 (defmacro gnus-info-params (info)
2730 (defmacro gnus-info-level (info)
2731 `(let ((rank (gnus-info-rank ,info)))
2735 (defmacro gnus-info-score (info)
2736 `(let ((rank (gnus-info-rank ,info)))
2737 (or (and (consp rank) (cdr rank)) 0)))
2739 (defmacro gnus-info-set-group (info group)
2740 `(setcar ,info ,group))
2741 (defmacro gnus-info-set-rank (info rank)
2742 `(setcar (nthcdr 1 ,info) ,rank))
2743 (defmacro gnus-info-set-read (info read)
2744 `(setcar (nthcdr 2 ,info) ,read))
2745 (defmacro gnus-info-set-marks (info marks &optional extend)
2747 `(gnus-info-set-entry ,info ,marks 3)
2748 `(setcar (nthcdr 3 ,info) ,marks)))
2749 (defmacro gnus-info-set-method (info method &optional extend)
2751 `(gnus-info-set-entry ,info ,method 4)
2752 `(setcar (nthcdr 4 ,info) ,method)))
2753 (defmacro gnus-info-set-params (info params &optional extend)
2755 `(gnus-info-set-entry ,info ,params 5)
2756 `(setcar (nthcdr 5 ,info) ,params)))
2758 (defun gnus-info-set-entry (info entry number)
2759 ;; Extend the info until we have enough elements.
2760 (while (<= (length info) number)
2761 (nconc info (list nil)))
2763 (setcar (nthcdr number info) entry))
2765 (defmacro gnus-info-set-level (info level)
2766 `(let ((rank (cdr ,info)))
2767 (if (consp (car rank))
2768 (setcar (car rank) ,level)
2769 (setcar rank ,level))))
2770 (defmacro gnus-info-set-score (info score)
2771 `(let ((rank (cdr ,info)))
2772 (if (consp (car rank))
2773 (setcdr (car rank) ,score)
2774 (setcar rank (cons (car rank) ,score)))))
2776 (defmacro gnus-get-info (group)
2777 `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
2779 ;;; Load the compatibility functions.
2788 (defvar gnus-shutdown-alist nil)
2790 (defun gnus-add-shutdown (function &rest symbols)
2791 "Run FUNCTION whenever one of SYMBOLS is shut down."
2792 (push (cons function symbols) gnus-shutdown-alist))
2794 (defun gnus-shutdown (symbol)
2795 "Shut down everything that waits for SYMBOL."
2796 (let ((alist gnus-shutdown-alist)
2798 (while (setq entry (pop alist))
2799 (when (memq symbol (cdr entry))
2800 (funcall (car entry))))))
2804 ;;; Gnus Utility Functions
2807 (defun gnus-find-subscribed-addresses ()
2808 "Return a regexp matching the addresses of all subscribed mail groups.
2809 It consists of the `to-address' or `to-list' parameter of all groups
2810 with a `subscribed' parameter."
2811 (let (group address addresses)
2812 (dolist (entry (cdr gnus-newsrc-alist))
2813 (setq group (car entry))
2814 (when (gnus-parameter-subscribed group)
2815 (setq address (mail-strip-quoted-names
2816 (or (gnus-group-fast-parameter group 'to-address)
2817 (gnus-group-fast-parameter group 'to-list))))
2819 (add-to-list 'addresses address))))
2821 (list (mapconcat 'regexp-quote addresses "\\|")))))
2823 (defmacro gnus-string-or (&rest strings)
2824 "Return the first element of STRINGS that is a non-blank string.
2825 STRINGS will be evaluated in normal `or' order."
2826 `(gnus-string-or-1 ',strings))
2828 (defun gnus-string-or-1 (strings)
2831 (setq string (eval (pop strings)))
2832 (if (string-match "^[ \t]*$" string)
2834 (setq strings nil)))
2837 (defun gnus-info-find-node (&optional nodename)
2838 "Find Info documentation of Gnus."
2840 ;; Enlarge info window if needed.
2841 (let (gnus-info-buffer)
2844 (or gnus-info-filename
2845 (get-language-info current-language-environment 'gnus-info)
2848 (cadr (assq major-mode gnus-info-nodes))
2849 (and (eq (current-buffer) (get-buffer gnus-article-buffer))
2850 (cadr (assq 'gnus-article-mode gnus-info-nodes))))))
2851 (setq gnus-info-buffer (current-buffer))
2852 (gnus-configure-windows 'info)))
2855 ;;; gnus-interactive
2858 (defvar gnus-current-prefix-symbol nil
2859 "Current prefix symbol.")
2861 (defvar gnus-current-prefix-symbols nil
2862 "List of current prefix symbols.")
2864 (defun gnus-interactive (string &optional params)
2865 "Return a list that can be fed to `interactive'.
2866 See `interactive' for full documentation.
2868 Adds the following specs:
2870 y -- The current symbolic prefix.
2871 Y -- A list of the current symbolic prefix(es).
2872 A -- Article number.
2873 H -- Article header.
2877 (while (< i (length string))
2878 (string-match ".\\([^\n]*\\)\n?" string i)
2879 (setq c (aref string i))
2881 (setq prompt (match-string 1 string)))
2882 (setq i (match-end 0))
2883 ;; We basically emulate just about everything that
2884 ;; `interactive' does, but add the specs listed above.
2888 (completing-read prompt obarray 'fboundp t))
2890 (read-buffer prompt (current-buffer) t))
2892 (read-buffer prompt (other-buffer (current-buffer))))
2896 (completing-read prompt obarray 'commandp t))
2900 (read-file-name prompt nil default-directory 'lambda))
2902 (read-file-name prompt nil nil 'lambda))
2904 (read-file-name prompt))
2906 (read-key-sequence prompt))
2908 (error "Not implemented spec"))
2910 (error "Not implemented spec"))
2914 (error "Not implemented spec"))
2916 (string-to-number (read-from-minibuffer prompt)))
2918 (prefix-numeric-value current-prefix-arg))
2924 (read-string prompt))
2926 (intern (read-string prompt)))
2928 (read-variable prompt))
2930 (read-minibuffer prompt))
2932 (eval-minibuffer prompt))
2933 ;; And here the new specs come.
2935 gnus-current-prefix-symbol)
2937 gnus-current-prefix-symbols)
2939 (gnus-group-group-name))
2941 (gnus-summary-skip-intangible)
2942 (or (get-text-property (point) 'gnus-number)
2943 (gnus-summary-last-subject)))
2945 (gnus-data-header (gnus-data-find (gnus-summary-article-number))))
2947 (error "Non-implemented spec")))
2951 (push (if (< (point) (mark)) (point) (mark)) out)
2952 (push (if (> (point) (mark)) (point) (mark)) out))))
2953 (setq out (delq 'gnus-prefix-nil out))
2956 (defun gnus-symbolic-argument (&optional arg)
2957 "Read a symbolic argument and a command, and then execute command."
2959 (let* ((in-command (this-command-keys))
2960 (command in-command)
2961 gnus-current-prefix-symbols
2962 gnus-current-prefix-symbol
2964 (while (equal in-command command)
2965 (message "%s-" (key-description (this-command-keys)))
2966 (push (intern (char-to-string (read-char))) syms)
2967 (setq command (read-key-sequence nil t)))
2968 (setq gnus-current-prefix-symbols (nreverse syms)
2969 gnus-current-prefix-symbol (car gnus-current-prefix-symbols))
2970 (call-interactively (key-binding command t))))
2972 ;;; More various functions.
2974 (defsubst gnus-check-backend-function (func group)
2975 "Check whether GROUP supports function FUNC.
2976 GROUP can either be a string (a group name) or a select method."
2978 (let ((method (if (stringp group)
2979 (car (gnus-find-method-for-group group))
2981 (unless (featurep method)
2983 (fboundp (intern (format "%s-%s" method func))))))
2985 (defun gnus-group-read-only-p (&optional group)
2986 "Check whether GROUP supports editing or not.
2987 If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
2988 that that variable is buffer-local to the summary buffers."
2989 (let ((group (or group gnus-newsgroup-name)))
2990 (not (gnus-check-backend-function 'request-replace-article group))))
2992 (defun gnus-virtual-group-p (group)
2993 "Say whether GROUP is virtual or not."
2994 (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))
2995 gnus-valid-select-methods)))
2997 (defun gnus-news-group-p (group &optional article)
2998 "Return non-nil if GROUP (and ARTICLE) come from a news server."
2999 (cond ((gnus-member-of-valid 'post group) ;Ordinary news group
3000 t) ;is news of course.
3001 ((not (gnus-member-of-valid 'post-mail group)) ;Non-combined.
3002 nil) ;must be mail then.
3003 ((vectorp article) ;Has header info.
3004 (eq (gnus-request-type group (mail-header-id article)) 'news))
3005 ((null article) ;Hasn't header info
3006 (eq (gnus-request-type group) 'news)) ;(unknown ==> mail)
3007 ((< article 0) ;Virtual message
3008 nil) ;we don't know, guess mail.
3009 (t ;Has positive number
3010 (eq (gnus-request-type group article) 'news)))) ;use it.
3012 ;; Returns a list of writable groups.
3013 (defun gnus-writable-groups ()
3014 (let ((alist gnus-newsrc-alist)
3016 (while (setq group (car (pop alist)))
3017 (unless (gnus-group-read-only-p group)
3018 (push group groups)))
3021 ;; Check whether to use long file names.
3022 (defun gnus-use-long-file-name (symbol)
3023 ;; The variable has to be set...
3024 (and gnus-use-long-file-name
3025 ;; If it isn't a list, then we return t.
3026 (or (not (listp gnus-use-long-file-name))
3027 ;; If it is a list, and the list contains `symbol', we
3029 (not (memq symbol gnus-use-long-file-name)))))
3031 ;; Generate a unique new group name.
3032 (defun gnus-generate-new-group-name (leaf)
3035 (while (gnus-gethash name gnus-newsrc-hashtb)
3036 (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
3039 (defun gnus-ephemeral-group-p (group)
3040 "Say whether GROUP is ephemeral or not."
3041 (gnus-group-get-parameter group 'quit-config t))
3043 (defun gnus-group-quit-config (group)
3044 "Return the quit-config of GROUP."
3045 (gnus-group-get-parameter group 'quit-config t))
3047 (defun gnus-kill-ephemeral-group (group)
3048 "Remove ephemeral GROUP from relevant structures."
3049 (gnus-sethash group nil gnus-newsrc-hashtb))
3051 (defun gnus-simplify-mode-line ()
3052 "Make mode lines a bit simpler."
3053 (setq mode-line-modified (cdr gnus-mode-line-modified))
3054 (when (listp mode-line-format)
3055 (make-local-variable 'mode-line-format)
3056 (setq mode-line-format (copy-sequence mode-line-format))
3057 (when (equal (nth 3 mode-line-format) " ")
3058 (setcar (nthcdr 3 mode-line-format) " "))))
3060 ;;; Servers and groups.
3062 (defsubst gnus-server-add-address (method)
3063 (let ((method-name (symbol-name (car method))))
3064 (if (and (memq 'address (assoc method-name gnus-valid-select-methods))
3065 (not (assq (intern (concat method-name "-address")) method))
3066 (memq 'physical-address (assq (car method)
3067 gnus-valid-select-methods)))
3068 (append method (list (list (intern (concat method-name "-address"))
3072 (defsubst gnus-server-to-method (server)
3073 "Map virtual server names to select methods."
3074 (or (and server (listp server) server)
3075 (cdr (assoc server gnus-server-method-cache))
3078 ;; Perhaps this is the native server?
3079 (and (equal server "native") gnus-select-method)
3080 ;; It should be in the server alist.
3081 (cdr (assoc server gnus-server-alist))
3082 ;; It could be in the predefined server alist.
3083 (cdr (assoc server gnus-predefined-server-alist))
3084 ;; If not, we look through all the opened server
3085 ;; to see whether we can find it there.
3086 (let ((opened gnus-opened-servers))
3088 (not (equal server (format "%s:%s" (caaar opened)
3092 ;; It could be a named method, search all servers
3093 (let ((servers gnus-secondary-select-methods))
3095 (not (equal server (format "%s:%s" (caar servers)
3099 (push (cons server result) gnus-server-method-cache)
3102 (defsubst gnus-server-get-method (group method)
3103 ;; Input either a server name, and extended server name, or a
3104 ;; select method, and return a select method.
3105 (cond ((stringp method)
3106 (gnus-server-to-method method))
3107 ((equal method gnus-select-method)
3109 ((and (stringp (car method))
3111 (gnus-server-extend-method group method))
3114 (equal (cadr method) ""))
3117 (gnus-server-add-address method))))
3119 (defmacro gnus-method-equal (ss1 ss2)
3120 "Say whether two servers are equal."
3124 (and (= (length s1) (length s2))
3126 (while (and s1 (member (car s1) s2))
3130 (defun gnus-methods-equal-p (m1 m2)
3131 (let ((m1 (or m1 gnus-select-method))
3132 (m2 (or m2 gnus-select-method)))
3134 (and (eq (car m1) (car m2))
3135 (or (not (memq 'address (assoc (symbol-name (car m1))
3136 gnus-valid-select-methods)))
3137 (equal (nth 1 m1) (nth 1 m2)))))))
3139 (defun gnus-server-equal (m1 m2)
3140 "Say whether two methods are equal."
3141 (let ((m1 (cond ((null m1) gnus-select-method)
3142 ((stringp m1) (gnus-server-to-method m1))
3144 (m2 (cond ((null m2) gnus-select-method)
3145 ((stringp m2) (gnus-server-to-method m2))
3147 (gnus-method-equal m1 m2)))
3149 (defun gnus-servers-using-backend (backend)
3150 "Return a list of known servers using BACKEND."
3151 (let ((opened gnus-opened-servers)
3154 (when (eq backend (caaar opened))
3155 (push (caar opened) out))
3159 (defun gnus-archive-server-wanted-p ()
3160 "Say whether the user wants to use the archive server."
3162 ((or (not gnus-message-archive-method)
3163 (not gnus-message-archive-group))
3165 ((and gnus-message-archive-method gnus-message-archive-group)
3168 (let ((active (cadr (assq 'nnfolder-active-file
3169 gnus-message-archive-method))))
3171 (file-exists-p active))))))
3173 (defsubst gnus-method-to-server-name (method)
3175 (format "%s" (car method))
3177 (or (assoc (format "%s" (car method))
3178 (gnus-methods-using 'address))
3179 (gnus-server-equal method gnus-message-archive-method))
3181 (not (string= (nth 1 method) "")))
3182 (concat "+" (nth 1 method)))))
3184 (defsubst gnus-method-to-full-server-name (method)
3185 (format "%s+%s" (car method) (nth 1 method)))
3187 (defun gnus-group-prefixed-name (group method)
3188 "Return the whole name from GROUP and METHOD."
3189 (and (stringp method) (setq method (gnus-server-to-method method)))
3190 (if (or (not method)
3191 (gnus-server-equal method "native")
3192 (string-match ":" group))
3194 (concat (gnus-method-to-server-name method) ":" group)))
3196 (defun gnus-group-real-prefix (group)
3197 "Return the prefix of the current group name."
3198 (if (string-match "^[^:]+:" group)
3199 (substring group 0 (match-end 0))
3202 (defun gnus-group-method (group)
3203 "Return the server or method used for selecting GROUP.
3204 You should probably use `gnus-find-method-for-group' instead."
3205 (let ((prefix (gnus-group-real-prefix group)))
3206 (if (equal prefix "")
3208 (let ((servers gnus-opened-servers)
3210 backend possible found)
3211 (if (string-match "^[^\\+]+\\+" prefix)
3212 (setq backend (intern (substring prefix 0 (1- (match-end 0))))
3213 server (substring prefix (match-end 0) (1- (length prefix))))
3214 (setq backend (intern (substring prefix 0 (1- (length prefix))))))
3216 (when (eq (caaar servers) backend)
3217 (setq possible (caar servers))
3218 (when (equal (cadaar servers) server)
3219 (setq found (caar servers))))
3221 (or (car (rassoc found gnus-server-alist))
3223 (car (rassoc possible gnus-server-alist))
3225 (list backend server))))))
3227 (defsubst gnus-native-method-p (method)
3228 "Return whether METHOD is the native select method."
3229 (gnus-method-equal method gnus-select-method))
3231 (defsubst gnus-secondary-method-p (method)
3232 "Return whether METHOD is a secondary select method."
3233 (let ((methods gnus-secondary-select-methods)
3234 (gmethod (gnus-server-get-method nil method)))
3236 (not (gnus-method-equal
3237 (gnus-server-get-method nil (car methods))
3239 (setq methods (cdr methods)))
3242 (defun gnus-method-simplify (method)
3243 "Return the shortest uniquely identifying string or method for METHOD."
3244 (cond ((stringp method)
3246 ((gnus-native-method-p method)
3248 ((gnus-secondary-method-p method)
3249 (format "%s:%s" (nth 0 method) (nth 1 method)))
3253 (defun gnus-groups-from-server (server)
3254 "Return a list of all groups that are fetched from SERVER."
3255 (let ((alist (cdr gnus-newsrc-alist))
3257 (while (setq info (pop alist))
3258 (when (gnus-server-equal (gnus-info-method info) server)
3259 (push (gnus-info-group info) groups)))
3260 (sort groups 'string<)))
3262 (defun gnus-group-foreign-p (group)
3263 "Say whether a group is foreign or not."
3264 (and (not (gnus-group-native-p group))
3265 (not (gnus-group-secondary-p group))))
3267 (defun gnus-group-native-p (group)
3268 "Say whether the group is native or not."
3269 (not (string-match ":" group)))
3271 (defun gnus-group-secondary-p (group)
3272 "Say whether the group is secondary or not."
3273 (gnus-secondary-method-p (gnus-find-method-for-group group)))
3275 (defun gnus-parameters-get-parameter (group)
3276 "Return the group parameters for GROUP from `gnus-parameters'."
3278 (dolist (elem gnus-parameters)
3279 (when (string-match (car elem) group)
3281 (nconc (gnus-expand-group-parameters
3282 (car elem) (cdr elem) group)
3286 (defun gnus-expand-group-parameter (match value group)
3287 "Use MATCH to expand VALUE in GROUP."
3290 (goto-char (point-min))
3291 (while (re-search-forward match nil t)
3292 (replace-match value))
3295 (defun gnus-expand-group-parameters (match parameters group)
3296 "Go through PARAMETERS and expand them according to the match data."
3298 (dolist (elem parameters)
3299 (if (and (stringp (cdr elem))
3300 (string-match "\\\\[0-9&]" (cdr elem)))
3301 (push (cons (car elem)
3302 (gnus-expand-group-parameter match (cdr elem) group))
3307 (defun gnus-group-fast-parameter (group symbol &optional allow-list)
3308 "For GROUP, return the value of SYMBOL.
3310 You should call this in the `gnus-group-buffer' buffer.
3311 The function `gnus-group-find-parameter' will do that for you."
3312 ;; The speed trick: No cons'ing and quit early.
3313 (let* ((params (funcall gnus-group-get-parameter-function group))
3314 ;; Start easy, check the "real" group parameters.
3316 (gnus-group-parameter-value params symbol allow-list t)))
3318 ;; Found results; return them.
3319 (car simple-results)
3320 ;; We didn't found it there, try `gnus-parameters'.
3323 (tail gnus-parameters))
3324 ;; A good old-fashioned non-cl loop.
3326 (setq head (car tail)
3328 ;; The car is regexp matching for matching the group name.
3329 (when (string-match (car head) group)
3330 ;; The cdr is the parameters.
3331 (setq result (gnus-group-parameter-value (cdr head)
3334 ;; Expand if necessary.
3335 (if (and (stringp result) (string-match "\\\\[0-9&]" result))
3336 (setq result (gnus-expand-group-parameter (car head)
3338 ;; Exit the loop early.
3343 (defun gnus-group-find-parameter (group &optional symbol allow-list)
3344 "Return the group parameters for GROUP.
3345 If SYMBOL, return the value of that symbol in the group parameters.
3347 If you call this function inside a loop, consider using the faster
3348 `gnus-group-fast-parameter' instead."
3350 (set-buffer gnus-group-buffer)
3352 (gnus-group-fast-parameter group symbol allow-list)
3355 (funcall gnus-group-get-parameter-function group))
3356 (gnus-parameters-get-parameter group)))))
3358 (defun gnus-group-get-parameter (group &optional symbol allow-list)
3359 "Return the group parameters for GROUP.
3360 If SYMBOL, return the value of that symbol in the group parameters.
3361 Most functions should use `gnus-group-find-parameter', which
3362 also examines the topic parameters."
3363 (let ((params (gnus-info-params (gnus-get-info group))))
3365 (gnus-group-parameter-value params symbol allow-list)
3368 (defun gnus-group-parameter-value (params symbol &optional
3369 allow-list present-p)
3370 "Return the value of SYMBOL in group PARAMS."
3371 ;; We only wish to return group parameters (dotted lists) and
3372 ;; not local variables, which may have the same names.
3373 ;; But first we handle single elements...
3374 (or (car (memq symbol params))
3378 (while (setq elem (pop params))
3379 (when (and (consp elem)
3380 (eq (car elem) symbol)
3383 (throw 'found (if present-p (list (cdr elem))
3386 (defun gnus-group-add-parameter (group param)
3387 "Add parameter PARAM to GROUP."
3388 (let ((info (gnus-get-info group)))
3390 (gnus-group-remove-parameter group (if (consp param) (car param) param))
3391 ;; Cons the new param to the old one and update.
3392 (gnus-group-set-info (cons param (gnus-info-params info))
3395 (defun gnus-group-set-parameter (group name value)
3396 "Set parameter NAME to VALUE in GROUP."
3397 (let ((info (gnus-get-info group)))
3399 (gnus-group-remove-parameter group name)
3400 (let ((old-params (gnus-info-params info))
3401 (new-params (list (cons name value))))
3403 (when (or (not (listp (car old-params)))
3404 (not (eq (caar old-params) name)))
3405 (setq new-params (append new-params (list (car old-params)))))
3406 (setq old-params (cdr old-params)))
3407 (gnus-group-set-info new-params group 'params)))))
3409 (defun gnus-group-remove-parameter (group name)
3410 "Remove parameter NAME from GROUP."
3411 (let ((info (gnus-get-info group)))
3413 (let ((params (gnus-info-params info)))
3415 (setq params (delq name params))
3416 (while (assq name params)
3417 (gnus-pull name params))
3418 (gnus-info-set-params info params))))))
3420 (defun gnus-group-add-score (group &optional score)
3421 "Add SCORE to the GROUP score.
3422 If SCORE is nil, add 1 to the score of GROUP."
3423 (let ((info (gnus-get-info group)))
3425 (gnus-info-set-score info (+ (gnus-info-score info) (or score 1))))))
3427 (defun gnus-short-group-name (group &optional levels)
3428 "Collapse GROUP name LEVELS.
3429 Select methods are stripped and any remote host name is stripped down to
3430 just the host name."
3436 gnus-group-uncollapsed-levels
3438 (while (string-match "\\." group skip)
3439 (setq skip (match-end 0)
3442 ;; Separate foreign select method from group name and collapse.
3443 ;; If method contains a server, collapse to non-domain server name,
3444 ;; otherwise collapse to select method.
3445 (let* ((colon (string-match ":" group))
3446 (server (and colon (substring group 0 colon)))
3447 (plus (and server (string-match "+" server))))
3450 (setq foreign (substring server (+ 1 plus)
3451 (string-match "\\." server))
3452 group (substring group (+ 1 colon)))
3453 (setq foreign server
3454 group (substring group (+ 1 colon))))
3455 (setq foreign (concat foreign ":")))
3456 ;; Collapse group name leaving LEVELS uncollapsed elements
3457 (let* ((slist (split-string group "/"))
3458 (slen (length slist))
3459 (dlist (split-string group "\\."))
3460 (dlen (length dlist))
3472 (setq levels (- glen levels))
3474 (push (if (>= (decf levels) 0)
3475 (if (zerop (length g))
3480 (concat foreign (mapconcat 'identity (nreverse res) gsep))))))
3482 (defun gnus-narrow-to-body ()
3483 "Narrow to the body of an article."
3486 (goto-char (point-min))
3487 (or (search-forward "\n\n" nil t)
3493 ;;; Kill file handling.
3496 (defun gnus-apply-kill-file ()
3497 "Apply a kill file to the current newsgroup.
3498 Returns the number of articles marked as read."
3499 (if (or (file-exists-p (gnus-newsgroup-kill-file nil))
3500 (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
3501 (gnus-apply-kill-file-internal)
3504 (defun gnus-kill-save-kill-buffer ()
3505 (let ((file (gnus-newsgroup-kill-file gnus-newsgroup-name)))
3506 (when (get-file-buffer file)
3508 (set-buffer (get-file-buffer file))
3509 (when (buffer-modified-p)
3511 (kill-buffer (current-buffer))))))
3513 (defcustom gnus-kill-file-name "KILL"
3514 "Suffix of the kill files."
3515 :group 'gnus-score-kill
3516 :group 'gnus-score-files
3519 (defun gnus-newsgroup-kill-file (newsgroup)
3520 "Return the name of a kill file name for NEWSGROUP.
3521 If NEWSGROUP is nil, return the global kill file name instead."
3523 ;; The global KILL file is placed at top of the directory.
3524 ((or (null newsgroup)
3525 (string-equal newsgroup ""))
3526 (expand-file-name gnus-kill-file-name
3527 gnus-kill-files-directory))
3528 ;; Append ".KILL" to newsgroup name.
3529 ((gnus-use-long-file-name 'not-kill)
3530 (expand-file-name (concat (gnus-newsgroup-savable-name newsgroup)
3531 "." gnus-kill-file-name)
3532 gnus-kill-files-directory))
3533 ;; Place "KILL" under the hierarchical directory.
3535 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup)
3536 "/" gnus-kill-file-name)
3537 gnus-kill-files-directory))))
3541 (defun gnus-member-of-valid (symbol group)
3542 "Find out if GROUP has SYMBOL as part of its \"valid\" spec."
3544 (symbol-name (car (gnus-find-method-for-group group)))
3545 gnus-valid-select-methods)))
3547 (defun gnus-method-option-p (method option)
3548 "Return non-nil if select METHOD has OPTION as a parameter."
3549 (when (stringp method)
3550 (setq method (gnus-server-to-method method)))
3551 (memq option (assoc (format "%s" (car method))
3552 gnus-valid-select-methods)))
3554 (defun gnus-similar-server-opened (method)
3555 (let ((opened gnus-opened-servers))
3556 (while (and method opened)
3557 (when (and (equal (cadr method) (cadaar opened))
3558 (equal (car method) (caaar opened))
3559 (not (equal method (caar opened))))
3564 (defun gnus-server-extend-method (group method)
3565 ;; This function "extends" a virtual server. If the server is
3566 ;; "hello", and the select method is ("hello" (my-var "something"))
3567 ;; in the group "alt.alt", this will result in a new virtual server
3568 ;; called "hello+alt.alt".
3569 (if (or (not (inline (gnus-similar-server-opened method)))
3570 (not (cddr method)))
3572 `(,(car method) ,(concat (cadr method) "+" group)
3573 (,(intern (format "%s-address" (car method))) ,(cadr method))
3576 (defun gnus-server-status (method)
3577 "Return the status of METHOD."
3578 (nth 1 (assoc method gnus-opened-servers)))
3580 (defun gnus-group-name-to-method (group)
3581 "Guess a select method based on GROUP."
3582 (if (string-match ":" group)
3583 (let ((server (substring group 0 (match-beginning 0))))
3584 (if (string-match "\\+" server)
3585 (list (intern (substring server 0 (match-beginning 0)))
3586 (substring server (match-end 0)))
3587 (list (intern server) "")))
3588 gnus-select-method))
3590 (defun gnus-server-string (server)
3591 "Return a readable string that describes SERVER."
3592 (let* ((server (gnus-server-to-method server))
3593 (address (nth 1 server)))
3595 (not (zerop (length address))))
3596 (format "%s using %s" address (car server))
3597 (format "%s" (car server)))))
3599 (defun gnus-find-method-for-group (group &optional info)
3600 "Find the select method that GROUP uses."
3601 (or gnus-override-method
3604 (and (not (gnus-group-entry group));; a new group
3605 (gnus-group-name-to-method group))
3606 (let ((info (or info (gnus-get-info group)))
3609 (not (setq method (gnus-info-method info)))
3610 (equal method "native"))
3613 (cond ((stringp method)
3614 (inline (gnus-server-to-method method)))
3615 ((stringp (cadr method))
3616 (inline (gnus-server-extend-method group method)))
3619 (cond ((equal (cadr method) "")
3621 ((null (cadr method))
3622 (list (car method) ""))
3624 (gnus-server-add-address method)))))))
3626 (defun gnus-methods-using (feature)
3627 "Find all methods that have FEATURE."
3628 (let ((valids gnus-valid-select-methods)
3631 (when (memq feature (car valids))
3632 (push (car valids) outs))
3633 (setq valids (cdr valids)))
3636 (defun gnus-read-group (prompt &optional default)
3637 "Prompt the user for a group name.
3638 Disallow invalid group names."
3643 gnus-invalid-group-regexp
3644 (setq group (read-string (concat prefix prompt)
3645 (cons (or default "") 0)
3646 'gnus-group-history)))
3647 (setq prefix (format "Invalid group name: \"%s\". " group)
3651 (defun gnus-read-method (prompt)
3652 "Prompt the user for a method.
3653 Allow completion over sensible values."
3654 (let* ((open-servers
3655 (mapcar (lambda (i) (cons (format "%s:%s" (caar i) (cadar i)) i))
3656 gnus-opened-servers))
3659 (dolist (method gnus-valid-select-methods)
3660 (if (or (memq 'prompt-address method)
3661 (not (assoc (format "%s:" (car method)) open-servers)))
3662 (push method methods)))
3665 (append valid-methods
3667 gnus-predefined-server-alist
3672 nil t nil 'gnus-method-history)))
3675 (setq method gnus-select-method))
3676 ((assoc method gnus-valid-select-methods)
3677 (let ((address (if (memq 'prompt-address
3678 (assoc method gnus-valid-select-methods))
3679 (read-string "Address: ")
3681 (or (cadr (assoc (format "%s:%s" method address) open-servers))
3682 (list (intern method) address))))
3683 ((assoc method servers)
3686 (list (intern method) "")))))
3690 (defun gnus-agent-method-p (method)
3691 "Say whether METHOD is covered by the agent."
3692 (member method gnus-agent-covered-methods))
3694 (defun gnus-online (method)
3697 (eq (cadr (assoc method gnus-opened-servers)) 'offline)
3698 (gnus-agent-method-p method))))
3700 ;;; User-level commands.
3703 (defun gnus-slave-no-server (&optional arg)
3704 "Read network news as a slave, without connecting to the local server."
3706 (gnus-no-server arg t))
3709 (defun gnus-no-server (&optional arg slave)
3711 If ARG is a positive number, Gnus will use that as the startup
3712 level. If ARG is nil, Gnus will be started at level 2. If ARG is
3713 non-nil and not a positive number, Gnus will prompt the user for the
3714 name of an NNTP server to use.
3715 As opposed to `gnus', this command will not connect to the local
3718 (gnus-no-server-1 arg slave))
3721 (defun gnus-slave (&optional arg)
3722 "Read news as a slave."
3724 (gnus arg nil 'slave))
3726 (defcustom gnus-frame-properties nil
3727 "The properties of the frame in which gnus is displayed. Under XEmacs,
3728 the variable `toolbar-news-frame-plist' will be refered instead."
3729 :type '(repeat (cons :format "%v"
3730 (symbol :tag "Parameter")
3731 (sexp :tag "Value")))
3735 (defun gnus-other-frame (&optional arg display)
3736 "Pop up a frame to read news.
3737 This will call one of the Gnus commands which is specified by the user
3738 option `gnus-other-frame-function' (default `gnus') with the argument
3739 ARG if Gnus is not running, otherwise just pop up a Gnus frame. The
3740 optional second argument DISPLAY should be a standard display string
3741 such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is
3742 omitted or the function `make-frame-on-display' is not available, the
3743 current display is used."
3745 (if (fboundp 'make-frame-on-display)
3747 (setq display (gnus-frame-or-window-display-name (selected-frame))))
3749 (let ((alive (gnus-alive-p)))
3754 (when (and (or (not display)
3756 (gnus-frame-or-window-display-name
3758 (with-current-buffer (window-buffer window)
3759 (string-match "\\`gnus-"
3760 (symbol-name major-mode))))
3761 (gnus-select-frame-set-input-focus
3762 (setq gnus-other-frame-object (window-frame window)))
3763 (select-window window)
3766 (gnus-select-frame-set-input-focus
3767 (setq gnus-other-frame-object
3769 (make-frame-on-display display gnus-other-frame-parameters)
3770 (make-frame gnus-other-frame-parameters))))
3772 (switch-to-buffer gnus-group-buffer)
3773 (funcall gnus-other-frame-function arg)
3774 (add-hook 'gnus-exit-gnus-hook
3776 (when (and (frame-live-p gnus-other-frame-object)
3778 (delete-frame gnus-other-frame-object))
3779 (setq gnus-other-frame-object nil)))))))
3782 (defun gnus (&optional arg dont-connect slave)
3784 If ARG is non-nil and a positive number, Gnus will use that as the
3785 startup level. If ARG is non-nil and not a positive number, Gnus will
3786 prompt the user for the name of an NNTP server to use."
3788 (unless (byte-code-function-p (symbol-function 'gnus))
3789 (message "You should byte-compile Gnus")
3791 (gnus-1 arg dont-connect slave))
3793 ;; Allow redefinition of Gnus functions.
3797 (product-provide (provide 'gnus) 'gnus-vers)
3799 ;;; gnus.el ends here