The user option to use instead to alter text to be sent is now
'erc-pre-send-functions'.
+---
+*** Improve matching/highlighting of nicknames.
+Open and close parenthesis and apostrophe are not considered valid
+nick characters anymore, matching the given grammar in RFC 2812
+section 2.3.1. This enables correct matching and highlighting of
+nicks when they are surrounded by parentheses, like (nick), and when
+adjacent to an apostrophe, like nick's.
+
+---
+*** Set 'erc-button-url-regexp' to 'browse-url-button-regexp'
+which better handles surrounding pair of parentheses.
+
** EUDC
---
(require 'erc)
(require 'wid-edit)
(require 'erc-fill)
+(require 'browse-url)
;;; Minor Mode
: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)
(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)
;; just put it in erc.el
(defvar erc-match-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)