From: Glenn Morris Date: Sat, 1 Dec 2007 03:40:41 +0000 (+0000) Subject: (iswitchb-temp-buflist, iswitchb-read-buffer): Declare for compiler. X-Git-Tag: emacs-pretest-23.0.90~9205 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ba3c59a5b388f7a51b3e90a27882f45cb89dbbd;p=emacs.git (iswitchb-temp-buflist, iswitchb-read-buffer): Declare for compiler. (erc-iswitchb): Don't require iswitchb when compiling. Test iswitchb-mode is bound. --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index c6e5ea99c83..f078ee32a79 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1693,6 +1693,11 @@ nil." (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 @@ If `erc-track-mode' is in enabled, put the last element of 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