comparison lisp/gnus/gnus-start.el @ 167:85ec50267440 r20-3b10

Import from CVS: tag r20-3b10
author cvs
date Mon, 13 Aug 2007 09:45:46 +0200
parents 25f70ba0133c
children 15872534500d
comparison
equal deleted inserted replaced
166:7a77eb660975 167:85ec50267440
1282 (defvar gnus-cache-active-hashtb) 1282 (defvar gnus-cache-active-hashtb)
1283 (defun gnus-cache-possibly-alter-active (group active) 1283 (defun gnus-cache-possibly-alter-active (group active)
1284 "Alter the ACTIVE info for GROUP to reflect the articles in the cache." 1284 "Alter the ACTIVE info for GROUP to reflect the articles in the cache."
1285 (when gnus-cache-active-hashtb 1285 (when gnus-cache-active-hashtb
1286 (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) 1286 (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb)))
1287 (and cache-active 1287 (when cache-active
1288 (< (car cache-active) (car active)) 1288 (when (< (car cache-active) (car active))
1289 (setcar active (car cache-active))) 1289 (setcar active (car cache-active)))
1290 (and cache-active 1290 (when (> (cdr cache-active) (cdr active))
1291 (> (cdr cache-active) (cdr active)) 1291 (setcdr active (cdr cache-active))))))))
1292 (setcdr active (cdr cache-active)))))))
1293 1292
1294 (defun gnus-activate-group (group &optional scan dont-check method) 1293 (defun gnus-activate-group (group &optional scan dont-check method)
1295 ;; Check whether a group has been activated or not. 1294 ;; Check whether a group has been activated or not.
1296 ;; If SCAN, request a scan of that group as well. 1295 ;; If SCAN, request a scan of that group as well.
1297 (let ((method (or method (inline (gnus-find-method-for-group group)))) 1296 (let ((method (or method (inline (gnus-find-method-for-group group))))
1307 t) 1306 t)
1308 (condition-case () 1307 (condition-case ()
1309 (inline (gnus-request-group group dont-check method)) 1308 (inline (gnus-request-group group dont-check method))
1310 (error nil) 1309 (error nil)
1311 (quit nil)) 1310 (quit nil))
1312 (gnus-set-active group (setq active (gnus-parse-active))) 1311 (setq active (gnus-parse-active))
1312 ;; If there are no articles in the group, the GROUP
1313 ;; command may have responded with the `(0 . 0)'. We
1314 ;; ignore this if we already have an active entry
1315 ;; for the group.
1316 (unless (and (zerop (car active))
1317 (zerop (cdr active))
1318 (gnus-active group))
1319 (gnus-set-active group active))
1313 ;; Return the new active info. 1320 ;; Return the new active info.
1314 active))) 1321 active)))
1315 1322
1316 (defun gnus-get-unread-articles-in-group (info active &optional update) 1323 (defun gnus-get-unread-articles-in-group (info active &optional update)
1317 (when active 1324 (when active