* elmo-pop3.el (elmo-folder-delete-messages-plugged): Renamed from
authorhmurata <hmurata>
Thu, 8 Nov 2001 15:27:05 +0000 (15:27 +0000)
committerhmurata <hmurata>
Thu, 8 Nov 2001 15:27:05 +0000 (15:27 +0000)
`elmo-folder-delete-messages'.

* elmo-nmz.el (elmo-nmz-index-alias-alist): New user option.
(elmo-folder-initialize): Changed to expand alias into index path.

* elmo-mime.el (elmo-mime-insert-sorted-header): Call
`elmo-mime-insert-header-from-buffer' with 6th arg
`sorted-fields'.

elmo/ChangeLog
elmo/elmo-mime.el
elmo/elmo-nmz.el
elmo/elmo-pop3.el

index 9135b09..2f4fae1 100644 (file)
@@ -1,3 +1,15 @@
+2001-11-08  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-pop3.el (elmo-folder-delete-messages-plugged): Renamed from
+       `elmo-folder-delete-messages'.
+
+       * elmo-nmz.el (elmo-nmz-index-alias-alist): New user option.
+       (elmo-folder-initialize): Changed to expand alias into index path.
+
+       * elmo-mime.el (elmo-mime-insert-sorted-header): Call
+       `elmo-mime-insert-header-from-buffer' with 6th arg
+       `sorted-fields'.
+
 2001-11-08  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * mmimap.el (mmimap-entity-section): If node-id is nil, return "0".
index 7705677..498944c 100644 (file)
 ;;
 
 ;;; Commentary:
-;; 
+;;
 
 ;;; Code:
-;; 
+;;
 (require 'elmo-vars)
 (require 'mmbuffer)
 (require 'mmimap)
@@ -77,7 +77,7 @@ value is used."
        (mode-obj (mime-find-field-presentation-method 'wide))
        field-decoder
        f-b p f-e field-name field field-body
-        vf-alist (sl sort-fields))
+       vf-alist (sl sort-fields))
     (save-excursion
       (set-buffer buffer)
       (save-restriction
@@ -95,42 +95,42 @@ value is used."
                  field-body (buffer-substring p f-e)
                  field-decoder (inline (mime-find-field-decoder-internal
                                         field mode-obj)))
-            (setq vf-alist (append (list
-                                    (cons field-name
-                                          (list field-body field-decoder)))
-                                   vf-alist))))
-        (and vf-alist
-             (setq vf-alist
-                   (sort vf-alist
-                         (function (lambda (s d)
-                                     (let ((n 0) re
-                                           (sf (car s))
-                                           (df (car d)))
-                                       (catch 'done
-                                         (while (setq re (nth n sl))
-                                           (setq n (1+ n))
-                                           (and (string-match re sf)
-                                                (throw 'done t))
-                                           (and (string-match re df)
-                                                (throw 'done nil)))
-                                         t)))))))
-        (with-current-buffer the-buf
-          (while vf-alist
-            (let* ((vf (car vf-alist))
-                   (field-name (car vf))
-                   (field-body (car (cdr vf)))
-                   (field-decoder (car (cdr (cdr vf)))))
-              (insert field-name)
+           (setq vf-alist (append (list
+                                   (cons field-name
+                                         (list field-body field-decoder)))
+                                  vf-alist))))
+       (and vf-alist
+            (setq vf-alist
+                  (sort vf-alist
+                        (function (lambda (s d)
+                                    (let ((n 0) re
+                                          (sf (car s))
+                                          (df (car d)))
+                                      (catch 'done
+                                        (while (setq re (nth n sl))
+                                          (setq n (1+ n))
+                                          (and (string-match re sf)
+                                               (throw 'done t))
+                                          (and (string-match re df)
+                                               (throw 'done nil)))
+                                        t)))))))
+       (with-current-buffer the-buf
+         (while vf-alist
+           (let* ((vf (car vf-alist))
+                  (field-name (car vf))
+                  (field-body (car (cdr vf)))
+                  (field-decoder (car (cdr (cdr vf)))))
+             (insert field-name)
              (insert (if field-decoder
                          (funcall field-decoder field-body
-                                   (string-width field-name)
+                                  (string-width field-name)
                                   (if (functionp elmo-mime-header-max-column)
                                       (funcall elmo-mime-header-max-column)
                                     elmo-mime-header-max-column))
                        ;; Don't decode
                        field-body))
-              (insert "\n"))
-            (setq vf-alist (cdr vf-alist)))
+             (insert "\n"))
+           (setq vf-alist (cdr vf-alist)))
          (run-hooks 'mmelmo-header-inserted-hook))))))
 
 (luna-define-generic elmo-mime-insert-sorted-header (entity
@@ -164,7 +164,9 @@ value is used."
            p-max (point-max))
       (set-buffer the-buf)
       (elmo-mime-insert-header-from-buffer buf p-min p-max
-                                          invisible-fields visible-fields))))
+                                          invisible-fields
+                                          visible-fields
+                                          sorted-fields))))
 
 (luna-define-method mime-insert-text-content :around
   ((entity mime-elmo-buffer-entity))
index c13e505..d0c414d 100644 (file)
 ;;
 
 ;;; Commentary:
-;; 
+;;
 
 ;;; Code:
-;; 
+;;
 (require 'elmo)
 (require 'elmo-map)
 (require 'mime-edit)
   :type '(repeat string)
   :group 'elmo)
 
+(defcustom elmo-nmz-index-alias-alist nil
+  "*Alist of ALIAS and INDEX-PATH."
+  :type '(repeat (cons (string :tag "Alias Name")
+                      (directory :tag "Index Path")))
+  :group 'elmo)
+
 ;;; "namazu search"
 (eval-and-compile
   (luna-define-class elmo-nmz-folder
                                          (buffer-substring
                                           (+ 1 (point-min))
                                           (- (point) 1)))
-    (elmo-nmz-folder-set-index-path-internal folder
-                                            (buffer-substring (point)
-                                                              (point-max)))
-    (if (eq (length (elmo-nmz-folder-index-path-internal folder)) 0)
-       (elmo-nmz-folder-set-index-path-internal folder
-                                                elmo-nmz-default-index-path))
+    (let ((index (buffer-substring (point) (point-max))))
+      (elmo-nmz-folder-set-index-path-internal
+       folder
+       (cond ((cdr (assoc index elmo-nmz-index-alias-alist)))
+            ((eq (length index) 0)
+             elmo-nmz-default-index-path)
+            (t
+             index))))
     folder))
 
 (luna-define-method elmo-folder-expand-msgdb-path ((folder
       (elmo-msgdb-overview-entity-set-subject entity location)
       (setq uid (nth 2 (file-attributes location)))
       (elmo-msgdb-overview-entity-set-from entity
-                                          (concat 
+                                          (concat
                                            (user-full-name uid)
                                            " <"(user-login-name uid) "@"
                                            (system-name) ">")))
index e210fd5..f6a1e91 100644 (file)
@@ -889,8 +889,8 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
              (error "Deleting message failed")))
        (error "Deleting message failed")))))
 
-(luna-define-method elmo-folder-delete-messages ((folder elmo-pop3-folder)
-                                                     msgs)
+(luna-define-method elmo-folder-delete-messages-plugged
+  ((folder elmo-pop3-folder) msgs)
   (let ((loc-alist (elmo-pop3-folder-location-alist-internal folder))
        (process (elmo-network-session-process-internal
                  (elmo-pop3-get-session folder))))