* wl-summary.el (wl-summary-line-list-count): New function, merged
authoryoichi <yoichi>
Thu, 2 May 2002 13:15:30 +0000 (13:15 +0000)
committeryoichi <yoichi>
Thu, 2 May 2002 13:15:30 +0000 (13:15 +0000)
from my-wl-summary-subject-func-ml in samples/*/dot.wl.
* wl-vars.el (wl-summary-line-format-spec-alist): Add entry for
list counts.

samples/en/dot.wl
samples/ja/dot.wl
wl/ChangeLog
wl/wl-summary.el
wl/wl-vars.el

index 3506b04..a7ebe2f 100644 (file)
        "x-mail-count" "x-ml-count" "x-sequence"))
 
 ;; ML message displays ML name and ML sequence number in subject.
-(setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
-(defun my-wl-summary-subject-func-ml (subject-string)
-  (let ((folder wl-summary-buffer-folder-name)
-       (subj subject-string) (sequence) (ml-name) (ml-count))
-    (setq sequence (elmo-msgdb-overview-entity-get-extra-field
-                   entity "x-sequence")
-         ml-name (or (elmo-msgdb-overview-entity-get-extra-field
-                      entity "x-ml-name")
-                     (and sequence
-                          (car (split-string sequence " "))))
-         ml-count (or (elmo-msgdb-overview-entity-get-extra-field
-                       entity "x-mail-count")
-                      (elmo-msgdb-overview-entity-get-extra-field
-                       entity "x-ml-count")
-                      (and sequence
-                           (cadr (split-string sequence " ")))))
-    (if (string-match
-        "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
-        subject-string)
-       (progn
-         (setq subj (substring subject-string (match-end 0)))
-         (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
-         (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
-    (condition-case nil
-       (if (and ml-name ml-count)
-           (if (string= folder wl-default-folder)
-               (format "(%s %05d) %s"
-                       (car (split-string ml-name " "))
-                       (string-to-int ml-count)
-                       subj)
-             (format "#%05d %s"
-                     (string-to-int ml-count) subj))
-         subj)
-      (error subj))))
+(setq wl-summary-line-format "%M/%D(%W)%h:%m %t%[%17F %] %# %s")
 
 ;; imput asynchronously.
 ;; (utils/im-wl.el is needed to be installed.
index 4afc8b4..3c1fe28 100644 (file)
 
 ;; ML \e$B$N%a%C%;!<%8$G$"$l$P!$%5%^%j$N\e(B Subject \e$BI=<($K\e(B
 ;; ML\e$BL>\e(B \e$B$d\e(B ML\e$B$K$*$1$k%a%C%;!<%8HV9f$bI=<($9$k\e(B
-(setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
-(defun my-wl-summary-subject-func-ml (subject-string)
-  (let ((folder wl-summary-buffer-folder-name)
-       (subj subject-string) (sequence) (ml-name) (ml-count))
-    (setq sequence (elmo-msgdb-overview-entity-get-extra-field
-                   entity "x-sequence")
-         ml-name (or (elmo-msgdb-overview-entity-get-extra-field
-                      entity "x-ml-name")
-                     (and sequence
-                          (car (split-string sequence " "))))
-         ml-count (or (elmo-msgdb-overview-entity-get-extra-field
-                       entity "x-mail-count")
-                      (elmo-msgdb-overview-entity-get-extra-field
-                       entity "x-ml-count")
-                      (and sequence
-                           (cadr (split-string sequence " ")))))
-    (if (string-match
-        "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
-        subject-string)
-       (progn
-         (setq subj (substring subject-string (match-end 0)))
-         (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
-         (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
-    (condition-case nil
-       (if (and ml-name ml-count)
-           (if (string= folder wl-default-folder)
-               (format "(%s %05d) %s"
-                       (car (split-string ml-name " "))
-                       (string-to-int ml-count)
-                       subj)
-             (format "#%05d %s"
-                     (string-to-int ml-count) subj))
-         subj)
-      (error subj))))
+(setq wl-summary-line-format "%M/%D(%W)%h:%m %t%[%17F %] %# %s")
 
 ;; imput \e$B$K$h$jHsF14|$GAw?.$9$k\e(B
 ;; (utils/im-wl.el \e$B$r%$%s%9%H!<%k$7$F$*$/I,MW$,$"$j$^$9!#\e(B
index 5cbdf90..8c4d823 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-02  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-summary.el (wl-summary-line-list-count): New function, merged
+       from my-wl-summary-subject-func-ml in samples/*/dot.wl.
+       * wl-vars.el (wl-summary-line-format-spec-alist): Add entry for
+       list counts.
+
 2002-05-02  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-create-line): Ignore errors while
index 8f8832e..6e44839 100644 (file)
@@ -4097,6 +4097,42 @@ If ARG, exit virtual folder."
    (wl-summary-line-children-number) " "
    (wl-summary-line-from)))
 
+(defun wl-summary-line-list-count ()
+  (let ((folder wl-summary-buffer-folder-name)
+       (sequence) (ml-name) (ml-count) (subject-string))
+    (setq sequence (elmo-msgdb-overview-entity-get-extra-field
+                   wl-message-entity "x-sequence")
+         ml-name (or (elmo-msgdb-overview-entity-get-extra-field
+                      wl-message-entity "x-ml-name")
+                     (and sequence
+                          (car (split-string sequence " "))))
+         ml-count (or (elmo-msgdb-overview-entity-get-extra-field
+                       wl-message-entity "x-mail-count")
+                      (elmo-msgdb-overview-entity-get-extra-field
+                       wl-message-entity "x-ml-count")
+                      (and sequence
+                           (cadr (split-string sequence " "))))
+         subject-string
+         (elmo-delete-char ?\n
+                           (or (elmo-msgdb-overview-entity-get-subject
+                                wl-message-entity)
+                               wl-summary-no-subject-message)))
+    (if (string-match
+        "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
+        subject-string)
+       (progn
+         (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
+         (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
+    (condition-case nil
+       (if (and ml-name ml-count)
+           (if (string= folder wl-default-folder)
+               (format "(%s %05d)"
+                       (car (split-string ml-name " "))
+                       (string-to-int ml-count))
+             (format "#%05d" (string-to-int ml-count)))
+         "")
+      (error ""))))
+
 (defun wl-summary-create-line (wl-message-entity
                               wl-parent-message-entity
                               temp-mark
index a0b9089..597b49f 100644 (file)
@@ -188,7 +188,8 @@ If you don't have multiple e-mail addresses, you don't have to set this."
     (?S (wl-summary-line-size))
     (?c (wl-summary-line-children-number))
     (?f (wl-summary-line-from))
-    (?F (wl-summary-line-children-and-from)))
+    (?F (wl-summary-line-children-and-from))
+    (?# (wl-summary-line-list-count)))
   "An alist of format specifications that can appear in summary lines.
 Each element is a list of following:
 \(SPEC STRING-EXP\)