diff options
author | Lars Brinkhoff <lars@nocrew.org> | 2017-03-21 20:48:52 +0100 |
---|---|---|
committer | Lars Brinkhoff <lars@nocrew.org> | 2017-04-04 08:23:46 +0200 |
commit | b6738682ae16c71132c95cd87d48daf598fe89a9 (patch) | |
tree | 114230b8a5c52886be1741e7e2062b7def9cba61 | |
parent | 8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0 (diff) | |
download | emacs-b6738682ae16c71132c95cd87d48daf598fe89a9.tar.gz |
Make the URL library use records.
* lisp/url/url.el, lisp/url/url-cache.el, lisp/url/url-dav.el,
lisp/url/url-expand.el, lisp/url/url-file.el, lisp/url/url-imap.el,
lisp/url/url-ldap.el: Use `url-p' instead of `vectorp'.
* lisp/url/url-http.el (url-http): Check for type `url' instead of
`vector'.
-rw-r--r-- | lisp/url/url-cache.el | 2 | ||||
-rw-r--r-- | lisp/url/url-dav.el | 4 | ||||
-rw-r--r-- | lisp/url/url-expand.el | 2 | ||||
-rw-r--r-- | lisp/url/url-file.el | 2 | ||||
-rw-r--r-- | lisp/url/url-http.el | 2 | ||||
-rw-r--r-- | lisp/url/url-imap.el | 2 | ||||
-rw-r--r-- | lisp/url/url-ldap.el | 4 | ||||
-rw-r--r-- | lisp/url/url.el | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index 192bbb2481f..a7247dfe10a 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el @@ -184,7 +184,7 @@ Very fast if you have an `md5' primitive function, suitably fast otherwise." ;; if it has been specified: e.g. http://www.example.com:80 will ;; be transcoded as http://www.example.com (url-recreate-url - (if (vectorp url) url + (if (url-p url) url (url-generic-parse-url url))))) ;;;###autoload diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index f47bc5da3e4..59b836ca6d1 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -518,7 +518,7 @@ FAILURE-RESULTS is a list of (URL STATUS)." depth '(("Timeout" . "Infinite")))) ;; Get the parent URL ready for expand-file-name - (if (not (vectorp url)) + (if (not (url-p url)) (setq url (url-generic-parse-url url))) ;; Walk thru the response list, fully expand the URL, and grab the @@ -540,7 +540,7 @@ FAILURE-RESULTS is a list of (URL STATUS)." (child-url nil) (child-results nil) (results nil)) - (if (not (vectorp url)) + (if (not (url-p url)) (setq url (url-generic-parse-url url))) (while response diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el index cc9341bdf5f..9ceaa025fb3 100644 --- a/lisp/url/url-expand.el +++ b/lisp/url/url-expand.el @@ -73,7 +73,7 @@ path components followed by `..' are removed, along with the `..' itself." ;; Need to figure out how/where to expand the fragment relative to (setq default (cond - ((vectorp default) + ((url-p default) ;; Default URL has already been parsed default) (default diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 8e63a9073e3..1dda1d3325d 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -89,7 +89,7 @@ to them." keep-date &optional msg cont nowait)) (defun url-file-build-filename (url) - (if (not (vectorp url)) + (if (not (url-p url)) (setq url (url-generic-parse-url url))) (let* ((user (url-user url)) (pass (url-password url)) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 90f2e59cc5b..06d32861b2e 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1243,7 +1243,7 @@ Optional arg GATEWAY-METHOD specifies the gateway to be used, overriding the value of `url-gateway-method'. The return value of this function is the retrieval buffer." - (cl-check-type url vector "Need a pre-parsed URL.") + (cl-check-type url url "Need a pre-parsed URL.") (let* (;; (host (url-host (or url-using-proxy url))) ;; (port (url-port (or url-using-proxy url))) (nsm-noninteractive (or url-request-noninteractive diff --git a/lisp/url/url-imap.el b/lisp/url/url-imap.el index 1195a344c90..b8fe4ed5ff7 100644 --- a/lisp/url/url-imap.el +++ b/lisp/url/url-imap.el @@ -50,7 +50,7 @@ (nnimap-authenticator ,authenticator))))) (defun url-imap (url) - (unless (vectorp url) + (unless (url-p url) (signal 'wrong-type-error (list "Need a pre-parsed URL." url))) (with-current-buffer (generate-new-buffer " *url-imap*") (mm-disable-multibyte) diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el index 8f5f6f55d0a..d9a18e554fa 100644 --- a/lisp/url/url-ldap.el +++ b/lisp/url/url-ldap.el @@ -115,11 +115,11 @@ (defun url-ldap (url) "Perform an LDAP search specified by URL. The return value is a buffer displaying the search results in HTML. -URL can be a URL string, or a URL vector of the type returned by +URL can be a URL string, or a URL record of the type returned by `url-generic-parse-url'." (if (stringp url) (setq url (url-generic-parse-url (url-unhex-string url))) - (if (not (vectorp url)) + (if (not (url-p url)) (error "Argument is not a valid URL"))) (with-current-buffer (generate-new-buffer " *url-ldap*") (setq url-current-object url) diff --git a/lisp/url/url.el b/lisp/url/url.el index 2eec1c44def..75cf77deaa4 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -186,7 +186,7 @@ URL-encoded before it's used." (when (stringp url) (set-text-properties 0 (length url) nil url) (setq url (url-encode-url url))) - (if (not (vectorp url)) + (if (not (url-p url)) (setq url (url-generic-parse-url url))) (if (not (functionp callback)) (error "Must provide a callback function to url-retrieve")) |