+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,
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
(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)
(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.