* riece-options.el (riece-part-message): New user option.
[riece] / lisp / riece-options.el
index 44dfc92..c55dd33 100644 (file)
@@ -24,6 +24,7 @@
 
 ;;; Code:
 
+(require 'riece-version)
 (require 'riece-globals)
 
 ;; User modifiable variables.
@@ -38,7 +39,8 @@
 (defcustom riece-saved-forms
   '(riece-server-alist
     riece-channel-buffer-mode
-    riece-user-list-buffer-mode)
+    riece-user-list-buffer-mode
+    riece-layout)
   "Variables saved after each session is completed."
   :type 'string
   :group 'riece-options)
   :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"
   :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-directory "~/.riece"
+(defcustom riece-directory (expand-file-name "~/.riece")
   "Where to look for data files."
   :type 'directory
   :group 'riece-options)
@@ -78,7 +83,7 @@
   "Where to look for add-on files."
   :type 'directory
   :group 'riece-options)
-  
+
 (defcustom riece-variables-file
   (expand-file-name "init" riece-directory)
   "Where to look for variables."
@@ -105,7 +110,15 @@ way is to put Riece variables on .emacs or file loaded from there."
                          riece-guess
                          riece-unread
                          riece-history
-                         riece-url)
+                         riece-url
+                         riece-button
+                         riece-menu
+                         riece-icon
+                         riece-ignore
+                         riece-log
+                         riece-toolbar
+                         riece-alias
+                         riece-ctlseq)
   "Add-ons insinuated into Riece."
   :type '(repeat symbol)
   :group 'riece-options)
@@ -153,7 +166,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
@@ -164,14 +177,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)
@@ -188,6 +215,11 @@ 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
@@ -195,7 +227,13 @@ way is to put Riece variables on .emacs or file loaded from there."
 
 (defcustom riece-quit-timeout 10
   "Quit timeout when there is no response from server."
-  :type 'integer
+  :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-channel-buffer-mode t
@@ -229,26 +267,48 @@ 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)
 
+(defcustom riece-shrink-buffer-idle-time-delay 5
+  "Number of idle seconds to wait before shrinking channel buffers."
+  :type 'integer
+  :group 'riece-options)
+
+(defcustom riece-max-buffer-size nil
+  "Maximum size of channel buffers."
+  :type '(radio (integer :tag "Number of characters")
+               (const nil))
+  :group 'riece-options)
+
+(defcustom riece-shrink-buffer-remove-chars (/ riece-max-send-size 2)
+  "Number of chars removed when shrinking channel buffers."
+  :type 'integer
+  :group 'riece-options)
+
 (defcustom riece-format-time-function #'current-time-string
   "Function to convert the specified time to the human readable form."
   :type 'function