[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/rcirc.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/rcirc.el,v |
Date: |
Sun, 24 Feb 2008 10:09:20 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/02/24 10:09:07
Index: lisp/net/rcirc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/rcirc.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- lisp/net/rcirc.el 9 Feb 2008 03:52:58 -0000 1.44
+++ lisp/net/rcirc.el 24 Feb 2008 10:09:04 -0000 1.45
@@ -2137,23 +2137,24 @@
string))
(defvar rcirc-url-regexp
- (rx-to-string
- `(and word-boundary
- (or (and
- (or (and (or "http" "https" "ftp" "file" "gopher" "news"
- "telnet" "wais" "mailto")
- "://")
- "www.")
- (1+ (char "-a-zA-Z0-9_."))
- (1+ (char "-a-zA-Z0-9_"))
- (optional ":" (1+ (char "0-9"))))
- (and (1+ (char "-a-zA-Z0-9_."))
- (or ".com" ".net" ".org")
- word-boundary))
- (optional
- (and "/"
- (1+ (char "-a-zA-Z0-9_='address@hidden&*+|\\/:;.,{}[]()"))
- (char "address@hidden&*+|\\/:;{}[]()")))))
+ (concat
+ "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
+ "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
+ "\\(//[-a-z0-9_.]+:[0-9]*\\)?"
+ (if (string-match "[[:digit:]]" "1") ;; Support POSIX?
+ (let ((chars "address@hidden&*+\\/[:word:]")
+ (punct "!?:;.,"))
+ (concat
+ "\\(?:"
+ ;; Match paired parentheses, e.g. in Wikipedia URLs:
+ "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "["
chars "]"
+ "\\|"
+ "[" chars punct "]+" "[" chars "]"
+ "\\)"))
+ (concat ;; XEmacs 21.4 doesn't support POSIX.
+ "\\(address@hidden&*+\\/:;.,]\\|\\w\\)+"
+ "\\(address@hidden&*+\\/]\\|\\w\\)"))
+ "\\)")
"Regexp matching URLs. Set to nil to disable URL features in rcirc.")
(defun rcirc-browse-url (&optional arg)