From a1daed2bd74cd9afdd6d49e9ffa06c12ba263891 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 31 Oct 2010 18:34:55 -0700 Subject: [PATCH] Silence gnus-util.el compilation. * lisp/gnu/gnus-util.el (iswitchb-read-buffer): Declare rather than autoload. (gnus-iswitchb-completing-read): Require iswitchb. (gnus-select-frame-set-input-focus): Silence compiler. --- lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/gnus-util.el | 30 ++++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0e86799f7fe..31b7e5d4217 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2010-11-01 Glenn Morris + + * gnus-util.el (iswitchb-read-buffer): Declare rather than autoload. + (gnus-iswitchb-completing-read): Require iswitchb. + (gnus-select-frame-set-input-focus): Silence compiler. + 2010-10-31 Lars Magne Ingebrigtsen * message.el (message-subject-trailing-was-query): Change default to t, diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 0bffb36f2bf..239d81075dd 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1651,10 +1651,14 @@ SPEC is a predicate specifier that contains stuff like `or', `and', initial-input history def)) -(autoload 'iswitchb-read-buffer "iswitchb") +(declare-function iswitchb-read-buffer "iswitchb" + (prompt &optional default require-match start matches-set)) +(defvar iswitchb-temp-buflist) + (defun gnus-iswitchb-completing-read (prompt collection &optional require-match initial-input history def) "`iswitchb' based completing-read function." + (require 'iswitchb) (let ((iswitchb-make-buflist-hook (lambda () (setq iswitchb-temp-buflist @@ -1667,11 +1671,11 @@ SPEC is a predicate specifier that contains stuff like `or', `and', (nreverse filtered-choices)))))) (unwind-protect (progn - (when (not iswitchb-mode) - (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)) + (or iswitchb-mode + (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)) (iswitchb-read-buffer prompt def require-match)) - (when (not iswitchb-mode) - (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))))) + (or iswitchb-mode + (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))))) (defun gnus-graphic-display-p () (if (featurep 'xemacs) @@ -1758,14 +1762,16 @@ CHOICE is a list of the choice char and help message at IDX." (kill-buffer buf)) tchar)) -(if (fboundp 'select-frame-set-input-focus) +(if (featurep 'emacs) (defalias 'gnus-select-frame-set-input-focus 'select-frame-set-input-focus) - ;; XEmacs 21.4, SXEmacs - (defun gnus-select-frame-set-input-focus (frame) - "Select FRAME, raise it, and set input focus, if possible." - (raise-frame frame) - (select-frame frame) - (focus-frame frame))) + (if (fboundp 'select-frame-set-input-focus) + (defalias 'gnus-select-frame-set-input-focus 'select-frame-set-input-focus) + ;; XEmacs 21.4, SXEmacs + (defun gnus-select-frame-set-input-focus (frame) + "Select FRAME, raise it, and set input focus, if possible." + (raise-frame frame) + (select-frame frame) + (focus-frame frame)))) (defun gnus-frame-or-window-display-name (object) "Given a frame or window, return the associated display name. -- 2.39.5