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-globals)
29 ;; User modifiable variables.
31 "Riece specific customize group")
33 (defgroup riece-options nil
34 "Riece user customizable variables"
38 (defcustom riece-saved-forms
40 riece-channel-buffer-mode
41 riece-user-list-buffer-mode
43 "Variables saved after each session is completed."
45 :group 'riece-options)
47 (defcustom riece-debug nil
48 "If non-nil, random debug spews."
50 :group 'riece-options)
52 (defcustom riece-command-prefix "\C-c"
53 "Key sequence to be used as prefix for command mode key bindings."
55 :group 'riece-options)
57 (defgroup riece-looks nil
58 "Related to look and feel"
62 (defcustom riece-truncate-partial-width-windows nil
63 "If non-nil, truncate lines in splitting windows such as others buffer."
67 (defcustom riece-use-full-window t
68 "If non-nil, whole Emacs window is used to display dialogue."
72 (defcustom riece-directory (expand-file-name "~/.riece")
73 "Where to look for data files."
75 :group 'riece-options)
77 (defcustom riece-addon-directory
78 (expand-file-name "addons" riece-directory)
79 "Where to look for add-on files."
81 :group 'riece-options)
83 (defcustom riece-variables-file
84 (expand-file-name "init" riece-directory)
85 "Where to look for variables."
87 :group 'riece-options)
89 (defcustom riece-saved-variables-file
90 (expand-file-name "save" riece-directory)
91 "Where to look for variables.
92 This file was saved the last session."
94 :group 'riece-options)
96 (defcustom riece-variables-files
97 (list riece-saved-variables-file riece-variables-file)
98 "Where to look for variables. Helps to remove clutter from your .emacs.
99 This feature is most likely to dissappear in near future. The preferred
100 way is to put Riece variables on .emacs or file loaded from there."
101 :type '(repeat (file :tag "Initialization File"))
102 :group 'riece-options)
104 (defcustom riece-addons '(riece-highlight
112 "Add-ons insinuated into Riece."
113 :type '(repeat symbol)
114 :group 'riece-options)
116 (defgroup riece-server nil
121 (defgroup riece-channel nil
126 (define-widget 'riece-service-spec 'radio
127 "Edit service spec entries"
128 :convert-widget 'riece-service-spec-convert)
130 (defun riece-service-spec-convert (widget)
131 (widget-put widget :args '((integer :tag "Port Number")
132 (string :tag "Name")))
135 (define-widget 'riece-server-spec 'repeat
136 "Edit server spec entries"
137 :match (lambda (widget value)
138 (eval `(and ,@(mapcar
140 (or (stringp (cdr entry))
141 (listp (cdr entry))))
143 :convert-widget 'riece-server-spec-convert)
145 (defun riece-server-spec-convert (widget)
146 (let* ((host '(const :format "" :value :host))
147 (service '(const :format "" :value :service))
149 `(group :inline t ,host (string :tag "Host")))
151 `(group :inline t ,service riece-service-spec))
153 `(cons (string :tag "Name")
154 (radio (string :tag "Host")
155 (list ,host ,service))))
157 (widget-put widget :args args)
160 (defcustom riece-server-alist nil
161 "An alist mapping server names to plist."
162 :type 'riece-server-spec
163 :group 'riece-server)
165 (defcustom riece-server (getenv "IRCSERVER")
166 "IRC server host we are connecting to."
168 :group 'riece-server)
170 (defcustom riece-default-password (getenv "IRCPASSWORD")
172 :type '(radio (string :tag "Password")
173 (const :tag "No" nil))
174 :group 'riece-server)
176 (defcustom riece-username (or (getenv "IRCNAME")
177 (user-real-login-name))
180 :group 'riece-server)
182 (defcustom riece-nickname (or (getenv "IRCNICK")
183 (user-real-login-name))
186 :group 'riece-server)
188 (defcustom riece-startup-channel-list nil
189 "A list of channels to join automatically at startup."
190 :type '(repeat (choice (string :tag "Channel")
191 (list (string :tag "Channel") (string :tag "Key"))))
192 :group 'riece-channel)
194 (defcustom riece-retry-with-new-nickname nil
195 "When nickname has already been in use, grow-tail automatically."
197 :group 'riece-server)
199 (defcustom riece-quit-timeout 10
200 "Quit timeout when there is no response from server."
202 :group 'riece-server)
204 (defcustom riece-channel-buffer-mode t
205 "When non-nil, Riece will display a channel buffer."
209 (defcustom riece-user-list-buffer-mode t
210 "When non-nil, Riece will display a nick list buffer."
214 (defcustom riece-channel-list-buffer-mode t
215 "When non-nil, Riece will display a channel list buffer."
219 (defcustom riece-default-freeze nil
220 "Channel buffer local freeze flag is on at starting."
224 (defcustom riece-default-channel-binding nil
225 "The channel list to bind the channel number when joining."
226 :type '(repeat (radio (string :tag "Bound Channel")
228 :group 'riece-channel)
230 (defcustom riece-blink-parens nil
231 "Should we blink matching parenthesis in the command buffer?"
233 :group 'riece-options)
235 (defcustom riece-quit-message nil
236 "Default quit message."
237 :type '(radio (string :tag "Quit message"))
238 :group 'riece-options)
240 (defcustom riece-away-message nil
241 "Default away message."
242 :type '(radio (string :tag "Away message"))
243 :group 'riece-options)
245 (defcustom riece-gather-channel-modes t
246 "If non-nil, gather channel modes when we join a channel."
248 :group 'riece-options)
250 (defcustom riece-buffer-dispose-function #'bury-buffer
251 "Function called after the buffer was disposed."
253 :group 'riece-options)
255 (defcustom riece-format-time-function #'current-time-string
256 "Function to convert the specified time to the human readable form."
258 :group 'riece-options)
260 (provide 'riece-options)
262 ;;; riece-options.el ends here