diff options
| author | Richard M. Stallman | 2006-11-21 01:38:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-11-21 01:38:04 +0000 |
| commit | 4f5d46685d2a8ec44b9a3bba09c096735a86d3b5 (patch) | |
| tree | dc078e7b0d5eeacec0da0a8daf75a5bee1554c14 | |
| parent | 994a72627ca3a63532fbb6ac50efc38d92bec508 (diff) | |
| download | emacs-4f5d46685d2a8ec44b9a3bba09c096735a86d3b5.tar.gz emacs-4f5d46685d2a8ec44b9a3bba09c096735a86d3b5.zip | |
(thing-at-point-url-at-point): Don't add a redundant scheme.
(thing-at-point-uri-schemes): Added schemes that
are new to the list at IANA. Also added irc, mms, mmsh.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/thingatpt.el | 12 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc028549c75..6c6f513998b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2006-11-20 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> (tiny change) | ||
| 2 | |||
| 3 | * thingatpt.el (thing-at-point-url-at-point): Don't add a | ||
| 4 | redundant scheme. | ||
| 5 | |||
| 6 | 2006-11-20 Diane Murray <disumu@x3y2z1.net> (tiny change) | ||
| 7 | |||
| 8 | * thingatpt.el (thing-at-point-uri-schemes): Added schemes that | ||
| 9 | are new to the list at IANA. Also added irc, mms, mmsh. | ||
| 10 | |||
| 1 | 2006-11-20 J.D. Smith <jdsmith@as.arizona.edu> | 11 | 2006-11-20 J.D. Smith <jdsmith@as.arizona.edu> |
| 2 | 12 | ||
| 3 | * progmodes/idlw-help.el (idlwave-html-help-location): Fail | 13 | * progmodes/idlw-help.el (idlwave-html-help-location): Fail |
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index e2618bca8fd..ee58fffce34 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el | |||
| @@ -214,15 +214,18 @@ 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 | 216 | (defvar thing-at-point-uri-schemes |
| 217 | ;; Officials from http://www.iana.org/assignments/uri-schemes | 217 | ;; Officials from http://www.iana.org/assignments/uri-schemes.html |
| 218 | '("ftp://" "http://" "gopher://" "mailto:" "news:" "nntp:" | 218 | '("ftp://" "http://" "gopher://" "mailto:" "news:" "nntp:" |
| 219 | "telnet://" "wais://" "file:/" "prospero:" "z39.50s:" "z39.50r:" | 219 | "telnet://" "wais://" "file:/" "prospero:" "z39.50s:" "z39.50r:" |
| 220 | "cid:" "mid:" "vemmi:" "service:" "imap:" "nfs:" "acap:" "rtsp:" | 220 | "cid:" "mid:" "vemmi:" "service:" "imap:" "nfs:" "acap:" "rtsp:" |
| 221 | "tip:" "pop:" "data:" "dav:" "opaquelocktoken:" "sip:" "tel:" "fax:" | 221 | "tip:" "pop:" "data:" "dav:" "opaquelocktoken:" "sip:" "tel:" "fax:" |
| 222 | "modem:" "ldap:" "https://" "soap.beep:" "soap.beeps:" "urn:" "go:" | 222 | "modem:" "ldap:" "https://" "soap.beep:" "soap.beeps:" "urn:" "go:" |
| 223 | "afs:" "tn3270:" "mailserver:" | 223 | "afs:" "tn3270:" "mailserver:" |
| 224 | "crid:" "dict:" "dns:" "dtn:" "h323:" "im:" "info:" "ipp:" | ||
| 225 | "iris.beep:" "mtqp:" "mupdate:" "pres:" "sips:" "snmp:" "tag:" | ||
| 226 | "tftp:" "xmlrpc.beep:" "xmlrpc.beeps:" "xmpp:" | ||
| 224 | ;; Compatibility | 227 | ;; Compatibility |
| 225 | "snews:") | 228 | "snews:" "irc:" "mms://" "mmsh://") |
| 226 | "Uniform Resource Identifier (URI) Schemes.") | 229 | "Uniform Resource Identifier (URI) Schemes.") |
| 227 | 230 | ||
| 228 | (defvar thing-at-point-url-regexp | 231 | (defvar thing-at-point-url-regexp |
| @@ -275,7 +278,10 @@ starts with \"ftp\" and not \"ftp:/\", or \"http://\" by default." | |||
| 275 | ;; strip whitespace | 278 | ;; strip whitespace |
| 276 | (while (string-match "[ \t\n\r]+" url) | 279 | (while (string-match "[ \t\n\r]+" url) |
| 277 | (setq url (replace-match "" t t url))) | 280 | (setq url (replace-match "" t t url))) |
| 278 | (and short (setq url (concat (cond ((string-match "@" url) | 281 | (and short (setq url (concat (cond ((string-match "^[a-zA-Z]+:" url) |
| 282 | ;; already has a URL scheme. | ||
| 283 | "") | ||
| 284 | ((string-match "@" url) | ||
| 279 | "mailto:") | 285 | "mailto:") |
| 280 | ;; e.g. ftp.swiss... or ftp-swiss... | 286 | ;; e.g. ftp.swiss... or ftp-swiss... |
| 281 | ((string-match "^ftp" url) | 287 | ((string-match "^ftp" url) |