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

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

[nongnu] elpa/mpv 2d24187f7b 43/50: Merge pull request #9 from firmart/p


From: ELPA Syncer
Subject: [nongnu] elpa/mpv 2d24187f7b 43/50: Merge pull request #9 from firmart/patch-mpv-version
Date: Tue, 28 Dec 2021 00:58:43 -0500 (EST)

branch: elpa/mpv
commit 2d24187f7bdb0495c90d5109a730742e735636ba
Merge: d7bb3a7082 705e81b8a6
Author: Johann Klähn <johann@jklaehn.de>
Commit: GitHub <noreply@github.com>

    Merge pull request #9 from firmart/patch-mpv-version
---
 mpv.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/mpv.el b/mpv.el
index 54d696c34d..5348c92c83 100644
--- a/mpv.el
+++ b/mpv.el
@@ -362,5 +362,16 @@ of \\[universal-argument] will add another `mpv-seek-step' 
seconds."
   (interactive)
   (mpv--enqueue '("revert-seek") #'ignore))
 
+;;;###autoload
+(defun mpv-version ()
+  "Return the mpv version string.
+When called interactively, also show a more verbose version in
+the echo area."
+  (interactive)
+  (let ((version (cadr (split-string (car (process-lines mpv-executable 
"--version"))))))
+    (prog1 version
+      (if (called-interactively-p 'interactive)
+         (message "mpv %s" version)))))
+
 (provide 'mpv)
 ;;; mpv.el ends here



reply via email to

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