emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mpv 1e666079b8 05/50: skip junk at beginning of buffer


From: ELPA Syncer
Subject: [nongnu] elpa/mpv 1e666079b8 05/50: skip junk at beginning of buffer
Date: Tue, 28 Dec 2021 00:58:34 -0500 (EST)

branch: elpa/mpv
commit 1e666079b806f6defadec6507cc72f2b62442d6d
Author: Johann Klähn <kljohann@gmail.com>
Commit: Johann Klähn <kljohann@gmail.com>

    skip junk at beginning of buffer
---
 mpv-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mpv-mode.el b/mpv-mode.el
index 02ce91de57..1da08ed794 100644
--- a/mpv-mode.el
+++ b/mpv-mode.el
@@ -106,6 +106,8 @@ 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": ...}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]