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

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

[elpa] externals/ampc 5bc124583a 071/111: * ampc.el (ampc-suspended-p):


From: Stefan Monnier
Subject: [elpa] externals/ampc 5bc124583a 071/111: * ampc.el (ampc-suspended-p): New command.
Date: Tue, 20 Feb 2024 18:16:41 -0500 (EST)

branch: externals/ampc
commit 5bc124583aae6f8d98f5ecd764c00835a26e2025
Author: Christopher Schmidt <christopher@ch.ristopher.com>
Commit: Christopher Schmidt <christopher@ch.ristopher.com>

    * ampc.el (ampc-suspended-p): New command.
---
 ampc.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ampc.el b/ampc.el
index f2c5f05823..9da57aefda 100644
--- a/ampc.el
+++ b/ampc.el
@@ -59,7 +59,7 @@
 ;; connected to the daemon, it creates its window configuration in the selected
 ;; window.  To make ampc use the full frame rather than the selected window,
 ;; customise `ampc-use-full-frame'.  To check whether ampc is connected to the
-;; daemon, call `ampc-is-on-p'.
+;; daemon, call `ampc-is-on-p' and `ampc-suspended-p'.
 ;;
 ;; ampc offers three independent views which expose different parts of the user
 ;; interface.  The current playlist view, the default view at startup, may be
@@ -2034,6 +2034,13 @@ ampc is connected to."
         ampc-status nil)
   (run-hooks 'ampc-quit-hook))
 
+;;;###autoload
+(defun ampc-suspended-p ()
+  "Return non-nil if ampc is suspended."
+  (interactive)
+  (and (ampc-on-p)
+       (not ampc-buffers)))
+
 ;;;###autoload
 (defun ampc-on-p ()
   "Return non-nil if ampc is connected to the daemon."



reply via email to

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