summaryrefslogtreecommitdiff
path: root/lisp/url/url-parse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/url/url-parse.el')
-rw-r--r--lisp/url/url-parse.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 644428d19cd..1628290a358 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -39,13 +39,14 @@
silent (use-cookies t))
(defsubst url-port (urlobj)
- "Return the port number for the URL specified by URLOBJ."
+ "Return the port number for the URL specified by URLOBJ.
+If the port spec is nil (i.e. URLOBJ specifies no port number),
+return the default port number for URLOBJ's scheme."
(declare (gv-setter (lambda (port) `(setf (url-portspec ,urlobj) ,port))))
(or (url-portspec urlobj)
(if (url-type urlobj)
(url-scheme-get-property (url-type urlobj) 'default-port))))
-
(defun url-path-and-query (urlobj)
"Return the path and query components of URLOBJ.
These two components are stored together in the FILENAME slot of