[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/emms 8dd079b 64/80: * emms-player-mpd.el: add lexical a
From: |
Stefan Monnier |
Subject: |
[elpa] externals/emms 8dd079b 64/80: * emms-player-mpd.el: add lexical and fix |
Date: |
Wed, 17 Mar 2021 18:42:31 -0400 (EDT) |
branch: externals/emms
commit 8dd079b33d9730e5df8b9c0e5678ab2864089d69
Author: Yoni Rabkin <yoni@rabkins.net>
Commit: Yoni Rabkin <yoni@rabkins.net>
* emms-player-mpd.el: add lexical and fix
This code is too smart for its own good and had left a lot of unused
lexical variables.
---
emms-player-mpd.el | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/emms-player-mpd.el b/emms-player-mpd.el
index 327938d..78fd857 100644
--- a/emms-player-mpd.el
+++ b/emms-player-mpd.el
@@ -1,4 +1,4 @@
-;;; emms-player-mpd.el --- MusicPD support for EMMS
+;;; emms-player-mpd.el --- MusicPD support for EMMS -*- lexical-binding: t;
-*-
;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2014 Free Software Foundation,
Inc.
@@ -506,7 +506,7 @@ Call CALLBACK with CLOSURE and result when the request is
complete.
If INFO is specified, use that instead of acquiring the necessary
info from MusicPD."
(when info
- (setq callback (lambda (closure id) id)))
+ (setq callback (lambda (closure id) (ignore closure) id)))
(emms-player-mpd-get-status-part closure callback "playlist" info))
(defun emms-player-mpd-get-volume (closure callback &optional info)
@@ -515,7 +515,7 @@ Call CALLBACK with CLOSURE and result when the request is
complete.
If INFO is specified, use that instead of acquiring the necessary
info from MusicPD."
(when info
- (setq callback (lambda (closure volume) volume)))
+ (setq callback (lambda (closure volume) (ignore closure) volume)))
(emms-player-mpd-get-status-part closure callback "volume" info))
(defun emms-player-mpd-get-current-song (closure callback &optional info)
@@ -527,7 +527,7 @@ Call CALLBACK with CLOSURE and result when the request is
complete.
If INFO is specified, use that instead of acquiring the necessary
info from MusicPD."
(when info
- (setq callback (lambda (closure id) id)))
+ (setq callback (lambda (closure id) (ignore closure) id)))
(emms-player-mpd-get-status-part closure callback "song" info))
(defun emms-player-mpd-get-mpd-state (closure callback &optional info)
@@ -538,7 +538,7 @@ Call CALLBACK with CLOSURE and result when the request is
complete.
If INFO is specified, use that instead of acquiring the necessary
info from MusicPD."
(when info
- (setq callback (lambda (closure id) id)))
+ (setq callback (lambda (closure id) (ignore closure) id)))
(emms-player-mpd-get-status-part closure callback "state" info))
(defun emms-player-mpd-get-playing-time (closure callback &optional info)
@@ -552,6 +552,7 @@ info from MusicPD."
(emms-player-mpd-get-status-part
nil
(lambda (closure time)
+ (ignore closure)
(and time
(string-match "\\`\\([0-9]+\\):" time)
(string-to-number (match-string 1 time))))
@@ -684,6 +685,7 @@ main EMMS playlist buffer."
(emms-player-mpd-detect-song-change info))
(defun emms-player-mpd-detect-song-change-1 (closure info)
+ (ignore closure)
(let ((song (emms-player-mpd-get-current-song nil #'ignore info))
(state (emms-player-mpd-get-mpd-state nil #'ignore info))
(time (emms-player-mpd-get-playing-time nil #'ignore info))
@@ -879,6 +881,7 @@ playlist."
(concat "play " id)
nil
(lambda (closure response)
+ (ignore closure response)
(setq emms-player-mpd-current-song nil)
(if emms-player-mpd-check-interval
(setq emms-player-mpd-status-timer
@@ -890,6 +893,7 @@ playlist."
"play"
nil
(lambda (closure response)
+ (ignore closure response)
(emms-player-started 'emms-player-mpd)))))
(defun emms-player-mpd-start-and-sync-2 (buffer id)
@@ -913,6 +917,7 @@ playlist."
(emms-player-mpd-play track-cnt))))))
(defun emms-player-mpd-start-and-sync-1 (closure id)
+ (ignore closure)
(let ((buf-id (with-current-emms-playlist
emms-player-mpd-playlist-id)))
(if (and (not (buffer-modified-p emms-playlist-buffer))
@@ -934,11 +939,13 @@ This is called if `emms-player-mpd-sync-playlist' is
non-nil."
"clearerror"
nil
(lambda (closure response)
+ (ignore closure response)
(emms-player-mpd-get-playlist-id
nil
#'emms-player-mpd-start-and-sync-1))))
(defun emms-player-mpd-connect-1 (closure info)
+ (ignore closure)
(setq emms-player-mpd-current-song nil)
(let* ((state (emms-player-mpd-get-mpd-state nil #'ignore info)))
(unless (string= state "stop")
@@ -1219,6 +1226,7 @@ This is useful to do when you have recently acquired new
music."
(concat "listallinfo " dir)
nil
(lambda (closure response)
+ (ignore closure response)
(message "Dumping MusicPD data to cache...processing")
(let ((info (emms-player-mpd-parse-response response)))
(when (null (car info))
@@ -1256,6 +1264,7 @@ order to prime the cache."
(emms-player-mpd-send
(concat "update " (emms-player-mpd-quote-file dir)) nil
(lambda (closure response)
+ (ignore closure)
(let ((id (cdr (assoc "updating_db"
(emms-player-mpd-get-alist
(emms-player-mpd-parse-response response))))))
@@ -1288,6 +1297,7 @@ cache."
"Wait for a currently running mpd update to finish.
Afterwards, clear the EMMS cache and call
`emms-cache-set-from-mpd-all'."
+ (ignore closure)
(if response
;; This is the first call after the update command
(let ((id (cdr (assoc "updating_db"
@@ -1303,6 +1313,7 @@ Afterwards, clear the EMMS cache and call
(emms-player-mpd-get-status-part
nil
(lambda (closure updating)
+ (ignore closure)
(if updating
;; MPD update still in progress, so wait another second
(run-at-time 1 nil 'emms-player-mpd-wait-for-update)
- [elpa] externals/emms c76a1a6 58/80: * emms-later-do.el: tell the compiler that we know, (continued)
- [elpa] externals/emms c76a1a6 58/80: * emms-later-do.el: tell the compiler that we know, Stefan Monnier, 2021/03/17
- [elpa] externals/emms cd5036b 65/80: * emms-player-mpg321-remote.el: add lexical and fix, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 2f2bffe 47/80: add lexical declarations, Stefan Monnier, 2021/03/17
- [elpa] externals/emms d2640bd 51/80: * emms-i18n.el: calm down the compiler, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 1a12d2e 54/80: * emms-info-metaflac.el: lexical declaration, Stefan Monnier, 2021/03/17
- [elpa] externals/emms 0bd9d67 55/80: * emms-info-mp3info.el: lexical declaration, Stefan Monnier, 2021/03/17
- [elpa] externals/emms a80cdb6 56/80: Add lexical declarations, Stefan Monnier, 2021/03/17
- [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 <=
- [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, 2021/03/17
- [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