1 ;;; gnus.el --- a newsreader for GNU Emacs
2 ;; Copyright (C) 1987,88,89,90,93,94,95,96,97 Free Software Foundation, Inc.
4 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
5 ;; Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
29 (eval '(run-hooks 'gnus-load-hook))
35 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
38 (defgroup gnus-start nil
39 "Starting your favorite newsreader."
42 (defgroup gnus-start-server nil
43 "Server options at startup."
46 ;; These belong to gnus-group.el.
47 (defgroup gnus-group nil
49 :link '(custom-manual "(gnus)The Group Buffer")
52 (defgroup gnus-group-foreign nil
54 :link '(custom-manual "(gnus)Foreign Groups")
57 (defgroup gnus-group-new nil
58 "Automatic subscription of new groups."
61 (defgroup gnus-group-levels nil
63 :link '(custom-manual "(gnus)Group Levels")
66 (defgroup gnus-group-select nil
68 :link '(custom-manual "(gnus)Selecting a Group")
71 (defgroup gnus-group-listing nil
72 "Showing slices of the group list."
73 :link '(custom-manual "(gnus)Listing Groups")
76 (defgroup gnus-group-visual nil
77 "Sorting the group buffer."
78 :link '(custom-manual "(gnus)Group Buffer Format")
82 (defgroup gnus-group-various nil
83 "Various group options."
84 :link '(custom-manual "(gnus)Scanning New Messages")
87 ;; These belong to gnus-sum.el.
88 (defgroup gnus-summary nil
90 :link '(custom-manual "(gnus)The Summary Buffer")
93 (defgroup gnus-summary-exit nil
94 "Leaving summary buffers."
95 :link '(custom-manual "(gnus)Exiting the Summary Buffer")
98 (defgroup gnus-summary-marks nil
99 "Marks used in summary buffers."
100 :link '(custom-manual "(gnus)Marking Articles")
101 :group 'gnus-summary)
103 (defgroup gnus-thread nil
104 "Ordering articles according to replies."
105 :link '(custom-manual "(gnus)Threading")
106 :group 'gnus-summary)
108 (defgroup gnus-summary-format nil
109 "Formatting of the summary buffer."
110 :link '(custom-manual "(gnus)Summary Buffer Format")
111 :group 'gnus-summary)
113 (defgroup gnus-summary-choose nil
115 :link '(custom-manual "(gnus)Choosing Articles")
116 :group 'gnus-summary)
118 (defgroup gnus-summary-maneuvering nil
119 "Summary movement commands."
120 :link '(custom-manual "(gnus)Summary Maneuvering")
121 :group 'gnus-summary)
123 (defgroup gnus-summary-mail nil
124 "Mail group commands."
125 :link '(custom-manual "(gnus)Mail Group Commands")
126 :group 'gnus-summary)
128 (defgroup gnus-summary-sort nil
129 "Sorting the summary buffer."
130 :link '(custom-manual "(gnus)Sorting")
131 :group 'gnus-summary)
133 (defgroup gnus-summary-visual nil
134 "Highlighting and menus in the summary buffer."
135 :link '(custom-manual "(gnus)Summary Highlighting")
137 :group 'gnus-summary)
139 (defgroup gnus-summary-various nil
140 "Various summary buffer options."
141 :link '(custom-manual "(gnus)Various Summary Stuff")
142 :group 'gnus-summary)
144 ;; Belongs to gnus-uu.el
145 (defgroup gnus-extract-view nil
146 "Viewing extracted files."
147 :link '(custom-manual "(gnus)Viewing Files")
148 :group 'gnus-extract)
150 ;; Belongs to gnus-score.el
151 (defgroup gnus-score nil
152 "Score and kill file handling."
155 (defgroup gnus-score-kill nil
159 (defgroup gnus-score-adapt nil
160 "Adaptive score files."
163 (defgroup gnus-score-default nil
164 "Default values for score files."
167 (defgroup gnus-score-expire nil
168 "Expiring score rules."
171 (defgroup gnus-score-decay nil
172 "Decaying score rules."
175 (defgroup gnus-score-files nil
176 "Score and kill file names."
180 (defgroup gnus-score-various nil
181 "Various scoring and killing options."
185 (defgroup gnus-visual nil
186 "Options controling the visual fluff."
189 (defgroup gnus-files nil
190 "Files used by Gnus."
193 (defgroup gnus-dribble-file nil
195 :link '(custom-manual "(gnus)Auto Save")
198 (defgroup gnus-newsrc nil
199 "Storing Gnus state."
202 (defgroup gnus-server nil
203 "Options related to newsservers and other servers used by Gnus."
206 (defgroup gnus-message '((message custom-group))
207 "Composing replies and followups in Gnus."
210 (defgroup gnus-meta nil
211 "Meta variables controling major portions of Gnus.
212 In general, modifying these variables does not take affect until Gnus
213 is restarted, and sometimes reloaded."
216 (defgroup gnus-various nil
217 "Other Gnus options."
218 :link '(custom-manual "(gnus)Various Various")
221 (defgroup gnus-exit nil
223 :link '(custom-manual "(gnus)Exiting Gnus")
226 (defconst gnus-version-number "5.4.16"
227 "Version number for this version of Gnus.")
229 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
230 "Version string for this version of Gnus.")
232 (defcustom gnus-inhibit-startup-message nil
233 "If non-nil, the startup message will not be displayed.
234 This variable is used before `.gnus.el' is loaded, so it should
235 be set in `.emacs' instead."
239 (defcustom gnus-play-startup-jingle nil
240 "If non-nil, play the Gnus jingle at startup."
244 ;;; Kludges to help the transition from the old `custom.el'.
246 (unless (featurep 'gnus-xmas)
247 (defalias 'gnus-make-overlay 'make-overlay)
248 (defalias 'gnus-overlay-put 'overlay-put)
249 (defalias 'gnus-move-overlay 'move-overlay)
250 (defalias 'gnus-overlay-end 'overlay-end)
251 (defalias 'gnus-extent-detached-p 'ignore)
252 (defalias 'gnus-extent-start-open 'ignore)
253 (defalias 'gnus-set-text-properties 'set-text-properties)
254 (defalias 'gnus-group-remove-excess-properties 'ignore)
255 (defalias 'gnus-topic-remove-excess-properties 'ignore)
256 (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
257 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
258 (defalias 'gnus-add-hook 'add-hook)
259 (defalias 'gnus-character-to-event 'identity)
260 (defalias 'gnus-add-text-properties 'add-text-properties)
261 (defalias 'gnus-put-text-property 'put-text-property)
262 (defalias 'gnus-mode-line-buffer-identification 'identity)
263 (defalias 'gnus-characterp 'numberp)
264 (defalias 'gnus-key-press-event-p 'numberp))
266 ;; The XEmacs people think this is evil, so it must go.
267 (defun custom-face-lookup (&optional fg bg stipple bold italic underline)
268 "Lookup or create a face with specified attributes."
269 (let ((name (intern (format "custom-face-%s-%s-%s-%S-%S-%S"
272 (or stipple "default")
273 bold italic underline))))
274 (if (and (custom-facep name)
275 (fboundp 'make-face))
277 (copy-face 'default name)
279 (not (string-equal fg "default")))
281 (set-face-foreground name fg)))
283 (not (string-equal bg "default")))
285 (set-face-background name bg)))
287 (not (string-equal stipple "default"))
288 (not (eq stipple 'custom:asis))
289 (fboundp 'set-face-stipple))
290 (set-face-stipple name stipple))
292 (not (eq bold 'custom:asis)))
294 (make-face-bold name)))
296 (not (eq italic 'custom:asis)))
298 (make-face-italic name)))
300 (not (eq underline 'custom:asis)))
302 (set-face-underline-p name t))))
305 ;; We define these group faces here to avoid the display
306 ;; update forced when creating new faces.
308 (defface gnus-group-news-1-face
311 (:foreground "PaleTurquoise" :bold t))
314 (:foreground "ForestGreen" :bold t))
317 "Level 1 newsgroup face.")
319 (defface gnus-group-news-1-empty-face
322 (:foreground "PaleTurquoise"))
325 (:foreground "ForestGreen"))
328 "Level 1 empty newsgroup face.")
330 (defface gnus-group-news-2-face
333 (:foreground "turquoise" :bold t))
336 (:foreground "CadetBlue4" :bold t))
339 "Level 2 newsgroup face.")
341 (defface gnus-group-news-2-empty-face
344 (:foreground "turquoise"))
347 (:foreground "CadetBlue4"))
350 "Level 2 empty newsgroup face.")
352 (defface gnus-group-news-3-face
361 "Level 3 newsgroup face.")
363 (defface gnus-group-news-3-empty-face
372 "Level 3 empty newsgroup face.")
374 (defface gnus-group-news-low-face
377 (:foreground "DarkTurquoise" :bold t))
380 (:foreground "DarkGreen" :bold t))
383 "Low level newsgroup face.")
385 (defface gnus-group-news-low-empty-face
388 (:foreground "DarkTurquoise"))
391 (:foreground "DarkGreen"))
394 "Low level empty newsgroup face.")
396 (defface gnus-group-mail-1-face
399 (:foreground "aquamarine1" :bold t))
402 (:foreground "DeepPink3" :bold t))
405 "Level 1 mailgroup face.")
407 (defface gnus-group-mail-1-empty-face
410 (:foreground "aquamarine1"))
413 (:foreground "DeepPink3"))
415 (:italic t :bold t)))
416 "Level 1 empty mailgroup face.")
418 (defface gnus-group-mail-2-face
421 (:foreground "aquamarine2" :bold t))
424 (:foreground "HotPink3" :bold t))
427 "Level 2 mailgroup face.")
429 (defface gnus-group-mail-2-empty-face
432 (:foreground "aquamarine2"))
435 (:foreground "HotPink3"))
438 "Level 2 empty mailgroup face.")
440 (defface gnus-group-mail-3-face
443 (:foreground "aquamarine3" :bold t))
446 (:foreground "magenta4" :bold t))
449 "Level 3 mailgroup face.")
451 (defface gnus-group-mail-3-empty-face
454 (:foreground "aquamarine3"))
457 (:foreground "magenta4"))
460 "Level 3 empty mailgroup face.")
462 (defface gnus-group-mail-low-face
465 (:foreground "aquamarine4" :bold t))
468 (:foreground "DeepPink4" :bold t))
471 "Low level mailgroup face.")
473 (defface gnus-group-mail-low-empty-face
476 (:foreground "aquamarine4"))
479 (:foreground "DeepPink4"))
482 "Low level empty mailgroup face.")
484 ;; Summary mode faces.
486 (defface gnus-summary-selected-face '((t
488 "Face used for selected articles.")
490 (defface gnus-summary-cancelled-face
492 (:foreground "yellow" :background "black")))
493 "Face used for cancelled articles.")
495 (defface gnus-summary-high-ticked-face
498 (:foreground "pink" :bold t))
501 (:foreground "firebrick" :bold t))
504 "Face used for high interest ticked articles.")
506 (defface gnus-summary-low-ticked-face
509 (:foreground "pink" :italic t))
512 (:foreground "firebrick" :italic t))
515 "Face used for low interest ticked articles.")
517 (defface gnus-summary-normal-ticked-face
520 (:foreground "pink"))
523 (:foreground "firebrick"))
526 "Face used for normal interest ticked articles.")
528 (defface gnus-summary-high-ancient-face
531 (:foreground "SkyBlue" :bold t))
534 (:foreground "RoyalBlue" :bold t))
537 "Face used for high interest ancient articles.")
539 (defface gnus-summary-low-ancient-face
542 (:foreground "SkyBlue" :italic t))
545 (:foreground "RoyalBlue" :italic t))
548 "Face used for low interest ancient articles.")
550 (defface gnus-summary-normal-ancient-face
553 (:foreground "SkyBlue"))
556 (:foreground "RoyalBlue"))
559 "Face used for normal interest ancient articles.")
561 (defface gnus-summary-high-unread-face
564 "Face used for high interest unread articles.")
566 (defface gnus-summary-low-unread-face
569 "Face used for low interest unread articles.")
571 (defface gnus-summary-normal-unread-face
574 "Face used for normal interest unread articles.")
576 (defface gnus-summary-high-read-face
579 (:foreground "PaleGreen"
583 (:foreground "DarkGreen"
587 "Face used for high interest read articles.")
589 (defface gnus-summary-low-read-face
592 (:foreground "PaleGreen"
596 (:foreground "DarkGreen"
600 "Face used for low interest read articles.")
602 (defface gnus-summary-normal-read-face
605 (:foreground "PaleGreen"))