branch: elpa/hyperdrive
commit 397d474242eb113839e2e25e0b6bbb72b26285cf
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>

    Add: find-file-at-point (ffap) support
    
    Now, ffap users who have (ffap-bindings) in their configs will be able
    to press C-x C-f RET with point on a hyper:// URL to open the link.
---
 hyperdrive.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index a0d1f61009..a9816d9e40 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1255,6 +1255,14 @@ Intended for relative (i.e. non-full) URLs."
   (when (boundp 'markdown-follow-link-functions)
     (cl-pushnew #'hyperdrive--markdown-follow-link 
markdown-follow-link-functions)))
 
+;;;;; `find-file-at-point' (`ffap') support
+
+(with-eval-after-load 'ffap
+  (setf ffap-url-regexp
+        (if ffap-url-regexp
+            (rx-to-string `(or ,ffap-url-regexp (seq bos "hyper://")))
+          (rx bos "hyper://"))))
+
 ;;;; Footer
 
 (provide 'hyperdrive)

Reply via email to