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., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 (require 'riece-version)
28 (require 'riece-globals)
30 ;; User modifiable variables.
32 "Riece specific customize group")
34 (defgroup riece-options nil
35 "Riece user customizable variables"
39 (defcustom riece-saved-forms
41 riece-channel-buffer-mode
42 riece-user-list-buffer-mode
44 "Variables saved after each session is completed."
46 :group 'riece-options)
48 (defcustom riece-debug nil
49 "If non-nil, random debug spews."
51 :group 'riece-options)
53 (defcustom riece-command-prefix "\C-c"
54 "Key sequence to be used as prefix for command mode key bindings."
56 :group 'riece-options)
58 (defgroup riece-looks nil
59 "Related to look and feel"
63 (defcustom riece-use-full-window t
64 "If non-nil, whole Emacs window is used to display dialogue."
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 data 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-variables-file
88 (expand-file-name "init" riece-directory)
89 "Where to look for variables."
91 :group 'riece-options)
93 (defcustom riece-saved-variables-file
94 (expand-file-name "save" riece-directory)
95 "Where to look for variables.
96 This file was saved the last session."
98 :group 'riece-options)
100 (defcustom riece-variables-files
101 (list riece-saved-variables-file riece-variables-file)
102 "Where to look for variables. Helps to remove clutter from your .emacs.
103 This feature is most likely to dissappear in near future. The preferred
104 way is to put Riece variables on .emacs or file loaded from there."
105 :type '(repeat (file :tag "Initialization File"))
106 :group 'riece-options)
108 (defcustom riece-addons '(riece-highlight
118 "Add-ons insinuated into Riece."
119 :type '(repeat symbol)
120 :group 'riece-options)
122 (defgroup riece-server nil
127 (defgroup riece-channel nil
132 (define-widget 'riece-service-spec 'radio
133 "Edit service spec entries"
134 :convert-widget 'riece-service-spec-convert)
136 (defun riece-service-spec-convert (widget)
137 (widget-put widget :args '((integer :tag "Port Number")
138 (string :tag "Name")))
141 (define-widget 'riece-server-spec 'repeat
142 "Edit server spec entries"
143 :match (lambda (widget value)
144 (eval `(and ,@(mapcar
146 (or (stringp (cdr entry))
147 (listp (cdr entry))))
149 :convert-widget 'riece-server-spec-convert)
151 (defun riece-server-spec-convert (widget)
152 (let* ((host '(const :format "" :value :host))
153 (service '(const :format "" :value :service))
155 `(group :inline t ,host (string :tag "Host")))
157 `(group :inline t ,service riece-service-spec))
159 `(cons (string :tag "Name")
160 (radio (string :tag "Host")
161 (list ,host ,service))))
163 (widget-put widget :args args)
166 (defcustom riece-server-alist nil
167 "An alist mapping server names to plist."
168 :type 'riece-server-spec
169 :group 'riece-server)
171 (defcustom riece-server (getenv "IRCSERVER")
172 "IRC server host we are connecting to."
174 :group 'riece-server)
176 (defcustom riece-protocol 'irc
179 :group 'riece-server)
181 (defcustom riece-max-send-size 512
182 "Maximum size of messages to be sent at a time."
184 :group 'riece-server)
186 (defcustom riece-send-delay 2
187 "Duration of multiple send."
189 :group 'riece-server)
191 (defcustom riece-default-password (getenv "IRCPASSWORD")
193 :type '(radio (string :tag "Password")
194 (const :tag "No" nil))
195 :group 'riece-server)
197 (defcustom riece-username (or (getenv "IRCNAME")
198 (user-real-login-name))
201 :group 'riece-server)
203 (defcustom riece-nickname (or (getenv "IRCNICK")
204 (user-real-login-name))
207 :group 'riece-server)
209 (defcustom riece-startup-channel-list nil
210 "A list of channels to join automatically at startup."
211 :type '(repeat (choice (string :tag "Channel")
212 (list (string :tag "Channel") (string :tag "Key"))))
213 :group 'riece-channel)
215 (defcustom riece-startup-server-list nil
216 "A list of servers to connect automatically at startup."
217 :type '(repeat (string :tag "Server"))
218 :group 'riece-server)
220 (defcustom riece-retry-with-new-nickname nil
221 "When nickname has already been in use, grow-tail automatically."
223 :group 'riece-server)
225 (defcustom riece-quit-timeout 10
226 "Quit timeout when there is no response from server."
227 :type '(radio (integer :tag "Seconds")
229 :group 'riece-server)
231 (defcustom riece-default-open-connection-function #'open-network-stream
232 "Default function used for connecting to an IRC server."
234 :group 'riece-server)
236 (defcustom riece-channel-buffer-mode t
237 "When non-nil, Riece will display a channel buffer."
241 (defcustom riece-user-list-buffer-mode t
242 "When non-nil, Riece will display a nick list buffer."
246 (defcustom riece-channel-list-buffer-mode t
247 "When non-nil, Riece will display a channel list buffer."
251 (defcustom riece-default-freeze nil
252 "Channel buffer local freeze flag is on at starting."
256 (defcustom riece-default-channel-binding nil
257 "The channel list to bind the channel number when joining."
258 :type '(repeat (radio (string :tag "Bound Channel")
260 :group 'riece-channel)
262 (defcustom riece-blink-parens nil
263 "Should we blink matching parenthesis in the command buffer?"
265 :group 'riece-options)
267 (defcustom riece-quit-message (riece-extended-version)
268 "Default quit message."
269 :type '(string :tag "Quit message")
270 :group 'riece-options)
272 (defcustom riece-away-message "Gone"
273 "Default away message."
274 :type '(string :tag "Away message")
275 :group 'riece-options)
277 (defcustom riece-gather-channel-modes nil
278 "If non-nil, gather channel modes when we join a channel."
280 :group 'riece-options)
282 (defcustom riece-buffer-dispose-function #'bury-buffer
283 "Function called after the buffer was disposed."
285 :group 'riece-options)
287 (defcustom riece-shrink-buffer-idle-time-delay 5
288 "Number of idle seconds to wait before shrinking channel buffers."
290 :group 'riece-options)
292 (defcustom riece-shrink-buffer-remove-lines 10
293 "Number of lines removed when shrinking channel buffers."
295 :group 'riece-options)
297 (defcustom riece-max-buffer-size 65535
298 "Maximum size of channel buffers."
299 :type '(radio (integer :tag "Number of characters")
301 :group 'riece-options)
303 (defcustom riece-format-time-function #'current-time-string
304 "Function to convert the specified time to the human readable form."
306 :group 'riece-options)
308 (provide 'riece-options)
310 ;;; riece-options.el ends here