From: Leo Liu Date: Sun, 18 Mar 2012 03:27:28 +0000 (+0800) Subject: * lisp/net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with X-Git-Tag: emacs-pretest-24.0.05~85^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=153609342a86a37e18d6be8c8f28c96efb4d03c7;p=emacs.git * lisp/net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with prefix. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9bdfd5c1b73..06b273fa178 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-03-18 Leo Liu + + * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with + prefix. + 2012-03-17 Eli Zaretskii * textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 1c74e6190dc..d09b6aa831f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2165,13 +2165,17 @@ CHANNELS is a comma- or space-separated string of channel names." (let ((channel (if (> (length channel) 0) channel target))) (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string)))) -(defun-rcirc-command quit (reason) - "Send a quit message to server with REASON." - (interactive "sQuit reason: ") - (rcirc-send-string process (concat "QUIT :" - (if (not (zerop (length reason))) - reason - rcirc-id-string)))) +(defun-rcirc-command quit (reason all) + "Send a quit message to server with REASON. +When called with prefix, quit all servers." + (interactive "sQuit reason: \nP") + (dolist (p (if all + (rcirc-process-list) + (list process))) + (rcirc-send-string p (concat "QUIT :" + (if (not (zerop (length reason))) + reason + rcirc-id-string))))) (defun-rcirc-command nick (nick) "Change nick to NICK."