2006-09-23 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * 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).
(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)))
(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."
(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
(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))