1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merge from emacs--rel--22

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1074
This commit is contained in:
Miles Bader 2008-02-24 10:09:07 +00:00
commit b03f96dc5a
71 changed files with 1500 additions and 705 deletions

View file

@ -2137,23 +2137,24 @@ keywords when no KEYWORD is given."
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_='!?#$\@~`%&*+|\\/:;.,{}[]()"))
(char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]()")))))
(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 "-a-z0-9_=#$@~%&*+\\/[: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.
"\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
"\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
"\\)")
"Regexp matching URLs. Set to nil to disable URL features in rcirc.")
(defun rcirc-browse-url (&optional arg)