Initializer can now immediately connect to chosen network.
authorplugd <plugd@thelambdalab.xyz>
Fri, 16 Jul 2021 08:50:54 +0000 (10:50 +0200)
committerplugd <plugd@thelambdalab.xyz>
Fri, 16 Jul 2021 08:50:54 +0000 (10:50 +0200)
lurk.el

diff --git a/lurk.el b/lurk.el
index e9c089f..bd1e416 100644 (file)
--- a/lurk.el
+++ b/lurk.el
@@ -1102,14 +1102,17 @@ in which case they match anything.")
 ;;; Main start procedure
 ;;
 
-(defun lurk ()
-  "Switch to *lurk* buffer."
+(defun lurk (&optional network)
+  "Start lurk or just switch to the lurk buffer if one already exists.
+Also connect to NETWORK if non-nil."
   (interactive)
   (if (get-buffer "*lurk*")
       (switch-to-buffer "*lurk*")
     (switch-to-buffer "*lurk*")
     (lurk-mode)
-    (lurk-setup-buffer))
+    (lurk-setup-buffer)
+    (if network
+        (lurk-command-connect (list network))))
   "Started LURK.")