[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mpv 15c51ddc5e 10/50: remove dependency on dash library
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mpv 15c51ddc5e 10/50: remove dependency on dash library |
Date: |
Tue, 28 Dec 2021 00:58:35 -0500 (EST) |
branch: elpa/mpv
commit 15c51ddc5ec66270df2fbe9b5fbac32b54d21f03
Author: Johann Klähn <kljohann@gmail.com>
Commit: Johann Klähn <kljohann@gmail.com>
remove dependency on dash library
---
mpv-mode.el | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/mpv-mode.el b/mpv-mode.el
index 3faae03575..898ab6cca7 100644
--- a/mpv-mode.el
+++ b/mpv-mode.el
@@ -28,7 +28,6 @@
(eval-when-compile (require 'names))
(require 'tq)
-(require 'dash)
(require 'json)
(define-namespace mpv-mode-
@@ -116,21 +115,21 @@ Replacement for `tq-process-buffer' that ignores regular
expressions
\(answers are always passed to the first handler in the queue) and
drops unsolicited event messages."
(goto-char (point-min))
- (unless (memq (char-after (point)) '(nil ?{))
- (skip-chars-forward "^{"))
- (-when-let (answer (ignore-errors (json-read)))
- (delete-region (point-min) (point))
- ;; event messages have form {"event": ...}
- ;; answers have form {"error": ..., "data": ...}
- ;; FIXME: handle errors?
- (unless (or (assoc 'event answer) (tq-queue-empty tq))
- (unwind-protect
- (condition-case nil
- (funcall (tq-queue-head-fn tq)
- (cdr (assoc 'data answer)))
- (error nil))
- (tq-queue-pop tq)))
- (-tq-process-buffer tq)))
+ (skip-chars-forward "^{")
+ (let ((answer (ignore-errors (json-read))))
+ (when answer
+ (delete-region (point-min) (point))
+ ;; event messages have form {"event": ...}
+ ;; answers have form {"error": ..., "data": ...}
+ ;; FIXME: handle errors?
+ (unless (or (assoc 'event answer) (tq-queue-empty tq))
+ (unwind-protect
+ (condition-case nil
+ (funcall (tq-queue-head-fn tq)
+ (cdr (assoc 'data answer)))
+ (error nil))
+ (tq-queue-pop tq)))
+ (-tq-process-buffer tq))))
(defun pause ()
"Pause or unpause playback."
- [nongnu] elpa/mpv bc89524528 15/50: use timer formatting from org-timer.el, (continued)
- [nongnu] elpa/mpv bc89524528 15/50: use timer formatting from org-timer.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv b026ae5bb6 46/50: Merge pull request #19 from c1-g/volume, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 1e666079b8 05/50: skip junk at beginning of buffer, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 8c0933630b 08/50: add seek-to-position-at-point, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 03fe7a536a 24/50: add mpv-on-start-hook and mpv-on-exit-hook, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 3021c55fa5 32/50: Merge pull request #1 from magnusstahre/expand-tilde, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv f31cbdb94a 37/50: Add convenience functions to get and set properties, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv f0f61db3af 47/50: Add COPYING file following GPL, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 4774d52c8c 48/50: Merge pull request #21 from sachac/master, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 604b32d7e6 11/50: add play command, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 15c51ddc5e 10/50: remove dependency on dash library,
ELPA Syncer <=
- [nongnu] elpa/mpv 059135de39 28/50: version 0.1.0, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9e1781249f 27/50: convert numbers to strings before encoding as JSON, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 79e01bf89b 35/50: Remove stale socket files when mpv process is gone, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 4dddd55c5e 41/50: Add mpv-version., ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 2d40c45505 38/50: Add mpv-seek and mpv-revert-seek commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv a5c6eed9ac 44/50: Add volume control commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 3a43c9e60a 14/50: reorder function definitions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 338af25d20 23/50: add mpv-on-event-hook, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 937bdf522a 17/50: implement seeking and changing of playback speed, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 0e4318b45f 13/50: improve docstrings, ELPA Syncer, 2021/12/28