Function: gnus-activate-group

gnus-activate-group is a byte-compiled function defined in gnus-start.el.gz.

Signature

(gnus-activate-group GROUP &optional SCAN DONT-CHECK METHOD DONT-SUB-CHECK)

Documentation

Check whether a group has been activated or not.

If SCAN, request a scan of that group as well. If METHOD, use that select method instead of determining the method based on the group name. If DONT-CHECK, don't check whether the group actually exists. If DONT-SUB-CHECK or DONT-CHECK, don't let the backend check whether the group actually exists.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-start.el.gz
(defun gnus-activate-group (group &optional scan dont-check method
				  dont-sub-check)
  "Check whether a group has been activated or not.
If SCAN, request a scan of that group as well.  If METHOD, use
that select method instead of determining the method based on the
group name.  If DONT-CHECK, don't check whether the group
actually exists.  If DONT-SUB-CHECK or DONT-CHECK, don't let the
backend check whether the group actually exists."
  (let ((method (or method (inline (gnus-find-method-for-group group))))
	active)
    (and (inline (gnus-check-server method))
	 ;; We escape all bugs and quit here to make it possible to
	 ;; continue if a group is so out-there that it reports bugs
	 ;; and stuff.
	 (progn
	   (and scan
		(gnus-check-backend-function 'request-scan (car method))
		(gnus-request-scan group method))
	   t)
	 (if (or debug-on-error debug-on-quit)
	     (inline (gnus-request-group group (or dont-sub-check dont-check)
					 method
					 (gnus-get-info group)))
	   (condition-case nil
	       (inline (gnus-request-group group (or dont-sub-check dont-check)
					   method
					   (gnus-get-info group)))
	     (quit
	      (if debug-on-quit
		  (debug "Quit")
		(message "Quit activating %s" group))
	      nil)))
	 (unless dont-check
	   (setq active (gnus-parse-active))
	   ;; If there are no articles in the group, the GROUP
	   ;; command may have responded with the `(0 . 0)'.  We
	   ;; ignore this if we already have an active entry
	   ;; for the group.
	   (if (and (zerop (or (car active) 0))
		    (zerop (or (cdr active) 0))
		    (gnus-active group))
	       (gnus-active group)

             ;; If a cache is present, we may have to alter the active info.
             (when gnus-use-cache
               (inline (gnus-cache-possibly-alter-active
                        group active)))

             ;; If the agent is enabled, we may have to alter the active info.
             (when gnus-agent
               (gnus-agent-possibly-alter-active group active))

	     (gnus-set-active group active)
	     ;; Return the new active info.
	     active)))))