Skip to content

Commit

Permalink
Merge pull request #12 from edgar-gip/master
Browse files Browse the repository at this point in the history
Fix bug in customization of `nyan-animate-nyancat'
  • Loading branch information
TeMPOraL committed Aug 1, 2014
2 parents 96a20c4 + 5ab8097 commit 81f90ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nyan-mode.el
@@ -1,12 +1,12 @@
;;; nyan-mode.el --- Nyan Cat shows position in current buffer in mode-line.
;;;
;;; Nyanyanyanyanyanyanya!
;;;
;;;
;;; Author: Jacek "TeMPOraL" Zlydach <temporal.pl@gmail.com>
;;; URL: http://nyan-mode.buildsomethingamazing.com
;;; Version: 0.1
;;; Keywords: nyan, cat, lulz, pop tart cat, build something amazing
;;;
;;;
;;; Inspired by (and in few places copied from) sml-modeline.el,
;;; written by Lennart Borgman
;;; See: http://bazaar.launchpad.net/~nxhtml/nxhtml/main/annotate/head%3A/util/sml-modeline.el
Expand Down Expand Up @@ -60,15 +60,17 @@

(defun nyan-start-animation ()
(interactive)
(when (not nyan-animate-nyancat)
(when (not (and nyan-animate-nyancat
nyan-animation-timer))
(setq nyan-animation-timer (run-at-time "1 sec"
nyan-animation-frame-interval
'nyan-swich-anim-frame))
(setq nyan-animate-nyancat t)))

(defun nyan-stop-animation ()
(interactive)
(when nyan-animate-nyancat
(when (and nyan-animate-nyancat
nyan-animation-timer)
(cancel-timer nyan-animation-timer)
(setq nyan-animation-timer nil)
(setq nyan-animate-nyancat nil)))
Expand Down

0 comments on commit 81f90ac

Please sign in to comment.