Index: sbbs.el ================================================================== --- sbbs.el +++ sbbs.el @@ -38,14 +38,16 @@ :group 'applications :prefix "sbbs-") (defcustom sbbs-boards '(("textboard.org" ("sol" "prog") t) - ("bbs.jp.net" ("mona") t)) + ("bbs.jp.net" (("mona" . "")) t)) "List of SchemeBBS sites and boards." :type '(repeat (list (string :tag "Board Domain") - (repeat (string :tag "Board Name")) + (repeat (or (string :tag "Board Name") + (cons (string :tag "Board Name") + (string :tag "API Path")))) (boolean :tag "Use TLS?")))) (defcustom sbbs-default-board nil "Jump to first link after narrowing posts." :type '(choice (const :tag "None" nil) @@ -130,11 +132,17 @@ "Get domain part of a BOARD object." (aref board 0)) (defsubst sbbs--board-name (board) "Get board name part of a BOARD object." - (aref board 1)) + (let ((name (aref board 1))) + (if (consp name) (car name) name))) + +(defsubst sbbs--board-api (board) + "Get board name part of a BOARD object." + (let ((name (aref board 1))) + (if (consp name) (cdr name) name))) (defsubst sbbs--board-protocol (board) "Determine protocol to be used for BOARD object." (if (aref board 2) "https" "http")) @@ -145,11 +153,13 @@ (let ((board (or board sbbs--board))) (format "%s://%s/%s%s/%s" (sbbs--board-protocol board) (sbbs--board-domain board) (if api-p "sexp/" "") - (sbbs--board-name board) + (if api-p + (sbbs--board-api board) + (sbbs--board-name board)) (or path "")))) (defun sbbs--list-boards () "Return a list of known board objects." (let (boards)