From 8e176222e8bf73ec13db48f6be7405b78f4b26b3 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sat, 23 Sep 2006 13:18:06 +0000 Subject: [PATCH] * elmo-map.el (elmo-location-map-setup): Change an argument `locations' to optional. (elmo-location-map-clear): Abolish. (elmo-folder-clear): Follow the API change. * elmo-pop3.el (elmo-folder-clear): Ditto. --- elmo/ChangeLog | 7 +++++++ elmo/elmo-map.el | 9 ++------- elmo/elmo-pop3.el | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 37499b2..ba473c1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,12 @@ 2006-09-23 Hiroya Murata + * elmo-map.el (elmo-location-map-setup): Change an argument + `locations' to optional. + (elmo-location-map-clear): Abolish. + (elmo-folder-clear): Follow the API change. + + * elmo-pop3.el (elmo-folder-clear): Ditto. + * elmo-pop3.el (toplevel): Require elmo-map. (elmo-pop3-folder): Inherit elmo-location-map and abolish location-alist slot (All other related portions are changed). diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 2576f05..129fde0 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -72,7 +72,7 @@ (cons (cons (elmo-location-map-max-number location-map) nil) alist)))) -(defun elmo-location-map-setup (location-map locations) +(defun elmo-location-map-setup (location-map &optional locations) "Setup internal data of LOCATION-MAP by LOCATIONS. Return a location alist." (let ((hash (elmo-make-hash (length locations))) @@ -92,11 +92,6 @@ Return a location alist." (elmo-location-map-set-alist location-map nil) (elmo-location-map-set-hash location-map nil)) -(defun elmo-location-map-clear (location-map) - (elmo-location-map-set-max-number location-map 0) - (elmo-location-map-set-alist location-map nil) - (elmo-location-map-set-hash location-map (elmo-make-hash))) - (defun elmo-location-map-update (location-map locations) "Update location alist in LOCATION-MAP by LOCATIONS. Return new location alist." @@ -257,7 +252,7 @@ Return new location alist." (luna-define-method elmo-folder-clear :around ((folder elmo-map-folder) &optional keep-killed) (unless keep-killed - (elmo-location-map-clear folder)) + (elmo-location-map-setup folder)) (luna-call-next-method)) (luna-define-method elmo-folder-list-messages-internal diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index 14e98e3..7aef677 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -887,7 +887,7 @@ until the login delay period has expired")) (luna-define-method elmo-folder-clear :around ((folder elmo-pop3-folder) &optional keep-killed) (unless keep-killed - (elmo-location-map-clear folder)) + (elmo-location-map-setup folder)) (luna-call-next-method)) (luna-define-method elmo-folder-check ((folder elmo-pop3-folder)) -- 1.7.10.4