Subject: [PATCH] * lisp/net/goto-addr.el: Add global minor mode for goto-addr-mode.

From: noah swainland <[email-masked]>
Date: Wed, 19 Aug 2020 12:49:22 +0100

Found that I couldn't enable goto-addr either globally or through the
customize interface, so added it.

I found it unclear which version I should add in the key-value lines,
if this is wrong please let me know and I'll send another patch.
---
 lisp/net/goto-addr.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 9436f45aa3..95f8a43144 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -280,6 +280,16 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and
       (widen)
       (goto-address-unfontify (point-min) (point-max)))))
 
+(defun turn-on-goto-addr-mode ()
+  (when (not goto-address-mode)
+    (goto-address-mode 1)))
+
+;;;###autoload
+(define-globalized-minor-mode global-goto-address-mode
+  goto-address-mode turn-on-goto-addr-mode
+  :group 'goto-address
+  :version "27.1")
+
 ;;;###autoload
 (define-minor-mode goto-address-prog-mode
   "Like `goto-address-mode', but only for comments and strings."
-- 
2.28.0

-- Email domain proudly hosted at https://migadu.com