diff options
Diffstat (limited to 'lisp/org/org-irc.el')
-rw-r--r-- | lisp/org/org-irc.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index 7a84d2053ad..c4ad32146d7 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el @@ -4,7 +4,6 @@ ;; ;; Author: Philip Jackson <emacs@shellarchive.co.uk> ;; Keywords: erc, irc, link, org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -60,6 +59,8 @@ (declare-function erc-server-buffer "erc" ()) (declare-function erc-get-server-nickname-list "erc" ()) (declare-function erc-cmd-JOIN "erc" (channel &optional key)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) (defvar org-irc-client 'erc "The IRC client to act on.") @@ -232,7 +233,7 @@ default." (throw 'found x)))))) (if chan-buf (progn - (switch-to-buffer chan-buf) + (org-pop-to-buffer-same-window chan-buf) ;; if we got a nick, and they're in the chan, ;; then start a chat with them (let ((nick (pop link))) @@ -243,14 +244,12 @@ default." (insert (concat nick ": "))) (error "%s not found in %s" nick chan-name))))) (progn - (switch-to-buffer server-buffer) + (org-pop-to-buffer-same-window server-buffer) (erc-cmd-JOIN chan-name)))) - (switch-to-buffer server-buffer))) + (org-pop-to-buffer-same-window server-buffer))) ;; no server match, make new connection (erc-select :server server :port port)))) (provide 'org-irc) - - ;;; org-irc.el ends here |