Function: ghostel--linkify
ghostel--linkify is a natively compiled function defined in
ghostel-links.el.
Signature
(ghostel--linkify FRAGMENTS URI RAW)
Documentation
Mark FRAGMENTS as a hyperlink to URI.
FRAGMENTS is the buffer ranges of one match, as ghostel--wrap-fragments
returns them. RAW is the text the match was made of, kept so a later
scan can tell this link from one whose text has since changed.
A range broken by soft wraps is marked one row at a time, with a
shared ghostel-link-id so link navigation treats the rows as one
link. The id is a cons, which never equals an OSC 8 id (those
are strings or integers).
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-links.el
(defun ghostel--linkify (fragments uri raw)
"Mark FRAGMENTS as a hyperlink to URI.
FRAGMENTS is the buffer ranges of one match, as `ghostel--wrap-fragments'
returns them. RAW is the text the match was made of, kept so a later
scan can tell this link from one whose text has since changed.
A range broken by soft wraps is marked one row at a time, with a
shared `ghostel-link-id' so link navigation treats the rows as one
link. The id is a cons, which never `equal's an OSC 8 id (those
are strings or integers)."
(let ((props (list 'help-echo uri
'mouse-face 'highlight
'keymap ghostel-link-map
'ghostel-link-text raw
'ghostel-link-id (cons 'ghostel-detected
(cl-incf ghostel--link-id-counter)))))
(pcase-dolist (`(,start . ,stop) fragments)
(add-text-properties start stop props))))