[mew-dist 18874] Re: sort

Hideyuki SHIRAI ( 白井秀行 ) shirai at example.com
2001年 9月 11日 (火) 20:18:35 JST


From: Kazu Yamamoto (山本和彦) <kazu at example.com> さん曰く
Subject: [mew-dist 18870] Re: sort
Message-ID: <20010911.192833.103015121.kazu at example.com>
Date: Tue, 11 Sep 2001 19:28:33 +0900 (JST)

kazu> > 89 09/11/2001 ....
kazu> > 90 09/11/2001 .... <= 一文字分短くなるので、end はこの行の最後を示す
kazu> > 91 09/11/2001 ....
kazu> 
kazu>  	    ((<= pos beg)
kazu>  	     (setq line (buffer-substring beg end))
kazu>  	     (delete-region beg end)
kazu> 	     (goto-char end)
kazu> 	     (save-excursion
kazu>  	       (goto-char pos)
kazu>  	       (insert (mew-sort-adjust-number form dst line)))
kazu>  	     (point))
kazu>  
kazu> みたいな感じでいいですか?

おぉ、ナイス。とおもったのですが、一カ所違っています。

	    ((<= pos beg)
	     (setq line (buffer-substring beg end))
	     (goto-char end)           <= 逆
	     (delete-region beg end)   <= 逆
	     (save-excursion
	       (goto-char pos)
	       (insert (mew-sort-adjust-number form dst line)))
	     (point))

-- 
白井秀行 (mailto:shirai at example.com)



Mew-dist メーリングリストの案内