[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ampc 376a9f6ece 070/111: * ampc.el (ampc-on-p): Make th
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ampc 376a9f6ece 070/111: * ampc.el (ampc-on-p): Make this function a command. |
Date: |
Tue, 20 Feb 2024 18:16:41 -0500 (EST) |
branch: externals/ampc
commit 376a9f6ece22abfa780b374594dbba7e51d1ffe9
Author: Christopher Schmidt <christopher@ch.ristopher.com>
Commit: Christopher Schmidt <christopher@ch.ristopher.com>
* ampc.el (ampc-on-p): Make this function a command.
---
ampc.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/ampc.el b/ampc.el
index 00200911d2..f2c5f05823 100644
--- a/ampc.el
+++ b/ampc.el
@@ -55,9 +55,11 @@
;; interactively, `ampc' reads host address and port from the minibuffer. If
;; called non-interactively, the first argument to `ampc' is the host, the
;; second is the port. Both values default to nil, which will make ampc
connect
-;; to localhost:6600. Once ampc is 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 localhost:6600. If the optional third argument is non-nil and ampc is
+;; 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'.
;;
;; ampc offers three independent views which expose different parts of the user
;; interface. The current playlist view, the default view at startup, may be
@@ -685,10 +687,6 @@ all the time!"
(defun ampc-quote (string)
(concat "\"" (replace-regexp-in-string "\"" "\\\"" string) "\""))
-(defun ampc-on-p ()
- (and ampc-connection
- (member (process-status ampc-connection) '(open run))))
-
(defun ampc-in-ampc-p ()
(when (ampc-on-p)
ampc-type))
@@ -2037,6 +2035,11 @@ ampc is connected to."
(run-hooks 'ampc-quit-hook))
;;;###autoload
+(defun ampc-on-p ()
+ "Return non-nil if ampc is connected to the daemon."
+ (interactive)
+ (and ampc-connection (memq (process-status ampc-connection) '(open run))))
+
;;;###autoload
(defun ampc (&optional host port suspend)
"ampc is an asynchronous client for the MPD media player.
- [elpa] externals/ampc 69bef3a98d 040/111: Fix code alignment., (continued)
- [elpa] externals/ampc 69bef3a98d 040/111: Fix code alignment., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 18dc9a9870 041/111: Handle listallinfo chunks right after receiving them., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 473ad7dbc3 042/111: Add emacswiki-generator.el., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc d8ba1ed217 045/111: * ampc.el (ampc): Fix typo., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 204540b0de 047/111: * ampc.el (ampc-fill-internal-db): Fix empty region bug., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 5b560e377d 050/111: * ampc.el (ampc-fill-internal-db-entry): Use a better format for storing data., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 383074a3b1 053/111: * ampc.el: Name views., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc b12dedc83d 062/111: * ampc.el: Bump version to 0.1.3., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 6a8bf556e6 066/111: * ampc.el (ampc): Warn if ampc is not byte compiled., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 7600043106 067/111: * ampc.el (ampc-narrow-entry): Return position of next entry., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 376a9f6ece 070/111: * ampc.el (ampc-on-p): Make this function a command.,
Stefan Monnier <=
- [elpa] externals/ampc 5bc124583a 071/111: * ampc.el (ampc-suspended-p): New command., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc edda56364f 077/111: * ampc.el (ampc-synchronous-commands): New constant., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 8357bd6679 078/111: * ampc.el (ampc-configure-frame): Reorder update statements to guarantee correct, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 1008d25458 087/111: * ampc.el: Minor optimizations and doc fixes., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc c930356366 089/111: * ampc.el: Track windows., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 481253313e 090/111: * ampc.el (ampc-fix-pos, ampc-move-impl): Remove., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 6b96b2215e 093/111: * ampc.el: Optimise parsing of MPD's output., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 11be30d5c1 096/111: * ampc.el (ampc-send-command): Allow all other keys in PROPS. Store PROPS in, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 26c78cf4a5 108/111: * ampc.el: Fix compilation warnings, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc b89aa28b49 001/111: Initial commit., Stefan Monnier, 2024/02/20