emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/thingatpt.el,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/thingatpt.el,v
Date: Tue, 21 Nov 2006 01:37:31 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       06/11/21 01:37:31

Index: thingatpt.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/thingatpt.el,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- thingatpt.el        13 Sep 2006 17:46:25 -0000      1.37
+++ thingatpt.el        21 Nov 2006 01:37:30 -0000      1.38
@@ -214,15 +214,18 @@
 ``thing-at-point-url-regexp''.")
 
 (defvar thing-at-point-uri-schemes
-  ;; Officials from http://www.iana.org/assignments/uri-schemes
+  ;; Officials from http://www.iana.org/assignments/uri-schemes.html
   '("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:"
+    "crid:" "dict:" "dns:" "dtn:" "h323:" "im:" "info:" "ipp:"
+    "iris.beep:" "mtqp:" "mupdate:" "pres:" "sips:" "snmp:" "tag:"
+    "tftp:" "xmlrpc.beep:" "xmlrpc.beeps:" "xmpp:"
   ;; Compatibility
-    "snews:";)
+    "snews:"; "irc:" "mms://" "mmsh://")
   "Uniform Resource Identifier (URI) Schemes.")
 
 (defvar thing-at-point-url-regexp
@@ -275,7 +278,10 @@
          ;; strip whitespace
          (while (string-match "[ \t\n\r]+" url)
            (setq url (replace-match "" t t url)))
-         (and short (setq url (concat (cond ((string-match "@" url)
+         (and short (setq url (concat (cond ((string-match "^[a-zA-Z]+:" url)
+                                              ;; already has a URL scheme.
+                                              "")
+                                            ((string-match "@" url)
                                               "mailto:";)
                                             ;; e.g. ftp.swiss... or 
ftp-swiss...
                                              ((string-match "^ftp" url)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]