Function: comint-osc-hyperlink-handler
comint-osc-hyperlink-handler is a byte-compiled function defined in
comint.el.gz.
Signature
(comint-osc-hyperlink-handler _ TEXT)
Documentation
Create a hyperlink from an OSC 8 escape sequence.
This function is intended to be included as an entry of
comint-osc-handlers.
Source Code
;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint-osc-hyperlink-handler (_ text)
"Create a hyperlink from an OSC 8 escape sequence.
This function is intended to be included as an entry of
`comint-osc-handlers'."
(when comint-osc-hyperlink--state
(let ((start (car comint-osc-hyperlink--state))
(url (cdr comint-osc-hyperlink--state)))
(make-text-button start (point)
'type 'comint-osc-hyperlink
'browse-url-data url)))
(setq comint-osc-hyperlink--state
(and (string-match ";\\(.+\\)" text)
(cons (point-marker) (match-string-no-properties 1 text)))))