Index: sbbs.el ================================================================== --- sbbs.el +++ sbbs.el @@ -42,10 +42,16 @@ "List of SchemeBBS sites and boards." :type '(repeat (list (string :tag "Board Domain") (repeat (string :tag "Board Name")) (boolean :tag "Use TLS?")))) +(defcustom sbbs-default-board nil + "Jump to first link after narrowing posts." + :type '(choice (const :tag "None" nil) + (cons (string :tag "Board Domain") + (string :tag "Board Name")))) + (defcustom sbbs-jump-to-link t "Jump to first link after narrowing posts." :type 'boolean) (defcustom sbbs-recenter-to-top t @@ -133,18 +139,33 @@ (defun sbbs-read-board () "Read in a board using `completing-read'. The list will be generated using `sbbs-boards', and the result will be a board object generated with `sbbs-make-board'." - (let (boards) + (let (boards def) (dolist (b (sbbs--list-boards)) + (when (and sbbs-default-board + (string= (sbbs--board-domain b) + (car sbbs-default-board)) + (string= (sbbs--board-name b) + (cdr sbbs-default-board))) + (setq def b)) (push (cons (format "/%s/ (%s)" (sbbs--board-name b) (sbbs--board-domain b)) b) boards)) - (cdr (assoc (completing-read "Board: " boards nil t) boards)))) + (let ((choice (completing-read + (if def + (format "Board (default %s/%s): " + (sbbs--board-domain def) + (sbbs--board-name def)) + "Board: ") + boards nil nil nil nil def))) + (if (stringp choice) + (cdr (assoc choice boards)) + choice)))) ;; UTILITY FUNCTIONS (defun sbbs--reload-thread (&optional _ignore-auto _noconfirm) "Function to reload an opened thread."