aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2008-02-10 14:04:01 +0000
committerRichard M. Stallman2008-02-10 14:04:01 +0000
commit73dd622fb4648ce267acbaa15e1b57d64ddedb9f (patch)
tree6ddb99febf5f3a9d5728a990fb8c63b67fc82fb9
parent4ff718fbc02c7efc835603fd08e59187afa11d98 (diff)
downloademacs-73dd622fb4648ce267acbaa15e1b57d64ddedb9f.tar.gz
emacs-73dd622fb4648ce267acbaa15e1b57d64ddedb9f.zip
(rcirc-url-regexp): Replace definition by copying from gnus-button-url-regexp.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/rcirc.el35
2 files changed, 23 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c1cd83312bc..9bc3a32df6f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-02-10 ,AF(Bvar Arnfj,Av(Br,Ap(B Bjarmason <avar@cpan.org> (tiny change)
2
3 * net/rcirc.el (rcirc-url-regexp): Replace definition by copying
4 from gnus-button-url-regexp.
5
12008-02-09 Eli Zaretskii <eliz@gnu.org> 62008-02-09 Eli Zaretskii <eliz@gnu.org>
2 7
3 * progmodes/compile.el (compilation-next-error): Doc fix. 8 * progmodes/compile.el (compilation-next-error): Doc fix.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 5bc775b8957..d885b059240 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1887,23 +1887,24 @@ keywords when no KEYWORD is given."
1887 string)) 1887 string))
1888 1888
1889(defvar rcirc-url-regexp 1889(defvar rcirc-url-regexp
1890 (rx-to-string 1890 (concat
1891 `(and word-boundary 1891 "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
1892 (or (and 1892 "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
1893 (or (and (or "http" "https" "ftp" "file" "gopher" "news" 1893 "\\(//[-a-z0-9_.]+:[0-9]*\\)?"
1894 "telnet" "wais" "mailto") 1894 (if (string-match "[[:digit:]]" "1") ;; Support POSIX?
1895 "://") 1895 (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
1896 "www.") 1896 (punct "!?:;.,"))
1897 (1+ (char "-a-zA-Z0-9_.")) 1897 (concat
1898 (1+ (char "-a-zA-Z0-9_")) 1898 "\\(?:"
1899 (optional ":" (1+ (char "0-9")))) 1899 ;; Match paired parentheses, e.g. in Wikipedia URLs:
1900 (and (1+ (char "-a-zA-Z0-9_.")) 1900 "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]"
1901 (or ".com" ".net" ".org") 1901 "\\|"
1902 word-boundary)) 1902 "[" chars punct "]+" "[" chars "]"
1903 (optional 1903 "\\)"))
1904 (and "/" 1904 (concat ;; XEmacs 21.4 doesn't support POSIX.
1905 (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]()")) 1905 "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
1906 (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]()"))))) 1906 "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
1907 "\\)")
1907 "Regexp matching URLs. Set to nil to disable URL features in rcirc.") 1908 "Regexp matching URLs. Set to nil to disable URL features in rcirc.")
1908 1909
1909(defun rcirc-browse-url (&optional arg) 1910(defun rcirc-browse-url (&optional arg)