1 ;;; riece-options.el --- customization
2 ;; Copyright (C) 1998-2003 Daiki Ueno
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Keywords: IRC, riece
8 ;; This file is part of Riece.
10 ;; This program 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 ;; This program 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., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA.
27 (require 'riece-version)
28 (require 'riece-globals)
30 ;; User modifiable variables.
32 "Riece specific customize group."
36 (defgroup riece-options nil
37 "Riece user customizable variables."
41 (defcustom riece-saved-forms
43 riece-channel-buffer-mode
44 riece-others-buffer-mode
45 riece-user-list-buffer-mode
46 riece-channel-list-buffer-mode
49 "Variables saved after each session is completed."
51 :group 'riece-options)
53 (defcustom riece-debug nil
54 "If non-nil, random debug spews."
56 :group 'riece-options)
58 (defcustom riece-command-prefix "\C-c"
59 "Key sequence to be used as prefix for command mode key bindings."
61 :group 'riece-options)
63 (defgroup riece-looks nil
68 (defcustom riece-use-full-window t
69 "If non-nil, whole Emacs window is used to display dialogue."
73 (defcustom riece-window-center-line -2
74 "Line number of center point in window when scrolling.
75 If nil, erases the entire frame and then redraws with point in the
76 center of the window. Negative means relative to bottom of window.
77 See the document of the function `recenter'."
81 (defcustom riece-directory (expand-file-name "~/.riece")
82 "Where to look for startup files."
84 :group 'riece-options)
86 (defcustom riece-addon-directory
87 (expand-file-name "addons" riece-directory)
88 "Where to look for add-on files."
90 :group 'riece-options)
92 (defcustom riece-data-directory
93 (if (fboundp 'locate-data-directory)
94 (locate-data-directory "riece")
95 (file-name-directory load-file-name))
96 "Where to look for data files."
98 :group 'riece-options)
100 (defcustom riece-variables-file
101 (expand-file-name "init" riece-directory)
102 "Where to look for variables."
104 :group 'riece-options)
106 (defcustom riece-saved-variables-file
107 (expand-file-name "save" riece-directory)
108 "Where to look for variables.
109 This file was saved the last session."
111 :group 'riece-options)
113 (defcustom riece-variables-files
114 (list riece-saved-variables-file riece-variables-file)
115 "Where to look for variables. Helps to remove clutter from your .emacs.
116 This feature is most likely to dissappear in near future. The preferred
117 way is to put Riece variables on .emacs or file loaded from there."
118 :type '(repeat (file :tag "Initialization File"))
119 :group 'riece-options)
121 (defcustom riece-addons '(riece-highlight
138 "Add-ons insinuated into Riece."
139 :type '(repeat symbol)
140 :group 'riece-options)
142 (defgroup riece-server nil
147 (defgroup riece-channel nil
152 (defgroup riece-coding nil
158 (defcustom riece-default-coding-system
160 (cons 'ctext 'iso-2022-jp-2))
161 "Coding system for process I/O.
162 The value is a coding system, or a cons cell (DECODING . ENCODING)
163 specifying the coding systems for decoding and encoding respectively."
164 :type '(choice (symbol :tag "Coding system")
165 (cons (symbol :tag "Input coding system")
166 (symbol :tag "Output coding system"))
167 (const nil :tag "No conversion"))
168 :group 'riece-coding)
170 (defcustom riece-server-alist nil
171 "An alist mapping server names to plist."
174 (string :tag "Server")
175 (list :inline t :tag "Host"
177 (const :tag "" :value :host)
179 (repeat :inline t :tag "Options"
180 (choice :inline t :value nil
181 (list :inline t :tag "Port"
183 (const :tag "" :value :service)
184 (choice (const :tag "Default" 6667)
186 (list :inline t :tag "Nickname"
188 (const :tag "" :value :nickname)
189 (choice (const :tag "Default" riece-nickname)
191 (list :inline t :tag "Realname"
193 (const :tag "" :value :realname)
194 (choice (const :tag "Default" riece-realname)
196 (list :inline t :tag "Username"
198 (const :tag "" :value :host)
199 (choice (const :tag "Default" riece-username)
201 (list :inline t :tag "Password"
203 (const :tag "" :value :host)
205 (list :inline t :tag "Function"
207 (const :tag "" :value :host)
209 (const :tag "Default"
210 riece-default-open-connection-function)
212 (list :inline t :tag "Coding system"
214 (const :tag "" :value :host)
216 (const :tag "Default"
217 riece-default-coding-system)
219 (symbol :tag "Coding system")
220 (cons (symbol :tag "Input coding system")
221 (symbol :tag "Output coding system"))
222 (const nil :tag "No conversion"))))))))
223 :group 'riece-server)
225 (defcustom riece-server (getenv "IRCSERVER")
226 "IRC server host we are connecting to."
228 :group 'riece-server)
230 (defcustom riece-protocol 'irc
233 :group 'riece-server)
235 (defcustom riece-max-send-size 512
236 "Maximum size of messages to be sent at a time."
238 :group 'riece-server)
240 (defcustom riece-send-delay 2
241 "Duration of multiple send."
243 :group 'riece-server)
245 (defcustom riece-default-password (getenv "IRCPASSWORD")
247 :type '(radio (string :tag "Password")
248 (const :tag "No" nil))
249 :group 'riece-server)
251 (defcustom riece-username nil
254 :group 'riece-server)
256 (defcustom riece-realname nil
259 :group 'riece-server)
261 (defcustom riece-nickname (or (getenv "IRCNICK")
262 (user-real-login-name))
265 :group 'riece-server)
267 (defcustom riece-startup-channel-list nil
268 "A list of channels to join automatically at startup."
269 :type '(repeat (choice (string :tag "Channel")
270 (list (string :tag "Channel") (string :tag "Key"))))
271 :group 'riece-channel)
273 (defcustom riece-startup-server-list nil
274 "A list of servers to connect automatically at startup."
275 :type '(repeat (string :tag "Server"))
276 :group 'riece-server)
278 (defcustom riece-retry-with-new-nickname nil
279 "When nickname has already been in use, grow-tail automatically."
281 :group 'riece-server)
283 (defcustom riece-quit-timeout 1
284 "Quit timeout when there is no response from server."
285 :type '(radio (integer :tag "Seconds")
287 :group 'riece-server)
289 (defcustom riece-default-open-connection-function #'open-network-stream
290 "Default function used for connecting to an IRC server."
292 :group 'riece-server)
294 (defcustom riece-user-cache-max-size 512
295 "Maximum size of cache of user names."
297 :group 'riece-server)
299 (defcustom riece-channel-cache-max-size 512
300 "Maximum size of cache of channel names."
302 :group 'riece-server)
304 (defcustom riece-channel-buffer-mode t
305 "When non-nil, Riece will display a channel buffer."
309 (defcustom riece-others-buffer-mode t
310 "When non-nil, Riece will display an \"*Others*\" buffer."
314 (defcustom riece-user-list-buffer-mode t
315 "When non-nil, Riece will display a nick list buffer."
319 (defcustom riece-channel-list-buffer-mode t
320 "When non-nil, Riece will display a channel list buffer."
324 (defcustom riece-default-freeze nil
325 "Channel buffer local freeze flag is on at starting."
329 (defcustom riece-default-channel-binding nil
330 "The channel list to bind the channel number when joining."
331 :type '(repeat (radio (string :tag "Bound Channel")
333 :group 'riece-channel)
335 (defcustom riece-blink-parens nil
336 "Should we blink matching parenthesis in the command buffer?"
338 :group 'riece-options)
340 (defcustom riece-quit-message (riece-extended-version)
341 "Default quit message."
342 :type '(string :tag "Quit message")
343 :group 'riece-options)
345 (defcustom riece-part-message nil
346 "Default part message."
347 :type '(choice (const :tag "No message" nil)
348 (string :tag "Part message"))
349 :group 'riece-options)
351 (defcustom riece-away-message "Gone"
352 "Default away message."
353 :type '(string :tag "Away message")
354 :group 'riece-options)
356 (defcustom riece-gather-channel-modes nil
357 "If non-nil, gather channel modes when we join a channel."
359 :group 'riece-options)
361 (defcustom riece-buffer-dispose-function #'kill-buffer
362 "Function called after the buffer was disposed."
364 :group 'riece-options)
366 (defcustom riece-format-time-function #'current-time-string
367 "Function to convert the specified time to the human readable form."
369 :group 'riece-options)
371 (provide 'riece-options)
373 ;;; riece-options.el ends here