aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/emms-lyrics.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/emms-lyrics.el b/lisp/emms-lyrics.el
index 6b28b22..fba6825 100644
--- a/lisp/emms-lyrics.el
+++ b/lisp/emms-lyrics.el
@@ -1,6 +1,6 @@
;;; emms-lyrics.el --- Display lyrics synchronically
-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
;; Author: William Xu <william.xwl@gmail.com>
;; Keywords: emms music lyrics
@@ -411,17 +411,18 @@ job."
(next-lyric (and (cdr lyrics-alist)
(cdr (cadr lyrics-alist)))))
(setq line (1+ line))
- (setq emms-lyrics-timers
- (append emms-lyrics-timers
- (list
- (run-at-time (format "%d sec" time)
- nil
- 'emms-lyrics-display-handler
- lyric
- next-lyric
- line
- (and next-time (- next-time time)))))))
- (setq lyrics-alist (cdr lyrics-alist)))))
+ (when (> time 0)
+ (setq emms-lyrics-timers
+ (append emms-lyrics-timers
+ (list
+ (run-at-time (format "%d sec" time)
+ nil
+ 'emms-lyrics-display-handler
+ lyric
+ next-lyric
+ line
+ (and next-time (- next-time time)))))))
+ (setq lyrics-alist (cdr lyrics-alist))))))
(defun emms-lyrics-mode-line ()
"Add lyric to the mode line."