(nnimap-request-group): Don't SELECT the group twice on `M-g'.
[gnus] / lisp / gnus-util.el
index b3f73d7..5326b93 100644 (file)
@@ -33,7 +33,7 @@
 
 ;;; Code:
 
-;; For Emacs < 22.2.
+;; For Emacs <22.2 and XEmacs.
 (eval-and-compile
   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile
@@ -1290,6 +1290,11 @@ ARG is passed to the first function."
   (save-current-buffer
     (apply 'run-hooks funcs)))
 
+(defun gnus-run-hook-with-args (hook &rest args)
+  "Does the same as `run-hook-with-args', but saves the current buffer."
+  (save-current-buffer
+    (apply 'run-hook-with-args hook args)))
+
 (defun gnus-run-mode-hooks (&rest funcs)
   "Run `run-mode-hooks' if it is available, otherwise `run-hooks'.
 This function saves the current buffer."
@@ -1361,7 +1366,7 @@ Return the modified alist."
        (when (string-match r word)
          (throw 'found r))))))
 
-(defmacro gnus-pull (key alist &optional assoc-p)
+(defmacro gnus-alist-pull (key alist &optional assoc-p)
   "Modify ALIST to be without KEY."
   (unless (symbolp alist)
     (error "Not a symbol: %s" alist))
@@ -1642,7 +1647,8 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
 (defun gnus-ido-completing-read (prompt collection &optional require-match
                                         initial-input history def)
   "Call `ido-completing-read-function'."
-  (ido-completing-read prompt collection nil require-match initial-input history def))
+  (ido-completing-read prompt collection nil require-match
+                      initial-input history def))
 
 
 (autoload 'iswitchb-read-buffer "iswitchb")