Look for the "imaps" entry in the .authinfo if we're using ssl connection.
[gnus] / lisp / gnus-topic.el
1 ;;; gnus-topic.el --- a folding minor mode for Gnus group buffers
2
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 ;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5
6 ;; Author: Ilja Weis <kult@uni-paderborn.de>
7 ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>
8 ;; Keywords: news
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
24
25 ;;; Commentary:
26
27 ;;; Code:
28
29 (eval-when-compile (require 'cl))
30
31 (require 'gnus)
32 (require 'gnus-group)
33 (require 'gnus-start)
34 (require 'gnus-util)
35
36 (defgroup gnus-topic nil
37   "Group topics."
38   :group 'gnus-group)
39
40 (defvar gnus-topic-mode nil
41   "Minor mode for Gnus group buffers.")
42
43 (defcustom gnus-topic-mode-hook nil
44   "Hook run in topic mode buffers."
45   :type 'hook
46   :group 'gnus-topic)
47
48 (when (featurep 'xemacs)
49   (add-hook 'gnus-topic-mode-hook 'gnus-xmas-topic-menu-add))
50
51 (defcustom gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n"
52   "Format of topic lines.
53 It works along the same lines as a normal formatting string,
54 with some simple extensions.
55
56 %i  Indentation based on topic level.
57 %n  Topic name.
58 %v  Nothing if the topic is visible, \"...\" otherwise.
59 %g  Number of groups in the topic.
60 %a  Number of unread articles in the groups in the topic.
61 %A  Number of unread articles in the groups in the topic and its subtopics.
62
63 General format specifiers can also be used.
64 See Info node `(gnus)Formatting Variables'."
65   :link '(custom-manual "(gnus)Formatting Variables")
66   :type 'string
67   :group 'gnus-topic)
68
69 (defcustom gnus-topic-indent-level 2
70   "*How much each subtopic should be indented."
71   :type 'integer
72   :group 'gnus-topic)
73
74 (defcustom gnus-topic-display-empty-topics t
75   "*If non-nil, display the topic lines even of topics that have no unread articles."
76   :type 'boolean
77   :group 'gnus-topic)
78
79 ;; Internal variables.
80
81 (defvar gnus-topic-active-topology nil)
82 (defvar gnus-topic-active-alist nil)
83 (defvar gnus-topic-unreads nil)
84
85 (defvar gnus-topology-checked-p nil
86   "Whether the topology has been checked in this session.")
87
88 (defvar gnus-topic-killed-topics nil)
89 (defvar gnus-topic-inhibit-change-level nil)
90
91 (defconst gnus-topic-line-format-alist
92   `((?n name ?s)
93     (?v visible ?s)
94     (?i indentation ?s)