(pgg-gpg-encrypt-region): Add --textmode to gpg args. From Mark D. Baushke.
[gnus] / lisp / gnus-win.el
1 ;;; gnus-win.el --- window configuration functions for Gnus
2
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;;   2005 Free Software Foundation, Inc.
5
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7 ;; Keywords: news
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
25
26 ;;; Commentary:
27
28 ;;; Code:
29
30 (eval-when-compile (require 'cl))
31
32 (require 'gnus)
33 (require 'gnus-util)
34
35 (defgroup gnus-windows nil
36   "Window configuration."
37   :group 'gnus)
38
39 (defcustom gnus-use-full-window t
40   "*If non-nil, use the entire Emacs screen."
41   :group 'gnus-windows
42   :type 'boolean)
43
44 (defvar gnus-window-configuration nil
45   "Obsolete variable.  See `gnus-buffer-configuration'.")
46
47 (defcustom gnus-window-min-width 2
48   "*Minimum width of Gnus buffers."
49   :group 'gnus-windows
50   :type 'integer)
51
52 (defcustom gnus-window-min-height 1
53   "*Minimum height of Gnus buffers."
54   :group 'gnus-windows
55   :type 'integer)
56
57 (defcustom gnus-always-force-window-configuration nil
58   "*If non-nil, always force the Gnus window configurations."
59   :group 'gnus-windows
60   :type 'boolean)
61
62 (defcustom gnus-use-frames-on-any-display nil
63   "*If non-nil, frames on all displays will be considered useable by Gnus.
64 When nil, only frames on the same display as the selected frame will be
65 used to display Gnus windows."
66   :version "22.1"
67   :group 'gnus-windows
68   :type 'boolean)
69
70 (defvar gnus-buffer-configuration
71   '((group
72      (vertical 1.0
73                (group 1.0 point)
74                (if gnus-carpal '(group-carpal 4))))
75     (summary
76      (vertical 1.0
77                (summary 1.0 point)
78                (if gnus-carpal '(summary-carpal 4))))
79     (article
80      (cond
81       (gnus-use-trees
82        '(vertical 1.0
83                   (summary 0.25 point)
84                   (tree 0.25)
85                   (article 1.0)))
86       (t
87        '(vertical 1.0
88                   (summary 0.25 point)
89                   (if gnus-carpal '(summary-carpal 4))
90                   (article 1.0)))))
91     (server
92      (vertical 1.0
93                (server 1.0 point)
94                (if gnus-carpal '(server-carpal 2))))
95     (browse
96      (vertical 1.0
97                (browse 1.0 point)
98                (if gnus-carpal '(browse-carpal 2))))
99     (message
100      (vertical 1.0
101                (message 1.0 point)))
102     (pick
103      (vertical 1.0
104                (article 1.0 point)))
105     (info
106      (vertical 1.0
107                (info 1.0 point)))
108     (summary-faq
109      (vertical 1.0
110                (summary 0.25)
111                (faq 1.0 point)))
112     (edit-article
113      (vertical 1.0
114                (article 1.0 point)))
115     (edit-form
116      (vertical 1.0
117                (group 0.5)
118                (edit-form 1.0 point)))
119     (edit-score
120      (vertical 1.0
121                (summary 0.25)
122                (edit-score 1.0 point)))
123     (post
124      (vertical 1.0
125                (post 1.0 point)))
126     (reply
127      (vertical 1.0
128                (article 0.5)
129                (message 1.0 point)))
130     (forward
131      (vertical 1.0
132                (message 1.0 point)))
133     (reply-yank
134      (vertical 1.0
135                (message 1.0 point)))
136     (mail-bounce
137      (vertical 1.0
138                (article 0.5)
139                (message 1.0 point)))
140     (pipe
141      (vertical 1.0
142                (summary 0.25 point)
143                (if gnus-carpal '(summary-carpal 4))
144                ("*Shell Command Output*" 1.0)))
145     (bug
146      (vertical 1.0
147                (if gnus-bug-create-help-buffer '("*Gnus Help Bug*" 0.5))
148                ("*Gnus Bug*" 1.0 point)))
149     (score-trace
150      (vertical 1.0
151                (summary 0.5 point)
152                ("*Score Trace*" 1.0)))
153     (score-words
154      (vertical 1.0
155                (summary 0.5 point)
156                ("*Score Words*" 1.0)))
157     (split-trace
158      (vertical 1.0
159                (summary 0.5 point)
160                ("*Split Trace*" 1.0)))
161     (category
162      (vertical 1.0
163                (category 1.0)))
164     (compose-bounce
165      (vertical 1.0
166                (article 0.5)
167                (message 1.0 point)))
168     (display-term
169      (vertical 1.0
170                ("*display*" 1.0)))
171     (mml-preview
172      (vertical 1.0
173                (message 0.5)
174                (mml-preview 1.0 point))))
175   "Window configuration for all possible Gnus buffers.
176 See the Gnus manual for an explanation of the syntax used.")
177
178 (defvar gnus-window-to-buffer
179   '((group . gnus-group-buffer)
180     (summary . gnus-summary-buffer)
181     (article . gnus-article-buffer)
182     (server . gnus-server-buffer)