changeset 111276:23bef14261e1

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.
author Glenn Morris <rgm@gnu.org>
date Sun, 31 Oct 2010 18:34:55 -0700
parents 393b44bc9757
children f1b7bcd27c95
files lisp/gnus/ChangeLog lisp/gnus/gnus-util.el
diffstat 2 files changed, 24 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Sun Oct 31 19:21:53 2010 -0400
+++ b/lisp/gnus/ChangeLog	Sun Oct 31 18:34:55 2010 -0700
@@ -1,3 +1,9 @@
+2010-11-01  Glenn Morris  <rgm@gnu.org>
+
+	* 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  <larsi@gnus.org>
 
 	* message.el (message-subject-trailing-was-query): Change default to t,
--- a/lisp/gnus/gnus-util.el	Sun Oct 31 19:21:53 2010 -0400
+++ b/lisp/gnus/gnus-util.el	Sun Oct 31 18:34:55 2010 -0700
@@ -1651,10 +1651,14 @@
 		       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 @@
                    (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 @@
 	(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.