[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/emms a31d1f8 60/80: * emms-librefm-stream.el: add lexic
From: |
Stefan Monnier |
Subject: |
[elpa] externals/emms a31d1f8 60/80: * emms-librefm-stream.el: add lexical and fix warnings |
Date: |
Wed, 17 Mar 2021 18:42:30 -0400 (EDT) |
branch: externals/emms
commit a31d1f80f47aa2739156dea3c52666d4cd35e566
Author: Yoni Rabkin <yoni@rabkins.net>
Commit: Yoni Rabkin <yoni@rabkins.net>
* emms-librefm-stream.el: add lexical and fix warnings
---
emms-librefm-stream.el | 45 +++++++++++++++++++--------------------------
1 file changed, 19 insertions(+), 26 deletions(-)
diff --git a/emms-librefm-stream.el b/emms-librefm-stream.el
index 7df67cb..c46a060 100644
--- a/emms-librefm-stream.el
+++ b/emms-librefm-stream.el
@@ -1,4 +1,4 @@
-;;; emms-librefm-stream.el --- Libre.FM streaming
+;;; emms-librefm-stream.el --- Libre.FM streaming -*- lexical-binding: t; -*-
;; Copyright (C) 2014 Free Software Foundation, Inc.
@@ -104,6 +104,7 @@ point after the HTTP headers."
(defun emms-librefm-stream-tune-handshake-call ()
"Make the tune handshake call."
(let ((url-request-method "POST"))
+ (ignore url-request-method)
(let ((response
(url-retrieve-synchronously
(emms-librefm-stream-tune-handshake-string))))
@@ -171,6 +172,7 @@ point after the HTTP headers."
(defun emms-librefm-stream-tune-call (session-id station)
"Make the tune call."
(let ((url-request-method "POST"))
+ (ignore url-request-method)
(let ((response
(url-retrieve-synchronously
(emms-librefm-stream-tune-string
@@ -187,32 +189,24 @@ point after the HTTP headers."
(error "response not a buffer"))
(with-current-buffer resbuf
(emms-librefm-stream-assert-http)
- (let ((status (buffer-substring (point-at-bol)
- (point-at-eol))))
- (let (response
- url
- stationname
- (start (point)))
-
- (if (re-search-forward "^response=\\(.*\\)$" (point-max) t)
- (setq response (match-string-no-properties 1))
- (error "no response status code"))
- (when (not (string= response "OK"))
- (error "tune response not OK"))
+ (let (response
+ stationname
+ (start (point)))
- (goto-char start)
- (if (re-search-forward "^url=\\(.*\\)$" (point-max) t)
- (setq url (match-string-no-properties 1))
- (error "no url from server"))
+ (if (re-search-forward "^response=\\(.*\\)$" (point-max) t)
+ (setq response (match-string-no-properties 1))
+ (error "no response status code"))
+ (when (not (string= response "OK"))
+ (error "tune response not OK"))
- (goto-char start)
- (if (re-search-forward "^stationname=\\(.*\\)$" (point-max) t)
- (setq stationname (match-string-no-properties 1))
- (error "no stationname from server"))
+ (goto-char start)
+ (if (re-search-forward "^stationname=\\(.*\\)$" (point-max) t)
+ (setq stationname (match-string-no-properties 1))
+ (error "no stationname from server"))
- (setq emms-librefm-stream-station-name stationname)
+ (setq emms-librefm-stream-station-name stationname)
- (message "successfully tuned to: %s" stationname)))))
+ (message "successfully tuned to: %s" stationname))))
(defun emms-librefm-stream-tune (station)
"Make and handle tune call."
@@ -242,6 +236,7 @@ point after the HTTP headers."
(defun emms-librefm-stream-getplaylist-call (session-id)
"Make the getplaylist call."
(let ((url-request-method "POST"))
+ (ignore url-request-method)
(let ((response
(url-retrieve-synchronously
(emms-librefm-stream-getplaylist-string session-id))))
@@ -269,7 +264,6 @@ point after the HTTP headers."
;;; ------------------------------------------------------------------
;;; XSPF
;;; ------------------------------------------------------------------
-
(defun emms-librefm-stream-xspf-find (tag data)
"Return the tracklist portion of PLAYLIST or nil."
(let ((tree (copy-tree data))
@@ -296,8 +290,7 @@ point after the HTTP headers."
(title (emms-librefm-stream-xspf-get 'title track))
(album (emms-librefm-stream-xspf-get 'album track))
(creator (emms-librefm-stream-xspf-get 'creator track))
- (duration (emms-librefm-stream-xspf-get 'duration track))
- (image (emms-librefm-stream-xspf-get 'image track)))
+ (duration (emms-librefm-stream-xspf-get 'duration track)))
(let ((emms-track (emms-dictionary '*track*)))
(emms-track-set emms-track 'name location)
(emms-track-set emms-track 'info-artist creator)
- [elpa] externals/emms a83b370 61/80: add lexical declarations, (continued)
- [elpa] externals/emms a83b370 61/80: add lexical declarations, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 3a7d56a 62/80: * emms-mode-line.el: add lexical and fix, Stefan Monnier, 2021/03/17
- [elpa] externals/emms aeaaa02 63/80: * emms-mode-line-icon.el: add lexical, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 8dd079b 64/80: * emms-player-mpd.el: add lexical and fix, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 0388219 71/80: lexical declaration, Stefan Monnier, 2021/03/17
- [elpa] externals/emms d3216c5 27/80: Read and parse id3v2 frames individually, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 75ae932 36/80: Merge branch 'info-native', Stefan Monnier, 2021/03/17
- [elpa] externals/emms d0c2888 44/80: * emms-cache.el: lexical, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 9c766b6 46/80: * emms-compat.el: lexical, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 80ac539 57/80: * emms-later-do.el: add lexical declaration, Stefan Monnier, 2021/03/17
- [elpa] externals/emms a31d1f8 60/80: * emms-librefm-stream.el: add lexical and fix warnings,
Stefan Monnier <=
- [elpa] externals/emms 60c6172 74/80: * emms-browser.el: add-to-list -> cl-pushnew, Stefan Monnier, 2021/03/17
- [elpa] externals/emms e16ac3d 78/80: Set new default info methods in emms-all, Stefan Monnier, 2021/03/17
- [elpa] externals/emms d7110c0 67/80: * emms-player-simple.el: lexical declaration and fix, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 58c949b 69/80: * emms-playing-time.el: add lexical and fix, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 6a5c7b1 73/80: * emms-browser.el: fix unused lexical variables and arguments, Stefan Monnier, 2021/03/17
- [elpa] externals/emms f268b28 77/80: Miscellaneous small fixes to manual chapter 13, Stefan Monnier, 2021/03/17
- [elpa] externals/emms de0c407 80/80: * emms.info: new info, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 4b97340 06/80: * emms-tag-editor.el: remove hard-coding of program name, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 35d503c 68/80: add lexical declarations, Stefan Monnier, 2021/03/17
- [elpa] externals/emms caa744d 72/80: * emms-player-mplayer.el: lexical declaration, deprecate emms-player-mpv-cmd-prog macro, Stefan Monnier, 2021/03/17