diff options
author | Yoni Rabkin <yoni@rabkins.net> | 2017-07-14 16:16:21 -0400 |
---|---|---|
committer | Yoni Rabkin <yoni@rabkins.net> | 2017-07-14 16:16:21 -0400 |
commit | 5401b0df9b4a45fb9f01b7f4236f99b34c79595a (patch) | |
tree | ecf5a37d4a06ca5a278b70d7a35c37ecae60a121 /lisp/emms-volume-pulse.el | |
parent | a4ec6697e45a006753bfd79c22f14524748df493 (diff) |
Move from cl to cl-lib.
Patch by tumashu <tumashu@163.com>.
Diffstat (limited to 'lisp/emms-volume-pulse.el')
-rw-r--r-- | lisp/emms-volume-pulse.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/emms-volume-pulse.el b/lisp/emms-volume-pulse.el index 7fc6de5..a3f9620 100644 --- a/lisp/emms-volume-pulse.el +++ b/lisp/emms-volume-pulse.el @@ -42,7 +42,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(require 'cl-lib) ;; TODO: it would be great if custom could have ;; choices based on pactl list short sinks | cut -f1-2 @@ -77,18 +77,18 @@ See full list of devices on your system by running (if sink-number-p 'assq 'assoc) emms-volume-pulse-sink (mapcar (if sink-number-p 'identity 'cdr) - (loop while - (string-match - (mapconcat 'identity - '(".*Sink[ \t]+\\#\\([0-9]\\)" - ".*Name:[ \t]\\([^\n]+\\)" - ".*Volume:.*?\\([0-9]+\\)%.*\n?") - "\n") - output) - collect (list (string-to-number (match-string 1 output)) - (match-string 2 output) - (match-string 3 output)) - do (setq output (replace-match "" nil nil output)))))))))) + (cl-loop while + (string-match + (mapconcat 'identity + '(".*Sink[ \t]+\\#\\([0-9]\\)" + ".*Name:[ \t]\\([^\n]+\\)" + ".*Volume:.*?\\([0-9]+\\)%.*\n?") + "\n") + output) + collect (list (string-to-number (match-string 1 output)) + (match-string 2 output) + (match-string 3 output)) + do (setq output (replace-match "" nil nil output)))))))))) ;;;###autoload |