はやみずです

> save-excursionは呼び出し時にcurrent bufferの情報だけが
> 保存されるのでset-bufferで移った先のbufferでpointを
> 動かしてしまうと、save-excursion脱出後にも復元されない
> ようです。

修正ありがとうございます。save-excursionはバッファを移動しても大丈夫だ
と勘違いしていました。。



At Sat, 09 Jan 2010 03:09:39 +0900 (JST),
Tadashi MATSUO wrote:
> 
> 松尾です。
> 
> save-excursionの直後にset-bufferで別のbufferに移って
> いるために、save-excursionが無意味になっている箇所が
> いくつかありましたので修正しました。
> hayamiz/masterにcommitしてあります。
> 
> http://old.nabble.com/%60save-excursion'-defeated-by-%60set-buffer'-td26840925.html
> CVS版のEmacsはそういうパターンに対して警告を出すようです。
> 
> save-excursionは呼び出し時にcurrent bufferの情報だけが
> 保存されるのでset-bufferで移った先のbufferでpointを
> 動かしてしまうと、save-excursion脱出後にも復元されない
> ようです。
> 
> こちらで簡単に説明されています。
> http://old.nabble.com/Re%3A-%60save-excursion%27-defeated-by-%60set-buffer%27-p26875608.html
> 
> こちらは修正時の注意点です。
> http://osdir.com/ml/general/2009-11/msg06809.html
> 
> twittering-get-response-headerや
> twittering-get-response-bodyは、引数で指定されたbuffer内の
> pointを移動させてしまっていました。
> (goto-char (point-min))を挿入する以前にpointが移動してしまう
> 現象があったそうですが、この件が原因だったのかもしれません。
> 
> twittering-retrieve-image-with-wgetでもsave-excursion後に
> set-bufferしているのですがこれは意図がよく分からなかったので
> そのままにしてあります。
> 
> また、twittering-tinyurl-getでsearch-forward-regexpが
> 失敗するとkill-bufferされずにbufferが残ってしまっていたので
> そちらも修正しました。
> 
> ---
> 松尾 直志 <t...@mymail.twin.jp>
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> twmode-users mailing list
> twmode-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/twmode-users

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
twmode-users mailing list
twmode-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/twmode-users

メールによる返信