branch: elpa/mpv commit 2d24187f7bdb0495c90d5109a730742e735636ba Merge: d7bb3a7082 705e81b8a6 Author: Johann Klähn <joh...@jklaehn.de> Commit: GitHub <nore...@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