diff options
author | Noah Swainland <noah@distinctly.pink> | 2020-08-20 15:17:19 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-20 15:17:19 +0200 |
commit | 80628df778c2608e0d0d934ed884365ae94f9ddd (patch) | |
tree | 29668a6b19393553c3e1efb69c93dff7272af6a5 /lisp/net/goto-addr.el | |
parent | a566e409d0d962d3c2870691175836da22c31111 (diff) | |
download | emacs-80628df778c2608e0d0d934ed884365ae94f9ddd.tar.gz emacs-80628df778c2608e0d0d934ed884365ae94f9ddd.tar.bz2 emacs-80628df778c2608e0d0d934ed884365ae94f9ddd.zip |
Add global-goto-address-mode
* doc/emacs/misc.texi (Goto Address mode): Document it.
* lisp/net/goto-addr.el (global-goto-address-mode)
(goto-addr-mode--turn-on): New functions (bug#42937).
Diffstat (limited to 'lisp/net/goto-addr.el')
-rw-r--r-- | lisp/net/goto-addr.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 9436f45aa32..43bea76a6bc 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 goto-addr-mode--turn-on () + (when (not goto-address-mode) + (goto-address-mode 1))) + +;;;###autoload +(define-globalized-minor-mode global-goto-address-mode + goto-address-mode goto-addr-mode--turn-on + :group 'goto-address + :version "28.1") + ;;;###autoload (define-minor-mode goto-address-prog-mode "Like `goto-address-mode', but only for comments and strings." |