# HG changeset patch # User Glenn Morris # Date 1196480441 0 # Node ID c7c6532e140f078740d5d0c88eeec3c665f42323 # Parent 3cb53b6ea3c6076442f48e7db16d57f8297f266f (iswitchb-temp-buflist, iswitchb-read-buffer): Declare for compiler. (erc-iswitchb): Don't require iswitchb when compiling. Test iswitchb-mode is bound. diff -r 3cb53b6ea3c6 -r c7c6532e140f lisp/erc/erc.el --- a/lisp/erc/erc.el Sat Dec 01 03:34:03 2007 +0000 +++ b/lisp/erc/erc.el Sat Dec 01 03:40:41 2007 +0000 @@ -1693,6 +1693,11 @@ (put 'erc-with-all-buffers-of-server 'lisp-indent-function 1) (put 'erc-with-all-buffers-of-server 'edebug-form-spec '(form form body)) +;; (iswitch-mode) will autoload iswitchb.el +(defvar iswitchb-temp-buflist) +(declare-function iswitchb-read-buffer "iswitchb" + (prompt &optional default require-match start matches-set)) + (defun erc-iswitchb (&optional arg) "Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to. When invoked with prefix argument, use all erc buffers. Without prefix @@ -1703,9 +1708,7 @@ Due to some yet unresolved reason, global function `iswitchb-mode' needs to be active for this function to work." (interactive "P") - (eval-when-compile - (require 'iswitchb)) - (let ((enabled iswitchb-mode)) + (let ((enabled (bound-and-true-p iswitchb-mode))) (or enabled (iswitchb-mode 1)) (unwind-protect (let ((iswitchb-make-buflist-hook