Commit e0e36cac authored by Deniz Dogan's avatar Deniz Dogan

* lisp/net/rcirc.el (defun-rcirc-join): Accept multiple channels.

parent 59350862
2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com>
* net/rcirc.el (defun-rcirc-join): Accept multiple channels.
2011-02-11 Glenn Morris <rgm@gnu.org>
* emacs-lisp/cl-specs.el (multiple-value-bind): Fix debug spec.
......
......@@ -2098,14 +2098,18 @@ activity. Only run if the buffer is not visible and
(when (not existing-buffer)
(rcirc-cmd-whois nick))))
(defun-rcirc-command join (channel)
"Join CHANNEL."
(interactive "sJoin channel: ")
(let ((buffer (rcirc-get-buffer-create process
(car (split-string channel)))))
(rcirc-send-string process (concat "JOIN " channel))
(defun-rcirc-command join (channels)
"Join CHANNELS.
CHANNELS is a comma- or space-separated string of channel names."
(interactive "sJoin channels: ")
(let* ((split-channels (split-string channels "[ ,]" t))
(buffers (mapcar (lambda (ch)
(rcirc-get-buffer-create process ch))
split-channels)))
(rcirc-send-string process (concat "JOIN " channels))
(when (not (eq (selected-window) (minibuffer-window)))
(switch-to-buffer buffer))))
(dolist (b buffers) ;; order the new channel buffers in the buffer list
(switch-to-buffer b)))))
;; TODO: /part #channel reason, or consider removing #channel altogether
(defun-rcirc-command part (channel)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment