Remove Gnus, making way for new subtree Gnus pkg
[packages] / xemacs-packages / liece / lisp / liece-vars.el
1 ;;; liece-vars.el --- Customization.
2 ;; Copyright (C) 1998-2000 Daiki Ueno
3
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
5 ;; Created: 1998-09-28
6 ;; Revised: 1998-11-25
7 ;; Keywords: IRC, liece
8
9 ;; This file is part of Liece.
10
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26
27 ;;; Commentary:
28 ;;
29
30 ;;; Code:
31
32 (eval-when-compile
33   (require 'liece-compat)
34   (require 'liece-globals))
35
36 ;; User modifiable variables.
37 (defgroup liece nil
38   "liece specific customize group")
39
40 (defgroup liece-vars nil
41   "liece user customizable variables"
42   :tag "Variables"
43   :prefix "liece-"
44   :group 'liece)
45
46 (defcustom liece-saved-forms
47   (purecopy
48    '(liece-kill-nickname
49      liece-server-alist
50      liece-channel-buffer-mode
51      liece-nick-buffer-mode
52      liece-friends))
53   "Variables whose values are saved via command liece-command-save-vars."
54   :type 'string
55   :group 'liece-vars)
56
57 (defgroup liece-look nil
58   "Look & Feels"
59   :tag "Look"
60   :prefix "liece-"
61   :group 'liece)
62
63 (defcustom liece-command-window-height 4
64   "How large should command window be on startup."
65   :type 'integer
66   :group 'liece-look)
67
68 (defcustom liece-truncate-partial-width-windows nil
69   "If non-nil, truncate lines in splitting windows such as others buffer."
70   :type 'boolean
71   :group 'liece-look)
72
73 (defcustom liece-use-full-window t
74   "If non-nil, IRCHAT will use whole Emacs window."
75   :type 'boolean
76   :group 'liece-look)
77
78 (defcustom liece-display-frame-title t
79   "If non-nil, IRCHAT displays channel information on frame title."
80   :type 'boolean
81   :group 'liece-look)
82
83 (defcustom liece-display-unread-mark nil
84   "If non-nil, display unread mark as XEmacs glyphs or character to channel
85 list buffer."
86   :type 'boolean
87   :group 'liece-look)
88
89 (defcustom liece-channel-unread-character "!"
90   "Channel unread character."
91   :type 'character
92   :group 'liece-look)
93
94 (defcustom liece-tab-stop-list '(2 4 6 8 10 12 14 16)
95   "List of tab stop positions in dialogue buffer."
96   :type '(repeat integer)
97   :group 'liece-look)
98
99 (defcustom liece-icon-directory nil
100   "Normal position of liece icons."
101   :type 'directory
102   :group 'liece-look)
103
104 (defcustom liece-nick-image-alist
105   '((?@ . "ball.red.xpm")
106     (?  . "ball.blank.xpm")
107     (?+ . "ball.gray.xpm"))
108   "Normal and deformed faces for operators and voices."
109   :type '(repeat (list (character :tag "Mark")
110                        (string :tag "Image")))
111   :group 'liece-look)
112
113 (defcustom liece-inhibit-startup-message nil
114   "If non-nil, the startup message will not be displayed.
115 This variable is used before `.liece/init.el' is loaded, so it should
116 be set in `.emacs' instead."
117   :group 'liece-look
118   :type 'boolean)
119
120 (defcustom liece-want-traditional nil
121   "Do we want /commands."
122   :type 'boolean
123   :group 'liece-vars)
124
125 (defcustom liece-command-window-on-top nil
126   "If non-nil, the command window will be put at the top of the screen."
127   :type 'boolean
128   :group 'liece-look)
129
130 (defcustom liece-one-buffer-mode nil
131   "When non-nil, liece will put up only a dialogue buffer.
132 Useful for those (perverts) who use 24 line terminals."
133   :type 'boolean
134   :group 'liece-look)
135
136 (defcustom liece-display-status-on-channel-indicator nil
137   "When non-nil, liece will display channel topic on modeline."
138   :type 'boolean
139   :group 'liece-look)
140
141 (defcustom liece-directory "~/.liece"
142   "Where to look for data files."
143   :type 'directory
144   :group 'liece-vars)
145
146 (defcustom liece-variables-file (expand-file-name "init.el" liece-directory)
147   "Where to look for variables.  Helps to remove clutter from your .emacs.
148 This feature is most likely to dissappear in near future.  The preferred
149 way is to put liece variables on .emacs or file loaded from there."
150   :type 'file
151   :group 'liece-vars)
152
153 (defcustom liece-variables-files
154   (list liece-variables-file)
155   "Where to look for variables.  Helps to remove clutter from your .emacs.
156 This feature is most likely to dissappear in near future.  The preferred
157 way is to put liece variables on .emacs or file loaded from there."
158   :type '(repeat (file :tag "Initialization File"))
159   :group 'liece-vars)
160
161 ;; Where to connect.
162 (defgroup liece-server nil
163   "Server Settings"
164   :tag "Server"
165   :prefix "liece-"
166   :group 'liece)
167
168 (defgroup liece-channel nil
169   "Channel Settings"
170   :tag "Channel"
171   :prefix "liece-"
172   :group 'liece)
173
174 (define-widget 'liece-service-spec 'radio
175   "Edit service spec entries"
176   :convert-widget 'liece-service-spec-convert)
177
178 (defun liece-service-spec-convert (widget)
179   (widget-put widget :args '((integer :tag "Port Number")
180                              (string :tag "Name")))
181   widget)
182
183 (define-widget 'liece-server-spec 'repeat
184   "Edit server spec entries"
185   :match (lambda (widget value)
186            (eval
187             (` (and
188                 (,@ (mapcar
189                      (lambda (entry)
190                        (or (stringp (cdr entry))
191                            (listp (cdr entry))))
192                      value))))))
193   :convert-widget 'liece-server-spec-convert)
194
195 (defun liece-server-spec-convert (widget)
196   (let* ((host '(const :format "" :value :host))
197          (service '(const :format "" :value :service))
198          (host
199           (` (group :inline t (, host) (string :tag "Host"))))
200          (service
201           (` (group :inline t (, service) liece-service-spec)))
202          (spec
203           (` (cons
204               (string :tag "Name")
205               (radio (string :tag "Host")
206                      (list (, host) (, service))))))
207          (args (` ((, spec)))))
208     (widget-put widget :args args)
209     widget))
210
211 (defcustom liece-server-alist
212   '(("WIDE Project Kyoto NOC, Japan"        . "irc.kyoto.wide.ad.jp")
213     ("WIDE Project Tokyo NOC, Japan"        . "irc.tokyo.wide.ad.jp")
214     ("Hokkaido University, Sapporo, Japan"  . "irc.huie.hokudai.ac.jp")
215     ("DTI, Akasaka Tokyo, Japan"            . "irc.dti.ne.jp")
216     ("WIDE Project Fujisawa NOC, Japan"     . "irc.fujisawa.wide.ad.jp")
217     ("WIDE Project Kyoto NOC, Japan (IPv6)" . "irc6.kyoto.wide.ad.jp"))
218   "IRC server assoc-list which is used for input IRC server."
219   :type 'liece-server-spec
220   :group 'liece-server)
221
222 (defcustom liece-server (or (getenv "IRCSERVER") nil)
223   "Name of the host running the IRC server.
224 Value initialized from the IRCSERVER environment variable if one is set"
225   :type 'string
226   :group 'liece-server)
227
228 (defcustom liece-service
229   (let ((ircport-env (getenv "IRCPORT")))
230     (if ircport-env
231         (if (> (string-to-int ircport-env) 0)
232             (string-to-int ircport-env)
233           ircport-env)
234       6667))
235   "IRC service name or (port) number."
236   :type 'liece-service-spec
237   :group 'liece-server)
238
239 (defcustom liece-my-userhost nil
240   "You can explicitly indicate own hostname here."
241   :type '(radio (string :tag "Hostname")
242                 (const :tag "Autodetect" nil))
243   :group 'liece-server)
244
245 (defcustom liece-password (or (getenv "IRCPASSWORD") nil)
246   "Your password when connecting to server."
247   :type '(radio (string :tag "Password")
248                 (const :tag "No" nil))
249   :group 'liece-server)
250
251 (defcustom liece-name (or (getenv "IRCNAME") (user-real-login-name))
252   "The nickname you want to use in IRC.
253 Default is the environment variable IRCNICK, or your login name."
254   :type 'string
255   :group 'liece-server)
256
257 (defcustom liece-nickname (or (getenv "IRCNICK") (user-real-login-name))
258   "The nickname you want to use in IRC.
259 Default is the environment variable IRCNICK, or your login name."
260   :type 'string
261   :group 'liece-server)
262
263 (defcustom liece-nick-max-length 9
264   "Maximum length of the nickname."
265   :type 'integer
266   :group 'liece-server)
267
268 (defvar liece-real-nickname nil)
269
270 (defcustom liece-startup-channel nil
271   "The channel to join automatically at startup.
272 If nil, do not join any channel."
273   :type '(radio (string :tag "Channels")
274                 (const nil))
275   :group 'liece-channel)
276
277 (defcustom liece-startup-channel-list nil
278   "The channel list to join automatically at startup.
279 If nil, do not join any channel."
280   :type '(repeat (string :tag "Startup Channel"))
281   :group 'liece-channel)
282
283 (defcustom liece-auto-join-partner t
284   "Whether join automatically at arriving private message."
285   :type 'boolean
286   :group 'liece-channel)
287
288 (defcustom liece-reconnect-automagic nil
289   "Automatic reconnection, default is disabled."
290   :type 'boolean
291   :group 'liece-server)
292
293 (defcustom liece-ask-for-nickname nil
294   "Ask for nickname if liece was entered with \\[universal-argument]."
295   :type 'boolean
296   :group 'liece-server)
297
298 (defcustom liece-ask-for-password nil
299   "Ask for password when connecting to server."
300   :type 'boolean
301   :group 'liece-server)
302
303 (defcustom liece-ask-for-channel-password nil
304   "Ask for channel password when joining channel with password."
305   :type 'boolean
306   :group 'liece-server)
307
308 (defcustom liece-reconnect-with-password nil
309   "Auto recconect to server with password after incorrect password."
310   :type 'boolean
311   :group 'liece-server)
312
313 (defcustom liece-grow-tail "_"
314   "Add liece-grow-tail to nick when reconnecting.
315 Otherwise you might get killed again if automagic reconnect is too fast."
316   :type 'string
317   :group 'liece-server)
318
319 (defcustom liece-auto-iterate-nick nil
320   "When nickname has already been in use, grow-tail automagically."
321   :type 'boolean
322   :group 'liece-server)
323
324 (defvar liece-after-registration nil
325   "After my registration.")
326
327 (defvar liece-status-message-string nil)
328
329 (defvar liece-channel-unread-list nil)
330
331 ;; Hooks.
332 (defgroup liece-hook nil
333   "Hooks"
334   :tag "Hooks"
335   :prefix "liece-"
336   :group 'liece)
337
338 (defcustom liece-command-mode-hook nil
339   "A hook for IRCHAT command mode."
340   :type 'hook
341   :group 'liece-hook)
342
343 (defcustom liece-dialogue-mode-hook nil
344   "A hook for IRCHAT dialogue mode."
345   :type 'hook
346   :group 'liece-hook)
347
348 (defcustom liece-others-mode-hook nil
349   "A hook for IRCHAT others mode."
350   :type 'hook
351   :group 'liece-hook)
352
353 (defcustom liece-channel-mode-hook nil
354   "A hook for IRCHAT Channel mode."
355   :type 'hook
356   :group 'liece-hook)
357
358 (defcustom liece-nick-mode-hook nil
359   "A hook for IRCHAT nick mode."
360   :type 'hook
361   :group 'liece-hook)
362
363 (defcustom liece-exit-hook nil
364   "A hook executed when signing off IRC."
365   :type 'hook
366   :group 'liece-hook)
367
368 (defcustom liece-before-kill-emacs-hook nil
369   "A hook executed when exitting Emacs."
370   :type 'hook
371   :group 'liece-hook)
372
373 ;; Channel buffers.
374 (defcustom liece-channel-buffer-mode t
375   "When non-nil, liece will display a channel buffer."
376   :type 'boolean
377   :group 'liece-look)
378
379 (defcustom liece-channel-window-height-percent 63
380   "How large percent should Current channel window be on startup."
381   :type 'integer
382   :group 'liece-look)
383
384 (defcustom liece-default-beep nil
385   "If non nil, channel buffer local beep flag is on at starting."
386   :type 'boolean
387   :group 'liece-look)
388
389 (defcustom liece-default-freeze nil
390   "If non nil, channel buffer local freeze flag is on at starting."
391   :type 'boolean
392   :group 'liece-look)
393
394 (defcustom liece-default-own-freeze nil
395   "If non nil, channel buffer local own freeze flag is on at starting."
396   :type 'boolean
397   :group 'liece-look)
398
399 (defcustom liece-default-channel-binding nil
400   "The channel list to bind the channel number when joining."
401   :type '(repeat (radio (string :tag "Bound Channel")
402                         (const nil)))
403   :group 'liece-channel)
404
405 (defcustom liece-default-partner-binding nil
406   "The chat partner list to bind the partner's number."
407   :type '(repeat (radio (string :tag "Bound Partner")
408                         (const nil)))
409   :group 'liece-partner)
410
411 ;; Nick buffers.
412 (defcustom liece-nick-buffer-mode t
413   "When non-nil, liece will display a nick list buffer."
414   :type 'boolean
415   :group 'liece-look)
416
417 (defcustom liece-nick-window-width-percent 18
418   "How large percent should Current nick list window be on startup."
419   :type 'integer
420   :group 'liece-look)
421
422 (defcustom liece-nick-window-auto-hide t
423   "Hide nick window in priv buffer automatically."
424   :type 'boolean
425   :group 'liece-look)
426
427 ;; Channel list buffer.
428 (defcustom liece-channel-list-buffer-mode t
429   "When non-nil, liece will display a channel list buffer."
430   :type 'boolean
431   :group 'liece-look)
432
433 (defcustom liece-channel-list-window-width-percent 18
434   "How large percent should Current channel list window be on startup."
435   :type 'integer
436   :group 'liece-look)
437
438 ;; Highlight.
439 (defcustom liece-highlight-mode t
440   "If non nil, IRC buffer is highlighted by specific rule."
441   :type 'boolean
442   :group 'liece-highlight)
443
444 (defcustom liece-highlight-pattern "$^"
445   "If non nil, this pattern used for user defined highlight rule."
446   :type '(regexp :tag "Highlighting Pattern")
447   :group 'liece-highlight)
448
449 ;; DCC
450 (defgroup liece-dcc nil
451   "DCC Settings"
452   :tag "DCC"
453   :prefix "liece-"
454   :group 'liece)
455
456 (defcustom liece-dcc-program "ldcc"
457   "Name of the external dcc-program.
458 Current version takes the one which is earlier in path \(if many\)."
459   :type '(file :tag "DCC program path")
460   :group 'liece-dcc)
461
462 (defcustom liece-dcc-directory "~/tmp"
463   "Directory where liece-dcc puts its files."
464   :type 'directory
465   :group 'liece-dcc)
466
467 (defcustom liece-dcc-port 0
468   "Default port for DCC operations."
469   :type 'integer
470   :group 'liece-dcc)
471
472 (defcustom liece-dcc-resolve-server nil
473   "Resolve IRC server FQDN with external DCC command."
474   :type 'boolean
475   :group 'liece-dcc)
476
477 ;; Prefix strings for various messages.
478 (defgroup liece-prefix nil
479   "Various message prefix"
480   :tag "Prefix"
481   :prefix "liece-"
482   :group 'liece)
483
484 (defgroup liece-prefix-string nil
485   "Various prefix string"
486   :tag "Prefix string"
487   :prefix "liece-"
488   :group 'liece-prefix)
489
490 (defcustom liece-change-prefix "*** Change: "
491   "String to add before changing messages."
492   :type 'string
493   :group 'liece-prefix-string)
494
495 (defcustom liece-notice-prefix "*** Notice: "
496   "String to add before any notice message."
497   :type 'string
498   :group 'liece-prefix-string)
499
500 (defcustom liece-broadcast-prefix "*** Broadcast: "
501   "String to add before any Broadcast message."
502   :type 'string
503   :group 'liece-prefix-string)
504
505 (defcustom liece-wallops-prefix "*** Notice: "
506   "String to add before any WALLOPS message."
507   :type 'string
508   :group 'liece-prefix-string)
509
510 (defcustom liece-error-prefix "*** Error: "
511   "String to add before any ERROR message."
512   :type 'string
513   :group 'liece-prefix-string)
514
515 (defcustom liece-info-prefix "*** Info: "
516   "String to add before any informational message."
517   :type 'string
518   :group 'liece-prefix-string)
519
520 (defcustom liece-timestamp-prefix "*** Time: "
521   "String to add before any timestamp message."
522   :type 'string
523   :group 'liece-prefix-string)
524
525 (defcustom liece-client-prefix "*** Client: "
526   "String to add before any CTCP message."
527   :type 'string
528   :group 'liece-prefix-string)
529
530 (defcustom liece-dcc-prefix "*** DCC: "
531   "String to add before any DCC message."
532   :type 'string
533   :group 'liece-prefix-string)
534
535 (defcustom liece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] "
536   "Time prefix regexp."
537   :type 'regexp
538   :group 'liece-prefix)
539
540 (defcustom liece-display-time t
541   "If non-nil, print time prefix on each line in channel buffer."
542   :type 'boolean
543   :group 'liece-prefix)
544
545 (defcustom liece-display-prefix-tag nil
546   "If non-nil, print prefix tag on each line in channel buffer."
547   :type 'boolean
548   :group 'liece-prefix)
549
550 (defcustom liece-generic-prefix-tag-regexp "\\*\\*\\* \\([^:]+: \\)"
551   "Regular expression for generic prefix tag."
552   :type 'regexp
553   :group 'liece-prefix)
554
555 ;; Misc.
556 (defcustom liece-blink-parens nil
557   "Should we blink matching parenthesis in liece command buffer?"
558   :type 'boolean
559   :group 'liece-vars)
560
561 (defcustom liece-show-wallops t
562   "Show wallops messages if usermode +ws."
563   :type 'boolean
564   :group 'liece-vars)
565
566 (defcustom liece-ignore-extra-notices t
567   "Don't show any notice unless they come from the local server."
568   :type 'boolean
569   :group 'liece-vars)
570
571 (defcustom liece-shorten-kills t
572   "Shorten KILL messages to about one line."
573   :type 'boolean
574   :group 'liece-vars)
575
576 (defcustom liece-ignore-changes nil
577   "Ignore changes? Good in topic-wars/link troubles."
578   :type 'boolean
579   :group 'liece-vars)
580
581 (defcustom liece-ignore-fakes nil
582   "If non nil, ignore fake notices if receiving them."
583   :type 'boolean
584   :group 'liece-vars)
585
586 (defcustom liece-signoff-message nil
587   "Default signoff message."
588   :type '(radio (string :tag "Signoff message"))
589   :group 'liece-vars)
590
591 (defcustom liece-away-message ""
592   "Default away message."
593   :type 'string
594   :group 'liece-vars)
595
596 (defcustom liece-beep-on-bells 'always
597   "If non-nil, and the IRC dialogue buffer is not selected in a window,
598 an IRC message arriving containing a bell character, will cause you
599 to be notified.
600 If value is 'always, an arriving bell will always cause a beep (or flash)."
601   :type '(radio (const :tag "Always" always) (const :tag "No" nil))
602   :group 'liece-vars)
603
604 (defcustom liece-beep-function (function ding)
605   "Function to beep."
606   :type 'function
607   :group 'liece-vars)
608
609 (defcustom liece-beep-when-invited nil
610   "If non-nil, beep when invited."
611   :type 'boolean
612   :group 'liece-vars)
613
614 (defcustom liece-beep-when-privmsg nil
615   "If non-nil, beep when received privmsg."
616   :type 'boolean
617   :group 'liece-vars)
618
619 (defcustom liece-beep-words-list nil
620   "This list used for user defined beep rules."
621   :type '(repeat (string :tag "Beep Rules List"))
622   :group 'liece-vars)
623
624 (defcustom liece-system-fqdname (system-name)
625   "The fully qualified domain name of the system.
626 Default is what (system-name) returns."
627   :type 'string
628   :group 'liece-vars)
629
630 (defcustom liece-gather-channel-modes t
631   "Gather channel modes when joining channels."
632   :type 'boolean
633   :group 'liece-vars)
634
635 (defcustom liece-use-x-face nil
636   "Display X-Face in dialogue buffer."
637   :type 'boolean
638   :group 'liece-look)
639
640 ;; Send/Receive files.
641 (defcustom liece-file-accept nil
642   "Do we accept files."
643   :type 'boolean
644   :group 'liece-ctcp)
645
646 (defcustom liece-file-confirm-save nil
647   "Do we want confirmation on saving files."
648   :type 'boolean
649   :group 'liece-ctcp)
650
651 ;; Userinfos.
652 (defgroup liece-ctcp nil
653   "CTCP Settings"
654   :tag "CTCP"
655   :prefix "liece-"
656   :group 'liece)
657
658 (defcustom liece-ctcp-userinfo "No user information given."
659   "Userinfo message given to anyone asking."
660   :type 'string
661   :group 'liece-ctcp)
662
663 (defcustom liece-ctcp-x-face ""
664   "X-Face message given to anyone asking.  Proper form is \"X-Face: ....\"."
665   :type 'string
666   :group 'liece-ctcp)
667
668 (static-when (featurep 'xemacs)
669   (define-obsolete-variable-alias 'liece-client-userinfo
670     'liece-ctcp-userinfo)
671   (define-obsolete-variable-alias 'liece-client-x-face
672     'liece-ctcp-x-face))
673
674 (defcustom liece-timers
675   '((liece-command-poll-names liece-poll-names-interval)
676     (liece-command-keepalive liece-keepalive-interval)
677     (liece-command-poll-friends liece-poll-friends-interval))
678   "Symbol name to store timer, timer-function and timer-interval."
679   :type '(repeat (list symbol symbol))
680   :group 'liece-server)
681
682 (defcustom liece-friends nil
683   "Friends to be checked consequently."
684   :type '(repeat (string :tag "Nick"))
685   :group 'liece-vars)
686
687 (defcustom liece-display-friends-function 'liece-303-display-friends
688   "Function to display friends status."
689   :type 'function
690   :group 'liece-vars)
691
692 (defcustom liece-poll-friends-interval 30
693   "Interval on seconds the existence of friends."
694   :type '(repeat
695           (integer :tag "Polling Interval in Seconds")
696           (const :tag "No" nil))
697   :group 'liece-server)
698
699 (defcustom liece-keepalive-interval nil
700   "Interval on seconds the existence of server connection is checked."
701   :type '(radio
702           (integer :tag "Seconds"
703                    :doc "Connection Interval in Seconds")
704           (const :tag "No" nil))
705   :group 'liece-server)
706
707 (defcustom liece-poll-names-interval nil
708   "Interval the names are polled from server."
709   :type '(radio
710           (integer :tag "Seconds"
711                    :doc "NAMES Polling Interval in Seconds")
712           (const :tag "No" nil))
713   :group 'liece-server)
714
715 (defcustom liece-timestamp-interval (* 60 10)
716   "Interval in seconds between timestamps in dialogue-buffer, nil for none."
717   :type '(radio
718           (integer :tag "Seconds"
719                    :doc "Timestamp Interval in Seconds")
720           (const "No" nil))
721   :group 'liece-server)
722
723 (defcustom liece-connection-timeout 60
724   "Default timeout interval."
725   :type 'integer
726   :group 'liece-server)
727
728 (defcustom liece-timestamp-format (concat liece-timestamp-prefix "%s")
729   "Format-string for timestamp."
730   :type 'string
731   :group 'liece-format-string)
732
733 ;; Conversions: Not used.
734 (defcustom liece-send-convert-list nil
735   "Convert characters before sending to server."
736   :type '(repeat (character :tag "Character"
737                             :doc "Convert Character"))
738   :group 'liece-vars)
739
740 (defcustom liece-receive-convert-list nil
741   "Convert characters after receiving from server."
742   :type '(repeat (character :tag "Character"
743                             :doc "Convert Character"))
744   :group 'liece-vars)
745
746 ;; Ignores
747 (defgroup liece-ignore nil
748   "Ignore Settings"
749   :tag "Ignore"
750   :prefix "liece-"
751   :group 'liece-vars)
752
753 (defcustom liece-kill-nickname nil
754   "List of nicknames to be ignored.
755 Messages from these people won't be displayed."
756   :type '(repeat (string :tag "Nick" :doc "Ignore Nick"))
757   :group 'liece-ignore)
758
759 (defcustom liece-kill-realname nil
760   "List of real names to be ignored.
761 Messages from them won't be displayed."
762   :type '(repeat (string :tag "Realname" :doc "Ignore Realname"))
763   :group 'liece-ignore)
764
765 (defcustom liece-kill-logon nil
766   "List of logon names (user@host.dom.ain) to be ignored.
767 Messages from them won't be displayed."
768   :type '(repeat (string :tag "Logon" :doc "Ignore Logon Name"))
769   :group 'liece-ignore)
770
771 ;; New style ignore.
772 (defcustom liece-no-ignore-buffers nil
773   "A list of buffers that don't adhere to ignore-list."
774   :type '(repeat (string :tag "Buffer" :doc "Don't Ignore Buffer Names"))
775   :group 'liece-ignore)
776
777 (define-widget 'liece-ignore-spec 'repeat
778   "Edit server spec entries"
779   :convert-widget 'liece-ignore-spec-convert)
780
781 (defun liece-ignore-spec-convert (widget)
782   (let* ((type
783           '(radio
784             (string :tag "Type" :doc "Match for messagetype")
785             (const nil)))
786          (match
787           '(radio
788             (string :tag "Match" :doc "Match for string-in-message")
789             (const nil)))
790          (info-func
791           '(function :doc "Function whose return value is ignore info"))
792          (user-func
793           '(function :doc "Function whose return value is ignore user list"))
794          (name
795           '(repeat :tag "Name" (string :doc "Ignore user name")))
796          (spec
797           (` (list :value (nil nil)
798                    (choice :tag "Message"
799                     (cons (, type) (, match)) (const nil) (, info-func))
800                    (choice :tag "User" (const nil) (, user-func) (, name)))))
801          (args (` ((, spec)))))
802     (widget-put widget :args args)
803     widget))
804
805 (defcustom liece-ignore-list nil
806   "A list of buffers that don't adhere to ignore-list."
807   :type 'liece-ignore-spec
808   :group 'liece-ignore)
809
810 (defcustom liece-compress-changes t
811   "Set to t if we want instant compressed messages in the old format."
812   :type 'boolean
813   :group 'liece-vars)
814
815 (defcustom liece-compress-treshold 1
816   "Number of lines to search back for a previous matching join/part/quit/mode."
817   :type 'integer
818   :group 'liece-vars)
819
820 (defcustom liece-compress-mode-length 3
821   "Number of mode compression length."
822   :type 'integer
823   :group 'liece-vars)
824
825 (defcustom liece-buffer-max-size 4242424
826   "Maximum size of buffers, the number of characters."
827   :type 'integer
828   :group 'liece-vars)
829
830 (defcustom liece-buffer-min-size (- liece-buffer-max-size 200000)
831   "Minimum size of buffers, the number of characters."
832   :type 'integer
833   :group 'liece-vars)
834
835 (defcustom liece-buffer-check-interval (* 60 10)
836   "Interval between `buffer-size' checks."
837   :type 'integer
838   :group 'liece-vars)
839
840 (static-when (featurep 'xemacs)
841   (define-obsolete-variable-alias 'liece-buffer-maxsize
842     'liece-buffer-max-size)
843   (define-obsolete-variable-alias 'liece-buffer-defsize
844     'liece-buffer-min-size)
845   (define-obsolete-variable-alias 'liece-checkbuffer-interval
846     'liece-buffer-check-interval))
847
848 (defcustom liece-buffer-dispose-function (function bury-buffer)
849   "Function called after the buffer was disposed of."
850   :type 'function
851   :group 'liece-vars)
852
853 (defcustom liece-private-window-height 4
854   "How tall is the window for private messages when shown."
855   :type 'integer
856   :group 'liece-vars)
857
858 (defcustom liece-format-time-function
859   'liece-compose-time-string
860   "Function to convert `current-time-string' to the human readable form.
861 If you like to have the short format, set this to nil or to a
862 funtion (defun my-format (s) s)."
863   :type 'function
864   :group 'liece-vars)
865
866 (defcustom liece-keep-buffers t
867   "When (re)starting IRC, erase contents of old buffers."
868   :type 'boolean
869   :group 'liece-vars)
870
871 (defcustom liece-scroll-step nil
872   "The number of lines to try scrolling a window by when point moves out."
873   :type '(radio (integer :tag "Scroll Step")
874                 (const nil))
875   :group 'liece-look)
876
877 (defcustom liece-swap-private nil
878   "When showing private is it between under dialogue or not."
879   :type 'boolean
880   :group 'liece-vars)
881
882 (defcustom liece-buffer-preferences
883   (list
884    (cons ".*" liece-D-buffer))
885   "List of lists that contain regexp to match and `buffer-list' to insert.
886 Setting this as
887 (list
888  (cons \"#report\" (list \"*report-buffer*\"))
889  (cons \".*\" liece-D-buffer))
890 would cause messages from and to channel #report to be displayed on
891 buffer named *report-buffer* and all other messages are displayed on
892 dialogue-buffer."
893   :type '(repeat (cons (string :tag "Channel Name")
894                        (list (variable :tag "Buffe or Name"))))
895   :group 'liece-vars)
896
897 (defcustom liece-channel-conversion-map nil
898   "The map of channel conversion."
899   :type '(repeat (cons (string :tag "Channel Name")
900                        (string :tag "Channel Name (After Conversion)")))
901   :group 'liece-vars)
902
903 (defcustom liece-channel-conversion-default-mask "*.jp"
904   "The default mask of channel conversion."
905   :type 'string
906   :group 'liece-vars)
907
908 (defcustom liece-channel-id-length 5
909   "Length of channel ID for ! channels."
910   :type 'integer
911   :group 'liece-vars)
912
913 (defcustom liece-insert-environment-version nil
914   "If non-nil, display version description of current environment."
915   :type 'boolean
916   :group 'liece-vars)
917
918 (provide 'liece-vars)
919
920 ;;; liece-vars.el ends here