[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/emms e85a9dd6cf 1/2: * emms-setup.el: Add prefix option
From: |
ELPA Syncer |
Subject: |
[elpa] externals/emms e85a9dd6cf 1/2: * emms-setup.el: Add prefix option to emms-setup-discover-players. |
Date: |
Fri, 27 Oct 2023 18:58:01 -0400 (EDT) |
branch: externals/emms
commit e85a9dd6cf507de9bb951d0238a5b5a4234d0331
Author: Yoni Rabkin <yrk@gnu.org>
Commit: Yoni Rabkin <yrk@gnu.org>
* emms-setup.el: Add prefix option to emms-setup-discover-players.
---
emms-setup.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/emms-setup.el b/emms-setup.el
index e96ccea0f9..7db9bd48c4 100644
--- a/emms-setup.el
+++ b/emms-setup.el
@@ -176,11 +176,14 @@ the stable features which come with the Emms
distribution."
(emms-setup-discover-player-binary bin-str)
nil)))
-(defun emms-setup-discover-players ()
- "Interactively add players to `emms-player-list'."
- (interactive)
+(defun emms-setup-discover-players (arg)
+ "Interactively add players to `emms-player-list'.
+
+With a prefix, also insert the configuration at point."
+ (interactive "P")
(when (and emms-player-list
- (y-or-n-p (format "emms-player-list is already set to %s, do you
want to empty it first?"
+ (y-or-n-p (format "`emms-player-list' is already set to %s, do
you want to empty it
+first?"
emms-player-list)))
(setq emms-player-list nil))
(let ((players (copy-tree emms-setup-default-player-list)))
@@ -192,6 +195,9 @@ the stable features which come with the Emms distribution."
player))
(add-to-list 'emms-player-list player))))
(setq players (cdr players))))
+ (when arg
+ (insert
+ (format "(setq emms-player-list '%s)" emms-player-list)))
(message "emms-player-list is now set to: %s" emms-player-list))