diff options
| author | Deniz Dogan | 2011-02-11 07:19:34 +0100 |
|---|---|---|
| committer | Deniz Dogan | 2011-02-11 07:19:34 +0100 |
| commit | e0e36cac4adaa32ad755a34c811366dd8e4655bc (patch) | |
| tree | a3629d60c84ce8f30cd5d5c57cff465baaf07c1f | |
| parent | 5935086250d4e5f657784d9fb9505e50b9bb8adf (diff) | |
| download | emacs-e0e36cac4adaa32ad755a34c811366dd8e4655bc.tar.gz emacs-e0e36cac4adaa32ad755a34c811366dd8e4655bc.zip | |
* lisp/net/rcirc.el (defun-rcirc-join): Accept multiple channels.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 18 |
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f860d8a968..b3735e37289 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com> | ||
| 2 | |||
| 3 | * net/rcirc.el (defun-rcirc-join): Accept multiple channels. | ||
| 4 | |||
| 1 | 2011-02-11 Glenn Morris <rgm@gnu.org> | 5 | 2011-02-11 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * emacs-lisp/cl-specs.el (multiple-value-bind): Fix debug spec. | 7 | * emacs-lisp/cl-specs.el (multiple-value-bind): Fix debug spec. |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index c3e4f3d6169..8657dc58bf4 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -2098,14 +2098,18 @@ activity. Only run if the buffer is not visible and | |||
| 2098 | (when (not existing-buffer) | 2098 | (when (not existing-buffer) |
| 2099 | (rcirc-cmd-whois nick)))) | 2099 | (rcirc-cmd-whois nick)))) |
| 2100 | 2100 | ||
| 2101 | (defun-rcirc-command join (channel) | 2101 | (defun-rcirc-command join (channels) |
| 2102 | "Join CHANNEL." | 2102 | "Join CHANNELS. |
| 2103 | (interactive "sJoin channel: ") | 2103 | CHANNELS is a comma- or space-separated string of channel names." |
| 2104 | (let ((buffer (rcirc-get-buffer-create process | 2104 | (interactive "sJoin channels: ") |
| 2105 | (car (split-string channel))))) | 2105 | (let* ((split-channels (split-string channels "[ ,]" t)) |
| 2106 | (rcirc-send-string process (concat "JOIN " channel)) | 2106 | (buffers (mapcar (lambda (ch) |
| 2107 | (rcirc-get-buffer-create process ch)) | ||
| 2108 | split-channels))) | ||
| 2109 | (rcirc-send-string process (concat "JOIN " channels)) | ||
| 2107 | (when (not (eq (selected-window) (minibuffer-window))) | 2110 | (when (not (eq (selected-window) (minibuffer-window))) |
| 2108 | (switch-to-buffer buffer)))) | 2111 | (dolist (b buffers) ;; order the new channel buffers in the buffer list |
| 2112 | (switch-to-buffer b))))) | ||
| 2109 | 2113 | ||
| 2110 | ;; TODO: /part #channel reason, or consider removing #channel altogether | 2114 | ;; TODO: /part #channel reason, or consider removing #channel altogether |
| 2111 | (defun-rcirc-command part (channel) | 2115 | (defun-rcirc-command part (channel) |