@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

続続twit.elのタイマーがとまらない?→止まったし,うごいた

最終的に,止める時(M-x twit-stop-following-tweets)は止める.タイマーを動かす時(M-x twit-follow-recent-tweets)に,タイマーが既にあれば一旦止めて再開,タイマーがなければ普通にタイマー始動.ってことにすればうまくいった.

続twit.elのタイマーがとまらない? - ぺっくブログミラー@peccul
twit.elのタイマーがとまらない? - ぺっくブログミラー@peccul

(defadvice twit-stop-following-tweets (after delete-timer)
  (message "deleting twit-timer...")
  (setq twit-timer nil)
  (setq twit-rate-limit-timer nil)
  (message "deleting twit-timer...done"))
(ad-activate 'twit-stop-following-tweets)

(defadvice twit-follow-recent-tweets (around check-timer)
  (if twit-timer
      (progn
        (message "already started.")
        (twit-stop-following-tweets))
    (progn
      (message "start timer")))
      ad-do-it)
(ad-activate 'twit-follow-recent-tweets)