Function: ghostel-links-setup

ghostel-links-setup is a natively compiled function defined in ghostel-links.el.

Signature

(ghostel-links-setup)

Documentation

Wire the link integrations into the current ghostel buffer.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-links.el
;;; Mode setup

(defun ghostel-links-setup ()
  "Wire the link integrations into the current ghostel buffer."
  ;; Show the hyperlink URI at point in eldoc.
  (add-hook 'eldoc-documentation-functions #'ghostel--eldoc-link nil t)
  ;; Serve whole targets to thing-at-point (and through it embark,
  ;; `existing-filename', etc.) and to the find-file `M-n' default,
  ;; which otherwise see only the fragment of a soft-wrapped row.
  (setq-local thing-at-point-provider-alist
              (append '((filename . ghostel--thing-at-point-filename)
                        (existing-filename . ghostel--fileref-file-at-point)
                        (url . ghostel--thing-at-point-url))
                      thing-at-point-provider-alist))
  (when (boundp 'bounds-of-thing-at-point-provider-alist)
    (setq-local bounds-of-thing-at-point-provider-alist
                (append '((filename . ghostel--bounds-of-file-link-at-point)
                          (existing-filename . ghostel--bounds-of-file-link-at-point)
                          (url . ghostel--bounds-of-url-link-at-point))
                        bounds-of-thing-at-point-provider-alist)))
  (add-hook 'file-name-at-point-functions #'ghostel--fileref-file-at-point nil t))