@peccul is peccu

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

続twit.elのタイマーがとまらない?

タイマーが既に動いてるならタイマーを追加しなけりゃいいじゃないか.ということで,twit-follow-recent-tweetsにもアドバイスを追加してみた.いまのところ意図した動きをしている模様.

(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
      (message "already started.")
      (progn
	(message "start timer")
	ad-do-it)))
(ad-activate 'twit-follow-recent-tweets)