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-window-center-line -2
69 "Line number of center point in window when scrolling.
70 If nil, erases the entire frame and then redraws with point in the
71 center of the window. Negative means relative to bottom of window.
72 See the document of the function `recenter'."
76 (defcustom riece-directory (expand-file-name "~/.riece")
77 "Where to look for startup files."
79 :group 'riece-options)
81 (defcustom riece-addon-directory
82 (expand-file-name "addons" riece-directory)
83 "Where to look for add-on files."
85 :group 'riece-options)
87 (defcustom riece-data-directory
88 (if (fboundp 'locate-data-directory)
89 (locate-data-directory "riece")
90 (file-name-directory load-file-name))
91 "Where to look for data files."
93 :group 'riece-options)
95 (defcustom riece-variables-file
96 (expand-file-name "init" riece-directory)
97 "Where to look for variables."
99 :group 'riece-options)
101 (defcustom riece-saved-variables-file
102 (expand-file-name "save" riece-directory)
103 "Where to look for variables.
104 This file was saved the last session."
106 :group 'riece-options)
108 (defcustom riece-variables-files
109 (list riece-saved-variables-file riece-variables-file)
110 "Where to look for variables. Helps to remove clutter from your .emacs.
111 This feature is most likely to dissappear in near future. The preferred
112 way is to put Riece variables on .emacs or file loaded from there."
113 :type '(repeat (file :tag "Initialization File"))
114 :group 'riece-options)
116 (defcustom riece-addons '(riece-highlight
133 "Add-ons insinuated into Riece."
134 :type '(repeat symbol)
135 :group 'riece-options)
137 (defgroup riece-server nil
142 (defgroup riece-channel nil
147 (defgroup riece-coding nil
153 (defcustom riece-default-coding-system
155 (cons 'ctext 'iso-2022-jp-2))
156 "Coding system for process I/O.
157 The value is a coding system, or a cons cell (DECODING . ENCODING)
158 specifying the coding systems for decoding and encoding respectively."
159 :type '(choice (symbol :tag "Coding system")
160 (cons (symbol :tag "Input coding system")
161 (symbol :tag "Output coding system"))
162 (const nil :tag "No conversion"))
163 :group 'riece-coding)
165 (defcustom riece-server-alist nil
166 "An alist mapping server names to plist."
169 (string :tag "Server")
170 (list :inline t :tag "Host"
172 (const :tag "" :value :host)
174 (repeat :inline t :tag "Options"
175 (choice :inline t :value nil
176 (list :inline t :tag "Port"
178 (const :tag "" :value :service)
179 (choice (const :tag "Default" 6667)
182 (list :inline t :tag "Nickname"
184 (const :tag "" :value :nickname)
185 (choice (const :tag "Default" riece-nickname)
187 (list :inline t :tag "Realname"
189 (const :tag "" :value :realname)
190 (choice (const :tag "Default" riece-realname)
192 (list :inline t :tag "Username"
194 (const :tag "" :value :username)
195 (choice (const :tag "Default" riece-username)
197 (list :inline t :tag "Password"
199 (const :tag "" :value :password)
201 (list :inline t :tag "Function"
203 (const :tag "" :value :function)
205 (const :tag "Default"
206 riece-default-open-connection-function)
208 (list :inline t :tag "Coding system"
210 (const :tag "" :value :coding)
212 (const :tag "Default"
213 riece-default-coding-system)
215 (symbol :tag "Coding system")
216 (cons (symbol :tag "Input coding system")
217 (symbol :tag "Output coding system"))
218 (const nil :tag "No conversion"))))))))
219 :group 'riece-server)
221 (defcustom riece-server (getenv "IRCSERVER")
222 "IRC server host we are connecting to."
224 :group 'riece-server)
226 (defcustom riece-protocol 'irc
229 :group 'riece-server)
231 (defcustom riece-max-send-size 512
232 "Maximum size of messages to be sent at a time."
234 :group 'riece-server)
236 (defcustom riece-send-delay 2
237 "Duration of multiple send."
239 :group 'riece-server)
241 (defcustom riece-default-password (getenv "IRCPASSWORD")
243 :type '(radio (string :tag "Password")
244 (const :tag "No" nil))
245 :group 'riece-server)
247 (defcustom riece-username nil
250 :group 'riece-server)
252 (defcustom riece-realname nil
255 :group 'riece-server)
257 (defcustom riece-nickname (or (getenv "IRCNICK")
258 (user-real-login-name))
261 :group 'riece-server)
263 (defcustom riece-startup-channel-list nil
264 "A list of channels to join automatically at startup."
265 :type '(repeat (choice (string :tag "Channel")
266 (list (string :tag "Channel") (string :tag "Key"))))
267 :group 'riece-channel)
269 (defcustom riece-startup-server-list nil
270 "A list of servers to connect automatically at startup."
271 :type '(repeat (string :tag "Server"))
272 :group 'riece-server)
274 (defcustom riece-retry-with-new-nickname nil
275 "When nickname has already been in use, grow-tail automatically."
277 :group 'riece-server)
279 (defcustom riece-quit-timeout 1
280 "Quit timeout when there is no response from server."
281 :type '(radio (integer :tag "Seconds")
283 :group 'riece-server)
285 (defcustom riece-default-open-connection-function #'open-network-stream
286 "Default function used for connecting to an IRC server."
288 :group 'riece-server)
290 (defcustom riece-user-cache-max-size 512
291 "Maximum size of cache of user names."
293 :group 'riece-server)
295 (defcustom riece-channel-cache-max-size 512
296 "Maximum size of cache of channel names."
298 :group 'riece-server)
300 (defcustom riece-channel-buffer-mode t
301 "When non-nil, Riece will display a channel buffer."
305 (defcustom riece-others-buffer-mode t
306 "When non-nil, Riece will display an \"*Others*\" buffer."
310 (defcustom riece-user-list-buffer-mode t
311 "When non-nil, Riece will display a nick list buffer."
315 (defcustom riece-channel-list-buffer-mode t
316 "When non-nil, Riece will display a channel list buffer."
320 (defcustom riece-default-freeze nil
321 "Channel buffer local freeze flag is on at starting."
325 (defcustom riece-default-channel-binding nil
326 "The channel list to bind the channel number when joining."
327 :type '(repeat (radio (string :tag "Bound Channel")
329 :group 'riece-channel)
331 (defcustom riece-blink-parens nil
332 "Should we blink matching parenthesis in the command buffer?"
334 :group 'riece-options)
336 (defcustom riece-quit-message (riece-extended-version)
337 "Default quit message."
338 :type '(string :tag "Quit message")
339 :group 'riece-options)
341 (defcustom riece-part-message nil
342 "Default part message."
343 :type '(choice (const :tag "No message" nil)
344 (string :tag "Part message"))
345 :group 'riece-options)
347 (defcustom riece-away-message "Gone"
348 "Default away message."
349 :type '(string :tag "Away message")
350 :group 'riece-options)
352 (defcustom riece-gather-channel-modes nil
353 "If non-nil, gather channel modes when we join a channel."
355 :group 'riece-options)
357 (defcustom riece-buffer-dispose-function #'kill-buffer
358 "Function called after the buffer was disposed."
360 :group 'riece-options)
362 (defcustom riece-format-time-function #'current-time-string
363 "Function to convert the specified time to the human readable form."
365 :group 'riece-options)
367 (provide 'riece-options)
369 ;;; riece-options.el ends here