diff options
| author | Markus Rost | 2002-10-06 17:54:15 +0000 |
|---|---|---|
| committer | Markus Rost | 2002-10-06 17:54:15 +0000 |
| commit | 1c1766c7e3778b4c8a4c346496d4c8648b5fa839 (patch) | |
| tree | 3b8ccc78c7e0081226fe89367e8adc8ec67e343e | |
| parent | 845d331ee65885f025af238b2b9b6c07684bbca4 (diff) | |
| download | emacs-1c1766c7e3778b4c8a4c346496d4c8648b5fa839.tar.gz emacs-1c1766c7e3778b4c8a4c346496d4c8648b5fa839.zip | |
(thing-at-point-uri-schemes): New variable.
(thing-at-point-url-regexp): Use it.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/thingatpt.el | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d5865c7c3f..61a52e756a5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-10-06 Markus Holmberg <markush@acc.umu.se> (tiny change) | ||
| 2 | |||
| 3 | * thingatpt.el (thing-at-point-uri-schemes): New variable. | ||
| 4 | (thing-at-point-url-regexp): Use it. | ||
| 5 | |||
| 1 | 2002-10-06 Glenn Morris <gmorris@ast.cam.ac.uk> | 6 | 2002-10-06 Glenn Morris <gmorris@ast.cam.ac.uk> |
| 2 | 7 | ||
| 3 | * progmodes/fortran.el (fortran-beginning-do): Ignore labelled DO | 8 | * progmodes/fortran.el (fortran-beginning-do): Ignore labelled DO |
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." | |||
| 213 | Hostname matching is stricter in this case than for | 213 | Hostname matching is stricter in this case than for |
| 214 | ``thing-at-point-url-regexp''.") | 214 | ``thing-at-point-url-regexp''.") |
| 215 | 215 | ||
| 216 | (defvar thing-at-point-uri-schemes | ||
| 217 | ;; Officials from http://www.iana.org/assignments/uri-schemes | ||
| 218 | '("ftp://" "http://" "gopher://" "mailto:" "news:" "nntp:" | ||
| 219 | "telnet://" "wais://" "file:/" "prospero:" "z39.50s:" "z39.50r:" | ||
| 220 | "cid:" "mid:" "vemmi:" "service:" "imap:" "nfs:" "acap:" "rtsp:" | ||
| 221 | "tip:" "pop:" "data:" "dav:" "opaquelocktoken:" "sip:" "tel:" "fax:" | ||
| 222 | "modem:" "ldap:" "https://" "soap.beep:" "soap.beeps:" "urn:" "go:" | ||
| 223 | "afs:" "tn3270:" "mailserver:" | ||
| 224 | ;; Compatibility | ||
| 225 | "snews:") | ||
| 226 | "Uniform Resource Identifier (URI) Schemes") | ||
| 227 | |||
| 216 | (defvar thing-at-point-url-regexp | 228 | (defvar thing-at-point-url-regexp |
| 217 | (concat | 229 | (concat "\\<\\(" (mapconcat 'identity thing-at-point-uri-schemes "\\|") "\\)" |
| 218 | "\\<\\(https?://\\|ftp://\\|gopher://\\|telnet://\\|wais://\\|file:/\\|s?news:\\|mailto:\\)" | 230 | thing-at-point-url-path-regexp) |
| 219 | thing-at-point-url-path-regexp) | ||
| 220 | "A regular expression probably matching a complete URL.") | 231 | "A regular expression probably matching a complete URL.") |
| 221 | 232 | ||
| 222 | (defvar thing-at-point-markedup-url-regexp | 233 | (defvar thing-at-point-markedup-url-regexp |