The Lambda Lab
/
projects
/
elpher.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add back with-eval-after-load
[elpher.git]
/
elpher.el
diff --git
a/elpher.el
b/elpher.el
index
ec7edcb
..
f0770de
100644
(file)
--- a/
elpher.el
+++ b/
elpher.el
@@
-81,7
+81,6
@@
(require 'nsm)
(require 'gnutls)
(require 'socks)
(require 'nsm)
(require 'gnutls)
(require 'socks)
-(require 'ol)
;;; ANSI colors or XTerm colors
;;; ANSI colors or XTerm colors
@@
-1783,7
+1782,8
@@
If ADDRESS is already bookmarked, update the label only."
;; Avoid byte compilation warnings.
(eval-when-compile
(declare-function org-link-store-props "ol")
;; Avoid byte compilation warnings.
(eval-when-compile
(declare-function org-link-store-props "ol")
- (declare-function org-link-set-parameters "ol"))
+ (declare-function org-link-set-parameters "ol")
+ (defvar thing-at-point-uri-schemes))
(defun elpher-org-link-store ()
"Store link to an `elpher' page in `org'."
(defun elpher-org-link-store ()
"Store link to an `elpher' page in `org'."
@@
-1805,9
+1805,10
@@
If ADDRESS is already bookmarked, update the label only."
(string-match-p "^finger://.+" link))
(elpher-go (string-remove-prefix "elpher:" link))))
(string-match-p "^finger://.+" link))
(elpher-go (string-remove-prefix "elpher:" link))))
-(org-link-set-parameters "elpher"
- :store #'elpher-org-link-store
- :follow #'elpher-org-link-follow)
+(with-eval-after-load 'org
+ (org-link-set-parameters "elpher"
+ :store #'elpher-org-link-store
+ :follow #'elpher-org-link-follow))
;;;###autoload
(defun elpher-browse-url-elpher (url &rest _args)
;;;###autoload
(defun elpher-browse-url-elpher (url &rest _args)
@@
-1815,9
+1816,11
@@
If ADDRESS is already bookmarked, update the label only."
(interactive (browse-url-interactive-arg "Elpher URL: "))
(elpher-go url))
(interactive (browse-url-interactive-arg "Elpher URL: "))
(elpher-go url))
-(add-to-list
- 'browse-url-default-handlers
- '("^\\(gopher\\|finger\\|gemini\\)://" . elpher-browse-url-elpher))
+;; Use elpher to open gopher, finger and gemini links
+(with-eval-after-load 'browse-url
+ (add-to-list
+ 'browse-url-default-handlers
+ '("^\\(gopher\\|finger\\|gemini\\)://" . elpher-browse-url-elpher)))
;; Register "gemini://" as a URI scheme so `browse-url' does the right thing
(with-eval-after-load 'thingatpt
;; Register "gemini://" as a URI scheme so `browse-url' does the right thing
(with-eval-after-load 'thingatpt