[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/rcirc-update 77631c2 2/2: Add query command removed in 4ff1f66b1
From: |
Philip Kaludercic |
Subject: |
feature/rcirc-update 77631c2 2/2: Add query command removed in 4ff1f66b12 |
Date: |
Tue, 6 Jul 2021 02:53:14 -0400 (EDT) |
branch: feature/rcirc-update
commit 77631c2a7704f78e6b85846d2c23a2ffc22368cf
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add query command removed in 4ff1f66b12
* rcirc.el (query): Readd accidentally removed command
---
lisp/net/rcirc.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index caec150..af0def8 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2480,6 +2480,17 @@ that, an interactive form can specified."
(read-string "Message: ")))
(rcirc-send-message process chan-or-nick message))
+(rcirc-define-command query (nick)
+ "Open a private chat buffer to NICK."
+ (interactive (list (completing-read "Query nick: "
+ (with-rcirc-server-buffer
+ rcirc-nick-table))))
+ (let ((existing-buffer (rcirc-get-buffer process nick)))
+ (switch-to-buffer (or existing-buffer
+ (rcirc-get-buffer-create process nick)))
+ (when (not existing-buffer)
+ (rcirc-cmd-whois nick))))
+
(rcirc-define-command join (channels)
"Join CHANNELS.
CHANNELS is a comma- or space-separated string of channel names."