[mew-dist 24493] Re: scan-form with (0 subj) (0 body)
Shun-ichi TAHARA ( 田原 俊一 )
jado at example.com
2004年 2月 2日 (月) 17:03:06 JST
From: Shun-ichi TAHARA (田原 俊一) <jado at example.com>
Message-Id: <20040202.163818.730566949.z1980163 at example.com>
> > 1. (0 element) の時は、幅を計算せずにとりあえず全部くっつけさせておく
> > 2. mew-scan-get-line でまとめて mew-substring する
> >
> > とするのがいいのかも、とも思いましたが、ちょっとだけ遅くなりそうですね。
>
> summary の大半を占める subject と body は、どっちみち mew-substring に
> 通ってるので、さほど変わりなかろう、ということで、こっちもやってみまし
> た。
う、これ、1箇所ヌケがありました。こちらに差し換え、ということで。
_______________________________
田原 俊一 jado at example.com, shunichi_tahara at example.com
http://flowernet.gr.jp/jado/
FingerPrint: 16 9E 70 3B 05 86 5D 08 B8 4C 47 3A E7 E9 8E D9
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
-------------- next part --------------
diff -rcb mew-4.0.63.orig/mew-scan.el mew-4.0.63/mew-scan.el
*** mew-4.0.63.orig/mew-scan.el 2003-12-29 11:44:22.000000000 +0900
--- mew-4.0.63/mew-scan.el 2004-02-02 17:00:06.000000000 +0900
***************
*** 269,275 ****
;;;
(defun mew-scan-get-piece (spec)
! (let (func width str rightp nopad)
(if (stringp spec)
(progn
(setq TOTAL (+ TOTAL (string-width spec)))
--- 269,276 ----
;;;
(defun mew-scan-get-piece (spec)
! (let (func width str rightp)
! (when (< TOTAL (1- WIDTH))
(if (stringp spec)
(progn
(setq TOTAL (+ TOTAL (string-width spec)))
***************
*** 278,291 ****
(setq width 1 func spec)
(setq width (nth 0 spec) func (nth 1 spec)))
(when (and (integerp width) (symbolp func))
- (when (= width 0)
- (setq width (- WIDTH TOTAL 1))
- (unless mew-use-spc-padding
- (setq nopad t)))
(if (< width 0) (setq width (abs width) rightp t))
(setq TOTAL (+ TOTAL width))
! (setq func (intern-soft
! (concat mew-summary-form-func-prefix (symbol-name func))))
(when (fboundp func)
(setq str (funcall func))
(if rightp
--- 279,288 ----
(setq width 1 func spec)
(setq width (nth 0 spec) func (nth 1 spec)))
(when (and (integerp width) (symbolp func))
(if (< width 0) (setq width (abs width) rightp t))
(setq TOTAL (+ TOTAL width))
! (setq func (intern-soft (concat mew-summary-form-func-prefix
! (symbol-name func))))
(when (fboundp func)
(setq str (funcall func))
(if rightp
***************
*** 293,303 ****
(format (format "%%%ds" width) str)
(setq TOTAL (+ (- TOTAL width) (string-width str)))
str) ;; width may exceed.
! (mew-substring str width nil nopad)))))))
(defun mew-scan-get-line (mew-vec WIDTH)
(let* ((TOTAL 0) (fld "")
! (line (mapconcat 'mew-scan-get-piece (mew-sinfo-get-summary-form) ""))
par-id my-id msg ld uid siz irt-list)
(setq my-id (or (mew-idstr-get-first-id (MEW-ID)) ""))
;; RFC 2822 says: the "In-Reply-To:" field may be used to identify
--- 290,305 ----
(format (format "%%%ds" width) str)
(setq TOTAL (+ (- TOTAL width) (string-width str)))
str) ;; width may exceed.
! (if (> width 0)
! (mew-substring str width)
! (setq TOTAL (+ TOTAL (string-width str)))
! str))))))))
(defun mew-scan-get-line (mew-vec WIDTH)
(let* ((TOTAL 0) (fld "")
! (line (mew-substring
! (mapconcat 'mew-scan-get-piece (mew-sinfo-get-summary-form) "")
! (1- WIDTH) nil (not mew-use-spc-padding)))
par-id my-id msg ld uid siz irt-list)
(setq my-id (or (mew-idstr-get-first-id (MEW-ID)) ""))
;; RFC 2822 says: the "In-Reply-To:" field may be used to identify
Mew-dist メーリングリストの案内