summaryrefslogtreecommitdiff
path: root/lisp/thingatpt.el
diff options
context:
space:
mode:
authorMarkus Rost <rost@math.uni-bielefeld.de>2002-10-06 17:54:15 +0000
committerMarkus Rost <rost@math.uni-bielefeld.de>2002-10-06 17:54:15 +0000
commit1c1766c7e3778b4c8a4c346496d4c8648b5fa839 (patch)
tree3b8ccc78c7e0081226fe89367e8adc8ec67e343e /lisp/thingatpt.el
parent845d331ee65885f025af238b2b9b6c07684bbca4 (diff)
downloademacs-1c1766c7e3778b4c8a4c346496d4c8648b5fa839.tar.gz
(thing-at-point-uri-schemes): New variable.
(thing-at-point-url-regexp): Use it.
Diffstat (limited to 'lisp/thingatpt.el')
-rw-r--r--lisp/thingatpt.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index d0ede90ed35..167f0657248 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -213,10 +213,21 @@ a symbol as a valid THING."
Hostname matching is stricter in this case than for
``thing-at-point-url-regexp''.")
+(defvar thing-at-point-uri-schemes
+ ;; Officials from http://www.iana.org/assignments/uri-schemes
+ '("ftp://" "http://" "gopher://" "mailto:" "news:" "nntp:"
+ "telnet://" "wais://" "file:/" "prospero:" "z39.50s:" "z39.50r:"
+ "cid:" "mid:" "vemmi:" "service:" "imap:" "nfs:" "acap:" "rtsp:"
+ "tip:" "pop:" "data:" "dav:" "opaquelocktoken:" "sip:" "tel:" "fax:"
+ "modem:" "ldap:" "https://" "soap.beep:" "soap.beeps:" "urn:" "go:"
+ "afs:" "tn3270:" "mailserver:"
+ ;; Compatibility
+ "snews:")
+ "Uniform Resource Identifier (URI) Schemes")
+
(defvar thing-at-point-url-regexp
- (concat
- "\\<\\(https?://\\|ftp://\\|gopher://\\|telnet://\\|wais://\\|file:/\\|s?news:\\|mailto:\\)"
- thing-at-point-url-path-regexp)
+ (concat "\\<\\(" (mapconcat 'identity thing-at-point-uri-schemes "\\|") "\\)"
+ thing-at-point-url-path-regexp)
"A regular expression probably matching a complete URL.")
(defvar thing-at-point-markedup-url-regexp