松尾です。

HTTP応答から必要な部分を抽出する処理を少し修正しました。
backgroundでtweetを更新するときの停止時間が短くなった
ような気がします。(劇的ではないので気のせいかも…)

変更内容は
http://github.com/cvmat/twittering-mode/tree/tune-up-string-extraction
です。

Debian 5.0.3のGNU Emacs 22.2.1とGNU Emacs 21.4.1、
CygwinのGNU Emacs 22.1.1で動作確認してあります。
問題なければmergeをお願いします。

1.commit 0735d1d8d7213edb86f05771e99403d135cadb4b
  twittering-get-response-header()で
  beginning-of-buffer()が使われていましたが、この関数を
  LISPから呼び出すのは推奨されていないようです。
  (markの設定等、buffer先頭に移動する以外の処理でオーバー
   ヘッドがあるため)
  beginning-of-buffer()呼び出しの度に"Mark set"という
  messageが表示されるのも紛らわしくて困りますので、
  (goto-char (point-min))に置き換えました。

  twittering-render-timeline()の
  (save-excursion (beginning-of-line) (point))
  も冗長なので(line-beginning-position)に置き換えてあります。

2.commit bafec64b94a1d3d54ed7f72424e2a84e8ff74c9b
  twittering-get-response-header()ではbodyを含めたbuffer全体
  をbuffer-string()でstringに変えてからsubstring()を使って
  headerを取り出していましたが、header部分のみを
  buffer-substring()で取り出すようにしました。

  twittering-get-response-body()ではbody部分を
  xml-parse-region()に渡すためにbuffer-string()でサイズを
  調べていましたが、search-forward-regexp()で開始部分を
  直接調べてxml-parse-region()に渡すようにしました。

3.commit f9b7583bcbf383d32cfaa2e2e770c2a77fe97549
  twittering-get-response-header()でsave-excursion()が
  連続していたので合体させました。カーソル位置等の問題は
  ないと思います。

---
松尾 直志 <[email protected]>

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/twmode-users

メールによる返信