[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/record b262ec8 4/5: Make the URL library use recor
From: |
Lars Brinkhoff |
Subject: |
[Emacs-diffs] scratch/record b262ec8 4/5: Make the URL library use records. |
Date: |
Tue, 28 Mar 2017 15:26:16 -0400 (EDT) |
branch: scratch/record
commit b262ec8db34a0191a8861661bac8cd207766d035
Author: Lars Brinkhoff <address@hidden>
Commit: Lars Brinkhoff <address@hidden>
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'.
---
lisp/url/url-cache.el | 2 +-
lisp/url/url-dav.el | 4 ++--
lisp/url/url-expand.el | 2 +-
lisp/url/url-file.el | 2 +-
lisp/url/url-http.el | 2 +-
lisp/url/url-imap.el | 2 +-
lisp/url/url-ldap.el | 4 ++--
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 192bbb2..a7247df 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 f47bc5d..59b836c 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 cc9341b..a10a09a 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)
+ ((recordp default)
;; Default URL has already been parsed
default)
(default
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index 8e63a90..1dda1d3 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 90f2e59..06d3286 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 1195a34..b8fe4ed 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 8f5f6f5..d9a18e5 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 2eec1c4..75cf77d 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"))