* riece-globals.el (riece-join-channel-candidate): New variable.
[riece] / lisp / riece-commands.el
index 3d0f9a9..3e3c614 100644 (file)
@@ -421,8 +421,14 @@ the layout to the selected layout-name."
   (interactive
    (let* ((completion-ignore-case t)
          (target
-          (riece-completing-read-identity
-           "Channel/User: " riece-current-channels))
+          (if riece-join-channel-candidate
+              (let ((default (riece-format-identity
+                              riece-join-channel-candidate)))
+                (riece-completing-read-identity
+                 (format "Channel/User (default %s): " default)
+                 riece-current-channels nil nil nil nil default))
+            (riece-completing-read-identity
+             "Channel/User: " riece-current-channels)))
          key)
      (if (and current-prefix-arg
              (riece-channel-p (riece-identity-prefix target)))