;;
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
;; Keywords: erc, irc, link, org
-;; Version: 7.7
;;
;; This file is part of GNU Emacs.
;;
(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.")
(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)))
(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