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)
42 "Variables saved after each session is completed."
44 :group 'riece-options)
46 (defcustom riece-debug nil
47 "If non-nil, random debug spews."
49 :group 'riece-options)
51 (defgroup riece-looks nil
52 "Related to look and feel"
56 (defcustom riece-truncate-partial-width-windows nil
57 "If non-nil, truncate lines in splitting windows such as others buffer."
61 (defcustom riece-use-full-window t
62 "If non-nil, whole Emacs window is used to display dialogue."
66 (defcustom riece-tab-stop-list '(2 4 6 8 10 12 14 16)
67 "To override `tab-stop-list'."
68 :type '(repeat integer)
71 (defcustom riece-inhibit-startup-message nil
72 "If non-nil, the startup message will not be displayed."
76 (defcustom riece-directory "~/.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 nil
109 "Add-ons insinuated into Riece."
110 :type '(repeat symbol)
111 :group 'riece-options)
113 (defgroup riece-server nil
118 (defgroup riece-channel nil
123 (define-widget 'riece-service-spec 'radio
124 "Edit service spec entries"
125 :convert-widget 'riece-service-spec-convert)
127 (defun riece-service-spec-convert (widget)
128 (widget-put widget :args '((integer :tag "Port Number")
129 (string :tag "Name")))
132 (define-widget 'riece-server-spec 'repeat
133 "Edit server spec entries"
134 :match (lambda (widget value)
135 (eval `(and ,@(mapcar
137 (or (stringp (cdr entry))
138 (listp (cdr entry))))
140 :convert-widget 'riece-server-spec-convert)
142 (defun riece-server-spec-convert (widget)
143 (let* ((host '(const :format "" :value :host))
144 (service '(const :format "" :value :service))
146 `(group :inline t ,host (string :tag "Host")))
148 `(group :inline t ,service riece-service-spec))
150 `(cons (string :tag "Name")
151 (radio (string :tag "Host")
152 (list ,host ,service))))
154 (widget-put widget :args args)
157 (defcustom riece-server-alist nil
158 "An alist mapping server names to plist."
159 :type 'riece-server-spec
160 :group 'riece-server)
162 (defcustom riece-server (getenv "IRCSERVER")
163 "IRC server host we are connecting to."
165 :group 'riece-server)
167 (defcustom riece-default-password (getenv "IRCPASSWORD")
169 :type '(radio (string :tag "Password")
170 (const :tag "No" nil))
171 :group 'riece-server)
173 (defcustom riece-username (or (getenv "IRCNAME")
174 (user-real-login-name))
177 :group 'riece-server)
179 (defcustom riece-nickname (or (getenv "IRCNICK")
180 (user-real-login-name))
183 :group 'riece-server)
185 (defcustom riece-startup-channel-list nil
186 "A list of channels to join automatically at startup."
187 :type '(repeat (string :tag "Startup Channel"))
188 :group 'riece-channel)
190 (defcustom riece-retry-with-new-nickname nil
191 "When nickname has already been in use, grow-tail automatically."
193 :group 'riece-server)
195 (defcustom riece-channel-buffer-mode t
196 "When non-nil, Riece will display a channel buffer."
200 (defcustom riece-user-list-buffer-mode t
201 "When non-nil, Riece will display a nick list buffer."
205 (defcustom riece-channel-list-buffer-mode t
206 "When non-nil, Riece will display a channel list buffer."
210 (defcustom riece-default-freeze nil
211 "If non nil, channel buffer local freeze flag is on at starting."
215 (defcustom riece-default-own-freeze nil
216 "If non nil, channel buffer local own freeze flag is on at starting."
220 (defcustom riece-default-channel-binding nil
221 "The channel list to bind the channel number when joining."
222 :type '(repeat (radio (string :tag "Bound Channel")
224 :group 'riece-channel)
226 (defcustom riece-blink-parens nil
227 "Should we blink matching parenthesis in the command buffer?"
229 :group 'riece-options)
231 (defcustom riece-quit-message nil
232 "Default signoff message."
233 :type '(radio (string :tag "Signoff message"))
234 :group 'riece-options)
236 (defcustom riece-gather-channel-modes t
237 "If non-nil, gather channel modes when we join a channel."
239 :group 'riece-options)
241 (defcustom riece-connection-timeout 60
242 "Default timeout interval."
244 :group 'riece-server)
246 (defcustom riece-buffer-dispose-function #'bury-buffer
247 "Function called after the buffer was disposed."
249 :group 'riece-options)
251 (defcustom riece-format-time-function #'current-time-string
252 "Function to convert the specified time to the human readable form."
254 :group 'riece-options)
256 (provide 'riece-options)
258 ;;; riece-options.el ends here