Avoid type error when browse-url-br-fun is not a symbol.
authorTim Vaughan <vaughant@bs-mbpr538.d.ethz.ch>
Thu, 7 Oct 2021 09:14:39 +0000 (11:14 +0200)
committerTim Vaughan <vaughant@bs-mbpr538.d.ethz.ch>
Thu, 7 Oct 2021 09:15:39 +0000 (11:15 +0200)
elpher.el

index 3d8e77f..d8e588c 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -2103,7 +2103,8 @@ supports the old protocol elpher, where the link is self-contained."
   ;; that variable is `browse-url-default-browser' by default, so
   ;; that's the function that gets advised. If the value is an alist,
   ;; however, we don't know what to do. Better not interfere?
-  (when (fboundp browse-url-browser-function)
+  (when (and (symbolp browse-url-browser-function)
+             (fboundp browse-url-browser-function))
     (advice-add browse-url-browser-function :before-while
                (lambda (url &rest _args)
                  "Handle gemini, gopher, and finger schemes using Elpher."