X-Git-Url: http://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2Friece-options.el;h=c886a1c5f3f3992ca767f14f3eff1b8c08f33b11;hp=d194b85f0b1515cb6ce61f0b9d1980a5cc31d0d1;hb=218d1f3a9ab6ab368fb9de131a15b9e79af16ea0;hpb=fd2f4576f383044390c4523947aaead409d34c1a diff --git a/lisp/riece-options.el b/lisp/riece-options.el index d194b85..c886a1c 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -1,4 +1,4 @@ -;;; riece-options.el --- customization +;;; riece-options.el --- customization -*- lexical-binding: t -*- ;; Copyright (C) 1998-2003 Daiki Ueno ;; Author: Daiki Ueno @@ -19,27 +19,33 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: +(require 'riece-version) (require 'riece-globals) ;; User modifiable variables. (defgroup riece nil - "Riece specific customize group") + "Riece specific customize group." + :prefix "riece-" + :group 'applications) (defgroup riece-options nil - "Riece user customizable variables" + "Riece user customizable variables." :prefix "riece-" :group 'riece) (defcustom riece-saved-forms '(riece-server-alist riece-channel-buffer-mode + riece-others-buffer-mode riece-user-list-buffer-mode - riece-layout) + riece-channel-list-buffer-mode + riece-layout + riece-addons) "Variables saved after each session is completed." :type 'string :group 'riece-options) @@ -55,22 +61,20 @@ :group 'riece-options) (defgroup riece-looks nil - "Related to look and feel" + "Look and feel." :prefix "riece-" :group 'riece) -(defcustom riece-truncate-partial-width-windows nil - "If non-nil, truncate lines in splitting windows such as others buffer." - :type 'boolean - :group 'riece-looks) - -(defcustom riece-use-full-window t - "If non-nil, whole Emacs window is used to display dialogue." - :type 'boolean +(defcustom riece-window-center-line -2 + "Line number of center point in window when scrolling. +If nil, erases the entire frame and then redraws with point in the +center of the window. Negative means relative to bottom of window. +See the document of the function `recenter'." + :type 'integer :group 'riece-looks) (defcustom riece-directory (expand-file-name "~/.riece") - "Where to look for data files." + "Where to look for startup files." :type 'directory :group 'riece-options) @@ -79,7 +83,15 @@ "Where to look for add-on files." :type 'directory :group 'riece-options) - + +(defcustom riece-data-directory + (if (fboundp 'locate-data-directory) + (locate-data-directory "riece") + (file-name-directory load-file-name)) + "Where to look for data files." + :type 'directory + :group 'riece-options) + (defcustom riece-variables-file (expand-file-name "init" riece-directory) "Where to look for variables." @@ -109,58 +121,101 @@ way is to put Riece variables on .emacs or file loaded from there." riece-url riece-button riece-menu - riece-icon) + riece-icon + riece-ignore + riece-log + riece-toolbar + riece-alias + riece-ctlseq + riece-keyword + riece-shrink-buffer + riece-mcat) "Add-ons insinuated into Riece." :type '(repeat symbol) :group 'riece-options) (defgroup riece-server nil - "Server settings" + "Server settings." :prefix "riece-" :group 'riece) (defgroup riece-channel nil - "Channel settings" + "Channel settings." :prefix "riece-" :group 'riece) -(define-widget 'riece-service-spec 'radio - "Edit service spec entries" - :convert-widget 'riece-service-spec-convert) - -(defun riece-service-spec-convert (widget) - (widget-put widget :args '((integer :tag "Port Number") - (string :tag "Name"))) - widget) - -(define-widget 'riece-server-spec 'repeat - "Edit server spec entries" - :match (lambda (widget value) - (eval `(and ,@(mapcar - (lambda (entry) - (or (stringp (cdr entry)) - (listp (cdr entry)))) - value)))) - :convert-widget 'riece-server-spec-convert) - -(defun riece-server-spec-convert (widget) - (let* ((host '(const :format "" :value :host)) - (service '(const :format "" :value :service)) - (host - `(group :inline t ,host (string :tag "Host"))) - (service - `(group :inline t ,service riece-service-spec)) - (spec - `(cons (string :tag "Name") - (radio (string :tag "Host") - (list ,host ,service)))) - (args (list spec))) - (widget-put widget :args args) - widget)) - +(defgroup riece-coding nil + "Coding system." + :tag "Coding" + :prefix "riece-" + :group 'riece) + +(defcustom riece-default-coding-system + (if (featurep 'mule) + (cons 'ctext 'iso-2022-jp-2)) + "Coding system for process I/O. +The value is a coding system, or a cons cell (DECODING . ENCODING) +specifying the coding systems for decoding and encoding respectively." + :type '(choice (symbol :tag "Coding system") + (cons (symbol :tag "Input coding system") + (symbol :tag "Output coding system")) + (const nil :tag "No conversion")) + :group 'riece-coding) + (defcustom riece-server-alist nil "An alist mapping server names to plist." - :type 'riece-server-spec + :type '(repeat + (group + (string :tag "Server") + (list :inline t :tag "Host" + :format "%{%t%}: %v" + (const :tag "" :value :host) + string) + (repeat :inline t :tag "Options" + (choice :inline t :value nil + (list :inline t :tag "Port" + :format "%{%t%}: %v" + (const :tag "" :value :service) + (choice (const :tag "Default" 6667) + integer + string)) + (list :inline t :tag "Nickname" + :format "%{%t%}: %v" + (const :tag "" :value :nickname) + (choice (const :tag "Default" riece-nickname) + string)) + (list :inline t :tag "Realname" + :format "%{%t%}: %v" + (const :tag "" :value :realname) + (choice (const :tag "Default" riece-realname) + string)) + (list :inline t :tag "Username" + :format "%{%t%}: %v" + (const :tag "" :value :username) + (choice (const :tag "Default" riece-username) + string)) + (list :inline t :tag "Password" + :format "%{%t%}: %v" + (const :tag "" :value :password) + string) + (list :inline t :tag "Function" + :format "%{%t%}: %v" + (const :tag "" :value :function) + (choice + (const :tag "Default" + riece-default-open-connection-function) + function)) + (list :inline t :tag "Coding system" + :format "%{%t%}: %v" + (const :tag "" :value :coding) + (choice + (const :tag "Default" + riece-default-coding-system) + (choice + (symbol :tag "Coding system") + (cons (symbol :tag "Input coding system") + (symbol :tag "Output coding system")) + (const nil :tag "No conversion")))))))) :group 'riece-server) (defcustom riece-server (getenv "IRCSERVER") @@ -168,14 +223,33 @@ way is to put Riece variables on .emacs or file loaded from there." :type 'string :group 'riece-server) +(defcustom riece-protocol 'irc + "Protocol support." + :type 'symbol + :group 'riece-server) + +(defcustom riece-max-send-size 512 + "Maximum size of messages to be sent at a time." + :type 'integer + :group 'riece-server) + +(defcustom riece-send-delay 2 + "Duration of multiple send." + :type 'integer + :group 'riece-server) + (defcustom riece-default-password (getenv "IRCPASSWORD") "Your password." :type '(radio (string :tag "Password") (const :tag "No" nil)) :group 'riece-server) -(defcustom riece-username (or (getenv "IRCNAME") - (user-real-login-name)) +(defcustom riece-username nil + "Your login name." + :type 'string + :group 'riece-server) + +(defcustom riece-realname nil "Your user name." :type 'string :group 'riece-server) @@ -192,13 +266,34 @@ way is to put Riece variables on .emacs or file loaded from there." (list (string :tag "Channel") (string :tag "Key")))) :group 'riece-channel) +(defcustom riece-startup-server-list nil + "A list of servers to connect automatically at startup." + :type '(repeat (string :tag "Server")) + :group 'riece-server) + (defcustom riece-retry-with-new-nickname nil "When nickname has already been in use, grow-tail automatically." :type 'boolean :group 'riece-server) -(defcustom riece-quit-timeout 10 +(defcustom riece-quit-timeout 1 "Quit timeout when there is no response from server." + :type '(radio (integer :tag "Seconds") + (const nil)) + :group 'riece-server) + +(defcustom riece-default-open-connection-function #'open-network-stream + "Default function used for connecting to an IRC server." + :type 'function + :group 'riece-server) + +(defcustom riece-user-cache-max-size 512 + "Maximum size of cache of user names." + :type 'integer + :group 'riece-server) + +(defcustom riece-channel-cache-max-size 512 + "Maximum size of cache of channel names." :type 'integer :group 'riece-server) @@ -207,6 +302,11 @@ way is to put Riece variables on .emacs or file loaded from there." :type 'boolean :group 'riece-looks) +(defcustom riece-others-buffer-mode t + "When non-nil, Riece will display an \"*Others*\" buffer." + :type 'boolean + :group 'riece-looks) + (defcustom riece-user-list-buffer-mode t "When non-nil, Riece will display a nick list buffer." :type 'boolean @@ -233,22 +333,28 @@ way is to put Riece variables on .emacs or file loaded from there." :type 'boolean :group 'riece-options) -(defcustom riece-quit-message nil +(defcustom riece-quit-message (riece-extended-version) "Default quit message." - :type '(radio (string :tag "Quit message")) + :type '(string :tag "Quit message") + :group 'riece-options) + +(defcustom riece-part-message nil + "Default part message." + :type '(choice (const :tag "No message" nil) + (string :tag "Part message")) :group 'riece-options) -(defcustom riece-away-message nil +(defcustom riece-away-message "Gone" "Default away message." - :type '(radio (string :tag "Away message")) + :type '(string :tag "Away message") :group 'riece-options) -(defcustom riece-gather-channel-modes t +(defcustom riece-gather-channel-modes nil "If non-nil, gather channel modes when we join a channel." :type 'boolean :group 'riece-options) -(defcustom riece-buffer-dispose-function #'bury-buffer +(defcustom riece-buffer-dispose-function #'kill-buffer "Function called after the buffer was disposed." :type 'function :group 'riece-options)