diff options
author | William Xu <william.xwl@gmail.com> | 2009-11-23 22:11:19 +0800 |
---|---|---|
committer | William Xu <william.xwl@gmail.com> | 2009-11-23 22:11:19 +0800 |
commit | e54c755ce0c2ef19bfcd4cdca995e4d2bc3b2703 (patch) | |
tree | 2d5262b40213039f05a8af123148ca0a41fbc6c5 /lisp | |
parent | 2b629e9c2d97a521a4cddbf03286661eab687c42 (diff) |
Fix compiler warnings.
For emms-browser.el, emms-compat.el, emms-last-play.el, emms-lyrics.el and
emms-streams.el.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emms-browser.el | 3 | ||||
-rw-r--r-- | lisp/emms-compat.el | 6 | ||||
-rw-r--r-- | lisp/emms-last-played.el | 4 | ||||
-rw-r--r-- | lisp/emms-lyrics.el | 9 | ||||
-rw-r--r-- | lisp/emms-streams.el | 9 |
5 files changed, 17 insertions, 14 deletions
diff --git a/lisp/emms-browser.el b/lisp/emms-browser.el index 5286d75..6f8d696 100644 --- a/lisp/emms-browser.el +++ b/lisp/emms-browser.el @@ -1276,7 +1276,8 @@ Return the previous point-max before adding." (when emms-browser-seed-pending (random t) (setq emms-browser-seed-pending nil)) - (goto-line (random (count-lines (point-min) (point-max))))) + (goto-char (point-min)) + (forward-line (1- (random (count-lines (point-min) (point-max)))))) (defun emms-browser-view-in-dired (&optional bdata) "View the current directory in dired." diff --git a/lisp/emms-compat.el b/lisp/emms-compat.el index 5b21858..f5ede0b 100644 --- a/lisp/emms-compat.el +++ b/lisp/emms-compat.el @@ -45,9 +45,9 @@ The warning will say that NEW-NAME should be used instead. WHEN should be a string indicating when the function was first made obsolete, either the file's revision number or an EMMS release version number." - (condition-case nil - (make-obsolete old-name new-name when) - (wrong-number-of-arguments (make-obsolete old-name new-name)))) + (if (featurep 'xemacs) + (make-obsolete old-name new-name) + (make-obsolete old-name new-name when))) ;;; Time and timers diff --git a/lisp/emms-last-played.el b/lisp/emms-last-played.el index 0203ac7..529869a 100644 --- a/lisp/emms-last-played.el +++ b/lisp/emms-last-played.el @@ -103,8 +103,8 @@ If non-existent, it is set to 1." Returns \" ? \" if there's bad input or if an other error occurs. Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." (condition-case () - (let* ((messy-date (time-to-seconds messy-date)) - (now (time-to-seconds (current-time))) + (let* ((messy-date (float-time messy-date)) + (now (float-time (current-time))) ;;If we don't find something suitable we'll use this one (my-format "%b %d '%y")) (let* ((difference (- now messy-date)) diff --git a/lisp/emms-lyrics.el b/lisp/emms-lyrics.el index 1e15c2e..c7c297a 100644 --- a/lisp/emms-lyrics.el +++ b/lisp/emms-lyrics.el @@ -308,8 +308,7 @@ job." emms-lyrics-elapsed-time 0) (emms-lyrics-read-file lrc t) (emms-lyrics-set-timer) - (emms-lyrics-seek - (time-to-seconds (time-since old-start))))) + (emms-lyrics-seek (float-time (time-since old-start))))) (defun emms-lyrics-stop () "Stop displaying lyrics." @@ -328,7 +327,7 @@ job." (setq emms-lyrics-pause-time (current-time)) (when emms-lyrics-pause-time (setq emms-lyrics-elapsed-time - (+ (time-to-seconds + (+ (float-time (time-subtract emms-lyrics-pause-time emms-lyrics-start-time)) emms-lyrics-elapsed-time))) @@ -342,7 +341,7 @@ job." "Seek forward or backward SEC seconds lyrics." (setq emms-lyrics-elapsed-time (+ emms-lyrics-elapsed-time - (time-to-seconds (time-since emms-lyrics-start-time)) + (float-time (time-since emms-lyrics-start-time)) sec)) (when (< emms-lyrics-elapsed-time 0) ; back to start point (setq emms-lyrics-elapsed-time 0)) @@ -490,7 +489,7 @@ NEXT-LYRIC." "Insert lyric time in the form: [01:23.21], then goto the beginning of next line." (interactive) - (let* ((total (+ (time-to-seconds + (let* ((total (+ (float-time (time-subtract (current-time) emms-lyrics-start-time)) emms-lyrics-elapsed-time)) diff --git a/lisp/emms-streams.el b/lisp/emms-streams.el index b81abe7..ea51acf 100644 --- a/lisp/emms-streams.el +++ b/lisp/emms-streams.el @@ -447,7 +447,8 @@ Don't forget to run `emms-stream-save-bookmarks-file' after !" (setq emms-stream-list (emms-stream-insert-at index (list name url fd type) emms-stream-list)) (emms-stream-redisplay) - (goto-line line))) + (goto-char (point-min)) + (forward-line (1- line)))) (defun emms-stream-delete-bookmark () "Deletes the bookmark under the point. @@ -458,7 +459,8 @@ Don't forget to save your modifications !" (setq emms-stream-list (delete (emms-stream-get-bookmark-at-point) emms-stream-list)) (emms-stream-redisplay) - (goto-line line))) + (goto-char (point-min)) + (forward-line (1- line)))) (defun emms-stream-edit-bookmark () "Change the information of current bookmark." @@ -558,7 +560,8 @@ Don't forget to save your modifications !" index streams emms-stream-list)) (setq line (+ line (* (length streams) 2))) (emms-stream-redisplay) - (goto-line line)) + (goto-char (point-min)) + (forward-line (1- line))) (message "Not yanking anything")))) ;; Navigation |