[Mew-dist 12039] mew-substring
Masaki KONUMA
konuma at example.com
2000年 1月 11日 (火) 23:48:18 JST
(mew-substring STR WIDTH) の、STR が WIDTH より短かい場合の値が変だと
思うのでパッチです。
たとえば、(mew-substring "abc" 79) は "ab" を返しますが、ではなくて
"abc" を返して欲しいです。
-- 小沼雅樹
-------------- next part --------------
*** ../mew-1.95b16/mew-func.el Tue Dec 28 17:00:37 1999
--- mew-func.el Tue Jan 11 22:40:46 2000
***************
*** 285,293 ****
(if (fboundp 'mew-string-to-list)
(let ((char-list (mew-string-to-list str))
(i 0) (w 0) (last 0))
! (while (and char-list (<= w width))
(setq w (+ w (mew-char-width (car char-list))))
- (setq last i)
(setq i (+ i (length (char-to-string (car char-list)))))
(setq char-list (cdr char-list)))
(substring str 0 last))
--- 285,294 ----
(if (fboundp 'mew-string-to-list)
(let ((char-list (mew-string-to-list str))
(i 0) (w 0) (last 0))
! (while (and (<= w width)
! (progn (setq last i)
! char-list))
(setq w (+ w (mew-char-width (car char-list))))
(setq i (+ i (length (char-to-string (car char-list)))))
(setq char-list (cdr char-list)))
(substring str 0 last))
Mew-dist メーリングリストの案内