emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107625: * lisp/net/rcirc.el (rcirc-c


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107625: * lisp/net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with
Date: Sun, 18 Mar 2012 11:27:28 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107625
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Sun 2012-03-18 11:27:28 +0800
message:
  * lisp/net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with
  prefix.
modified:
  lisp/ChangeLog
  lisp/net/rcirc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-03-17 19:46:52 +0000
+++ b/lisp/ChangeLog    2012-03-18 03:27:28 +0000
@@ -1,3 +1,8 @@
+2012-03-18  Leo Liu  <address@hidden>
+
+       * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with
+       prefix.
+
 2012-03-17  Eli Zaretskii  <address@hidden>
 
        * textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)

=== modified file 'lisp/net/rcirc.el'
--- a/lisp/net/rcirc.el 2012-02-13 07:54:47 +0000
+++ b/lisp/net/rcirc.el 2012-03-18 03:27:28 +0000
@@ -2165,13 +2165,17 @@
   (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."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]