X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2Friece-options.el;h=0f814035f1ed9296f064e812f16849ff5468c5ed;hp=7c7515e17b1b3f9ca31339a84a5174cb73f30ae2;hb=1f12f5fe16ac7823e9a4fda498e0c29c4ce32753;hpb=fe7ce5e9a344721b1ecdd4d9ec1adce5dc908a49 diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 7c7515e..0f81403 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -24,21 +24,26 @@ ;;; Code: +(require 'riece-version) (require 'riece-globals) ;; User modifiable variables. (defgroup riece nil - "Riece specific customize group") + "Riece specific customize group.") (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-user-list-buffer-mode) + riece-others-buffer-mode + riece-user-list-buffer-mode + riece-channel-list-buffer-mode + riece-layout + riece-addons) "Variables saved after each session is completed." :type 'string :group 'riece-options) @@ -48,50 +53,48 @@ :type 'boolean :group 'riece-options) +(defcustom riece-command-prefix "\C-c" + "Key sequence to be used as prefix for command mode key bindings." + :type 'string + :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 :group 'riece-looks) -(defcustom riece-tab-stop-list '(2 4 6 8 10 12 14 16) - "To override `tab-stop-list'." - :type '(repeat integer) +(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-icon-directory nil - "Location of the icon directory." +(defcustom riece-directory (expand-file-name "~/.riece") + "Where to look for startup files." :type 'directory - :group 'riece-looks) - -(defcustom riece-user-image-alist - '((?@ . "ball.red.xpm") - (?+ . "ball.gray.xpm") - (? . "ball.blank.xpm")) - "An alist of icons to display user's mode." - :type '(repeat (list (character :tag "Mark") - (string :tag "XPM file"))) - :group 'riece-looks) + :group 'riece-options) -(defcustom riece-inhibit-startup-message nil - "If non-nil, the startup message will not be displayed." - :group 'riece-looks - :type 'boolean) +(defcustom riece-addon-directory + (expand-file-name "addons" riece-directory) + "Where to look for add-on files." + :type 'directory + :group 'riece-options) -(defcustom riece-directory "~/.riece" +(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." @@ -113,13 +116,32 @@ way is to put Riece variables on .emacs or file loaded from there." :type '(repeat (file :tag "Initialization File")) :group 'riece-options) +(defcustom riece-addons '(riece-highlight + riece-ctcp + riece-guess + riece-unread + riece-history + riece-url + riece-button + riece-menu + riece-icon + riece-ignore + riece-log + riece-toolbar + riece-alias + riece-ctlseq + riece-keyword) + "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) @@ -156,7 +178,7 @@ way is to put Riece variables on .emacs or file loaded from there." (args (list spec))) (widget-put widget :args args) widget)) - + (defcustom riece-server-alist nil "An alist mapping server names to plist." :type 'riece-server-spec @@ -167,14 +189,28 @@ 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 user name." :type 'string :group 'riece-server) @@ -187,19 +223,51 @@ way is to put Riece variables on .emacs or file loaded from there." (defcustom riece-startup-channel-list nil "A list of channels to join automatically at startup." - :type '(repeat (string :tag "Startup Channel")) + :type '(repeat (choice (string :tag "Channel") + (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 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 usernames." + :type 'integer + :group 'riece-server) + +(defcustom riece-channel-cache-max-size 512 + "Maximum size of cache of channel names." + :type 'integer + :group 'riece-server) + (defcustom riece-channel-buffer-mode t "When non-nil, Riece will display a channel buffer." :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 @@ -211,12 +279,7 @@ way is to put Riece variables on .emacs or file loaded from there." :group 'riece-looks) (defcustom riece-default-freeze nil - "If non nil, channel buffer local freeze flag is on at starting." - :type 'boolean - :group 'riece-looks) - -(defcustom riece-default-own-freeze nil - "If non nil, channel buffer local own freeze flag is on at starting." + "Channel buffer local freeze flag is on at starting." :type 'boolean :group 'riece-looks) @@ -231,22 +294,28 @@ way is to put Riece variables on .emacs or file loaded from there." :type 'boolean :group 'riece-options) -(defcustom riece-quit-message nil - "Default signoff message." - :type '(radio (string :tag "Signoff message")) +(defcustom riece-quit-message (riece-extended-version) + "Default quit message." + :type '(string :tag "Quit message") :group 'riece-options) -(defcustom riece-gather-channel-modes t +(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 "Gone" + "Default away message." + :type '(string :tag "Away message") + :group 'riece-options) + +(defcustom riece-gather-channel-modes nil "If non-nil, gather channel modes when we join a channel." :type 'boolean :group 'riece-options) -(defcustom riece-connection-timeout 60 - "Default timeout interval." - :type 'integer - :group 'riece-server) - -(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)