]> git.eshelyaron.com Git - emacs.git/commitdiff
`url-domain' doc clarification
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 1 May 2018 12:29:11 +0000 (14:29 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 1 May 2018 12:29:11 +0000 (14:29 +0200)
* lisp/url/url-util.el (url-domain): Add an example to the doc
string.

lisp/url/url-util.el

index 9bfbca65d9a57304b647208e219af4a84cdb787a..ffae984941e16f8fb90616074cd92bcbbe0038d6 100644 (file)
@@ -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))