]> git.eshelyaron.com Git - emacs.git/commitdiff
(thing-at-point-uri-schemes): New variable.
authorMarkus Rost <rost@math.uni-bielefeld.de>
Sun, 6 Oct 2002 17:54:15 +0000 (17:54 +0000)
committerMarkus Rost <rost@math.uni-bielefeld.de>
Sun, 6 Oct 2002 17:54:15 +0000 (17:54 +0000)
(thing-at-point-url-regexp): Use it.

lisp/ChangeLog
lisp/thingatpt.el

index 2d5865c7c3fa58bf0bf228daf9e0c0fcd7be7aeb..61a52e756a5a83c299d25769c866bdaf0d51649a 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-06  Markus Holmberg <markush@acc.umu.se>  (tiny change)
+
+       * thingatpt.el (thing-at-point-uri-schemes): New variable.
+       (thing-at-point-url-regexp): Use it.
+
 2002-10-06  Glenn Morris  <gmorris@ast.cam.ac.uk>
 
        * progmodes/fortran.el (fortran-beginning-do): Ignore labelled DO
index d0ede90ed35e7ba152af4dfa302e1b20ec1bf84c..167f0657248c58a4e4e74ccac4bbbf98a365b89d 100644 (file)
@@ -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