summaryrefslogtreecommitdiff
path: root/lisp/url/url-util.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2018-05-01 14:29:11 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2018-05-01 14:29:11 +0200
commitb3b4697ff8b9093cef2cc3842dab731f37c9e2e1 (patch)
treedafda7ba6d3a6d959095becc6d63cc39133cd45c /lisp/url/url-util.el
parente859acb11cacd0c661b730d43151f77281e17d7d (diff)
downloademacs-b3b4697ff8b9093cef2cc3842dab731f37c9e2e1.tar.gz
`url-domain' doc clarification
* lisp/url/url-util.el (url-domain): Add an example to the doc string.
Diffstat (limited to 'lisp/url/url-util.el')
-rw-r--r--lisp/url/url-util.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 9bfbca65d9a..ffae984941e 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -632,8 +632,11 @@ Creates FILE and its parent directories if they do not exist."
;;;###autoload
(defun url-domain (url)
- "Return the domain of the host of the url.
-Return nil if this can't be determined."
+ "Return the domain of the host of the URL.
+Return nil if this can't be determined.
+
+For instance, this function will return \"fsf.co.uk\" if the host in URL
+is \"www.fsf.co.uk\"."
(let* ((host (puny-encode-domain (url-host url)))
(parts (nreverse (split-string host "\\.")))
(candidate (pop parts))