From 5a9192973d9098762307546e03313bacebd9edf7 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Mon, 3 Jan 2011 20:02:28 +0100 Subject: Use `gnus-range-normalize' instead of parsing `gnus-info-read' manually. --- gnus-desktop-notify.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index bb54e5d..78f4440 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -194,15 +194,12 @@ with the behavior defined by `gnus-desktop-notify-send-mode'." (let ( (updated-groups '()) ) (dolist (g gnus-newsrc-alist) (let* ( (name (gnus-info-group g)) - (read (or - (and (listp (car (gnus-info-read g))) - (cdar (gnus-info-read g))) - (cdr (gnus-info-read g)))) + (read (cdar (gnus-range-normalize (gnus-info-read g)))) (unread (gnus-group-unread name)) ) (when (and (numberp read) (numberp unread)) - (let* ( (count (+ read unread)) - (old-count (cdr (assoc name gnus-desktop-notify-counts))) - (notify (gnus-group-find-parameter name 'group-notify)) ) + (let ( (count (+ read unread)) + (old-count (cdr (assoc name gnus-desktop-notify-counts))) + (notify (gnus-group-find-parameter name 'group-notify)) ) (when (or (and (eq gnus-desktop-notify-groups 'gnus-desktop-notify-all-except) (not notify)) (and (eq gnus-desktop-notify-groups 'gnus-desktop-notify-explicit) notify)) -- cgit v1.2.3