diff options
Diffstat (limited to 'lisp/erc/erc-button.el')
-rw-r--r-- | lisp/erc/erc-button.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 6e30b3a7935..e4f5a190913 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -41,6 +41,7 @@ (require 'erc) (require 'wid-edit) (require 'erc-fill) +(require 'browse-url) ;;; Minor Mode @@ -87,12 +88,9 @@ above them." :type 'face :group 'erc-faces) -(defcustom erc-button-url-regexp - (concat "\\(www\\.\\|\\(s?https?\\|" - "ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\)" - "\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?" - "[-a-zA-Z0-9_=!?#$@~`%&*+\\/:;.,()]+[-a-zA-Z0-9_=#$@~`%&*+\\/()]") +(defcustom erc-button-url-regexp browse-url-button-regexp "Regular expression that matches URLs." + :version "27.1" :group 'erc-button :type 'regexp) @@ -223,14 +221,11 @@ PAR is a number of a regexp grouping whose text will be passed to (defvar erc-button-syntax-table (let ((table (make-syntax-table))) - (modify-syntax-entry ?\( "w" table) - (modify-syntax-entry ?\) "w" table) (modify-syntax-entry ?\[ "w" table) (modify-syntax-entry ?\] "w" table) (modify-syntax-entry ?\{ "w" table) (modify-syntax-entry ?\} "w" table) (modify-syntax-entry ?` "w" table) - (modify-syntax-entry ?' "w" table) (modify-syntax-entry ?^ "w" table) (modify-syntax-entry ?- "w" table) (modify-syntax-entry ?_ "w" table) |