Skip to content

Commit

Permalink
Fix more melpazoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfm committed Dec 5, 2023
1 parent e94517c commit dc74e41
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions smudge-api.el
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ Call CALLBACK if provided."


(defun smudge-api-queue-add-track (track-id &optional callback)
"Add given TRACK-ID to the queue"
"Add given TRACK-ID to the queue and call CALLBACK afterwards."
(smudge-api-call-async
"POST"
(concat "/me/player/queue?"
Expand All @@ -608,7 +608,7 @@ Call CALLBACK if provided."
callback))

(defun smudge-api-queue-add-tracks (track-ids &optional callback)
"Add given TRACK-IDS to the queue"
"Add given TRACK-IDS to the queue and call CALLBACK afterwards."
;; Spotify's API doesn't provide a endpoint that would enable us to
;; add multiple tracks to the queue at the same time.
;; Thus we have to synchronously add the tracks
Expand Down
2 changes: 1 addition & 1 deletion smudge-connect.el
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Returns a JSON string in the format:
(message "Volume decreased to %d%%" new-volume))))))))

(defun smudge-connect-volume-mute-unmute ()
"Mute/unmute the volume on the actively playing device by setting the volume to 0."
"Mute/unmute the actively playing device by setting the volume to 0."
(smudge-connect-when-device-active
(smudge-api-get-player-status
(lambda (status)
Expand Down
13 changes: 8 additions & 5 deletions smudge-controller.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
(require 'smudge-api)

(defmacro smudge-if-gnu-linux (then else)
"Evaluate THEN form if Emacs is running in GNU/Linux, otherwise evaluate ELSE form."
"Evaluate THEN form if Emacs is running in GNU/Linux, otherwise evaluate
ELSE form."
`(if (eq system-type 'gnu/linux) ,then ,else))

(defmacro smudge-when-gnu-linux (then)
Expand All @@ -32,7 +33,7 @@

(defcustom smudge-transport 'connect
"How the commands should be sent to Spotify process.
Defaults to 'connect, as it provides a consistent UX across all OSes."
Defaults to \\='connect, as it provides a consistent UX across all OSes."
:type '(choice (symbol :tag "AppleScript" apple)
(symbol :tag "D-Bus" dbus)
(symbol :tag "Connect" connect))
Expand Down Expand Up @@ -94,7 +95,7 @@ The following placeholders are supported:
* %t - Track name (truncated)
* %n - Track #
* %l - Track duration, in minutes (i.e. 01:35)
* %p - Player status indicator for 'playing', 'paused', and 'stopped' states
* %p - Player status indicator for playing, paused, and stopped states
* %s - Player shuffling status indicator
* %r - Player repeating status indicator"
:type 'string
Expand All @@ -117,7 +118,8 @@ Apply SUFFIX to smudge-controller-prefixed functions, applying ARGS."
(run-at-time 1 nil #'smudge-controller-player-status))))

(defun smudge-controller-update-metadata (metadata)
"Compose the playing status string to be displayed in the mode-line from METADATA."
"Compose the playing status string to be displayed in the mode-line
from METADATA."
(let* ((player-status smudge-player-status-format)
(duration-format "%m:%02s")
(json-object-type 'hash-table)
Expand Down Expand Up @@ -169,7 +171,8 @@ This corresponds to the current REPEATING state."
(and (boundp 'smudge-controller-timer) (timerp smudge-controller-timer)))

(defun smudge-controller-start-player-status-timer ()
"Start the timer that will update the mode line according to the Spotify player status."
"Start the timer that will update the mode line according to the Spotify
player status."
(when (and (not (smudge-controller-timerp)) (> smudge-player-status-refresh-interval 0))
(setq smudge-controller-timer
(run-at-time t smudge-player-status-refresh-interval #'smudge-controller-player-status))))
Expand Down
2 changes: 1 addition & 1 deletion smudge-remote.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:type 'string)

(defcustom smudge-status-location 'modeline
"Specify where to show the player status: one of '(modeline title-bar nil)."
"Specify where to show the player status: one of \\='(modeline title-bar nil)."
:type '(choice (const :tag "Modeline" modeline)
(const :tag "Title Bar" title-bar)
(const :tag "Do not show" nil))
Expand Down
2 changes: 1 addition & 1 deletion smudge-track.el
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Default to sortin tracks by number when listing the tracks from an album."
(smudge-api-queue-add-track
track-id
(lambda(_)
(message (format "Added \"%s\" to your queue." (smudge-api-get-item-name selected-track))))))))
(message "Added \"%s\" to your queue." (smudge-api-get-item-name selected-track)))))))


(provide 'smudge-track)
Expand Down
2 changes: 1 addition & 1 deletion smudge.el
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Prompt for the NAME and whether it should be made PUBLIC."
(define-key map (kbd "t s") #'smudge-track-search)
(define-key map (kbd "d") #'smudge-select-device)
map)
"Keymap for Spotify commands after 'smudge-keymap-prefix'.")
"Keymap for Spotify commands after \\='smudge-keymap-prefix\\='.")
(fset 'smudge-command-map smudge-command-map)

(easy-menu-add-item nil '("Tools")
Expand Down

0 comments on commit dc74e41

Please sign in to comment.