* elmo-map.el (elmo-location-map-setup): Change an argument
authorhmurata <hmurata>
Sat, 23 Sep 2006 13:18:06 +0000 (13:18 +0000)
committerhmurata <hmurata>
Sat, 23 Sep 2006 13:18:06 +0000 (13:18 +0000)
`locations' to optional.
(elmo-location-map-clear): Abolish.
(elmo-folder-clear): Follow the API change.

* elmo-pop3.el (elmo-folder-clear): Ditto.

elmo/ChangeLog
elmo/elmo-map.el
elmo/elmo-pop3.el

index 37499b2..ba473c1 100644 (file)
@@ -1,5 +1,12 @@
 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).
index 2576f05..129fde0 100644 (file)
@@ -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
index 14e98e3..7aef677 100644 (file)
@@ -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))