From a0dc03a8694671cb4afea3f39a09c3a3f4d73ec5 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 4 Feb 2005 23:28:07 +0000 Subject: [PATCH] * riece-options.el (riece-part-message): New user option. * riece-commands.el (riece-command-part): Use riece-part-message. --- lisp/ChangeLog | 5 +++++ lisp/riece-commands.el | 12 ++++++------ lisp/riece-options.el | 6 ++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a912203..2a31286 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-02-04 Daiki Ueno + + * riece-options.el (riece-part-message): New user option. + * riece-commands.el (riece-command-part): Use riece-part-message. + 2005-02-04 OHASHI Akira * riece-eval.el (riece-eval-form): New function. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 2175264..38a2edb 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -466,7 +466,7 @@ the layout to the selected layout-name." (format "PART %s\r\n" (riece-identity-prefix target)))))) -(defun riece-command-part (target &optional message) +(defun riece-command-part (target) (interactive (progn (riece-check-channel-commands-are-usable) @@ -477,10 +477,10 @@ the layout to the selected layout-name." (riece-format-identity riece-current-channel)) riece-current-channels nil nil nil nil (riece-format-identity riece-current-channel))) - message) - (if (and current-prefix-arg - (riece-channel-p (riece-identity-prefix target))) - (setq message (read-string "Message: "))) + (message + (if current-prefix-arg + (read-string "Message: ") + riece-part-message))) (list target message)))) (if (riece-identity-member target riece-current-channels) (if (riece-channel-p (riece-identity-prefix target)) @@ -609,7 +609,7 @@ If prefix argument ARG is non-nil, toggle frozen status." (let ((message (if arg (read-string "Message: ") - riece-quit-message)) + riece-quit-message)) (alist riece-server-process-alist)) (while alist (riece-quit-server-process (cdr (car alist)) message) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 730cd9b..2c253b3 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -270,6 +270,12 @@ way is to put Riece variables on .emacs or file loaded from there." :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 "Gone" "Default away message." :type '(string :tag "Away message") -- 1.7.10.4