From: ueno Date: Mon, 15 Dec 2003 03:43:23 +0000 (+0000) Subject: * riece-options.el: Require 'riece-version. X-Git-Tag: riece-0_1_7~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dad6e5493ed510ca1ea03ec73a5a5e92cbb65eea;p=elisp%2Friece.git * riece-options.el: Require 'riece-version. (riece-quit-message): Set default to (riece-extended-version). (riece-away-message): Set default to "Gone". * riece-commands.el: Don't require 'riece-version. (riece-command-quit): Don't check riece-quit-message. (riece-command-close-server): Ditto. (riece-command-toggle-away): Always supply a parameter to the AWAY command when the user is not away. Thanks to Yuki Fujimura [cf. ] --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66eb8ff..9c4371d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2003-12-15 Daiki Ueno + + * riece-options.el: Require 'riece-version. + (riece-quit-message): Set default to (riece-extended-version). + (riece-away-message): Set default to "Gone". + + * riece-commands.el: Don't require 'riece-version. + (riece-command-quit): Don't check riece-quit-message. + (riece-command-close-server): Ditto. + (riece-command-toggle-away): Always supply a parameter to the AWAY + command when the user is not away. Thanks to Yuki Fujimura + + [cf. ] + 2003-12-14 Daiki Ueno * riece.el (riece): Connect to servers in riece-startup-server-list. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index c242442..890e2e8 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -28,7 +28,6 @@ (require 'riece-complete) (require 'riece-layout) (require 'riece-display) -(require 'riece-version) (require 'riece-server) (require 'riece-misc) (require 'riece-identity) @@ -541,13 +540,16 @@ the layout to the selected layout-name." (riece-current-nickname)) (riece-user-get-away (riece-identity-prefix (riece-current-nickname))))) - (or (null riece-away-message) - current-prefix-arg)) - (let ((message (read-string "Away message: "))) - (list message)))) - (if message - (riece-send-string (format "AWAY :%s\r\n" message)) - (riece-send-string "AWAY\r\n"))) + current-prefix-arg) + (list (read-from-minibuffer + "Away message: " (cons (or riece-away-message "") 0))))) + (if (riece-with-server-buffer (riece-identity-server + (riece-current-nickname)) + (riece-user-get-away (riece-identity-prefix + (riece-current-nickname)))) + (riece-send-string "AWAY\r\n") + (riece-send-string (format "AWAY :%s\r\n" (or message + riece-away-message))))) (defun riece-command-toggle-freeze (&optional arg) "Prevent automatic scrolling of the dialogue window. @@ -590,8 +592,7 @@ If prefix argument ARG is non-nil, toggle frozen status." (let ((message (if arg (read-string "Message: ") - (or riece-quit-message - (riece-extended-version)))) + riece-quit-message)) (alist riece-server-process-alist)) (while alist (riece-quit-server-process (cdr (car alist)) message) @@ -638,8 +639,7 @@ If prefix argument ARG is non-nil, toggle frozen status." (list (completing-read "Server: " riece-server-process-alist) (if current-prefix-arg (read-string "Message: ") - (or riece-quit-message - (riece-extended-version))))) + riece-quit-message))) (riece-quit-server-process (riece-server-process server-name) message)) (defun riece-command-universal-server-name-argument () diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 7c91544..4ed5f02 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -24,6 +24,7 @@ ;;; Code: +(require 'riece-version) (require 'riece-globals) ;; User modifiable variables. @@ -244,14 +245,14 @@ 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-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 nil