240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
-
+
-
+
+
+
+
+
-
-
-
|
(defun sbbs--insert-link (text link)
"Insert link to LINK as TEXT into buffer.
If LINK is a (board, thread or site) local link, modify opening
behaviour accordingly."
(save-match-data
(let ((match (string-match sbbs--link-regexp link))
range id)
range id other)
(when match
(when (match-string 4 link)
(setq range (sbbs--parse-number-range (match-string 4 link) 300)))
(setq id (string-to-number (match-string 3 link))))
(setq id (string-to-number (match-string 3 link)))
(setq other (sbbs-make-board
(match-string 1 link)
(match-string 2 link)
(string-match-p "\\`https://" link))))
(let* ((board sbbs--board)
(domain (sbbs--board-domain board))
(name (sbbs--board-name board))
(other (sbbs-make-board (match-string 1 link)
(match-string 2 link)
(string-match-p "\\`https://" link)))
(func (lambda (&optional _)
(cond ((not match) (browse-url link))
;; other supported board
((or (and (sbbs--board-domain other)
(not (string= (sbbs--board-domain other)
domain)))
(not (string= name (sbbs--board-name other))))
|