From: Tim Vaughan Date: Thu, 7 Oct 2021 09:14:39 +0000 (+0200) Subject: Avoid type error when browse-url-br-fun is not a symbol. X-Git-Tag: v3.3.0~5 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=commitdiff_plain;h=02fade7fc9a6b642359552694cc7bed95132cf18;ds=sidebyside Avoid type error when browse-url-br-fun is not a symbol. --- diff --git a/elpher.el b/elpher.el index 3d8e77f..d8e588c 100644 --- 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."