]> git.eshelyaron.com Git - emacs.git/commitdiff
Add query command removed in 4ff1f66b12
authorPhilip Kaludercic <philipk@posteo.net>
Tue, 6 Jul 2021 06:52:50 +0000 (08:52 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Tue, 6 Jul 2021 06:52:50 +0000 (08:52 +0200)
* rcirc.el (query): Readd accidentally removed command

lisp/net/rcirc.el

index caec150848974e6c6a5e414dfba3b4f4934dc35e..af0def8e474a49bfc04c8115ac47e908f0cd1c8c 100644 (file)
@@ -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."