emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/rcirc.el,v [EMACS_22_BASE]


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/net/rcirc.el,v [EMACS_22_BASE]
Date: Sun, 10 Feb 2008 14:03:54 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Richard M. Stallman <rms>       08/02/10 14:03:54

Index: rcirc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/rcirc.el,v
retrieving revision 1.32.2.4
retrieving revision 1.32.2.5
diff -u -b -r1.32.2.4 -r1.32.2.5
--- rcirc.el    7 Jan 2008 01:56:14 -0000       1.32.2.4
+++ rcirc.el    10 Feb 2008 14:03:53 -0000      1.32.2.5
@@ -1887,23 +1887,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 "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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]