- (if (string= protocol "gopher")
- (let* ((host (match-string 2))
- (port (if (> (length (match-string 3)) 1)
- (string-to-number (substring (match-string 3) 1))
- 70))
- (type-and-selector (match-string 4))
- (type (if (> (length type-and-selector) 1)
- (elt type-and-selector 1)
- ?1))
- (selector (if (> (length type-and-selector) 1)
- (substring type-and-selector 2)
- ""))
- (address (elpher-make-address selector host port))
- (getter (car (alist-get type elpher-type-map))))
- (make-text-button (match-beginning 0)
- (match-end 0)
- 'elpher-node (elpher-make-node elpher-current-node
- address
- getter)
- 'action #'elpher-click-link
- 'follow-link t
- 'help-echo (format "mouse-1, RET: open '%s' on %s port %s"
- selector host port)))
+ (let ((node
+ (if (string= protocol "gopher")
+ (let* ((host (match-string 2))
+ (port (if (> (length (match-string 3)) 1)
+ (string-to-number (substring (match-string 3) 1))
+ 70))
+ (type-and-selector (match-string 4))
+ (type (if (> (length type-and-selector) 1)
+ (elt type-and-selector 1)
+ ?1))
+ (selector (if (> (length type-and-selector) 1)
+ (substring type-and-selector 2)
+ ""))
+ (address (elpher-make-address selector host port))
+ (getter (car (alist-get type elpher-type-map))))
+ (elpher-make-node elpher-current-node address getter))
+ (let* ((host (match-string 2))
+ (port (if (> (length (match-string 3)) 1)
+ (string-to-number (substring (match-string 3) 1))
+ 70))
+ (selector (concat "URL:" url))
+ (address (elpher-make-address selector host port))
+ (getter (car (alist-get ?h elpher-type-map))))
+ (elpher-make-node elpher-current-node address getter)))))