diff options
| author | Lars Ingebrigtsen | 2018-05-01 14:29:11 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-05-01 14:29:11 +0200 |
| commit | b3b4697ff8b9093cef2cc3842dab731f37c9e2e1 (patch) | |
| tree | dafda7ba6d3a6d959095becc6d63cc39133cd45c | |
| parent | e859acb11cacd0c661b730d43151f77281e17d7d (diff) | |
| download | emacs-b3b4697ff8b9093cef2cc3842dab731f37c9e2e1.tar.gz emacs-b3b4697ff8b9093cef2cc3842dab731f37c9e2e1.zip | |
`url-domain' doc clarification
* lisp/url/url-util.el (url-domain): Add an example to the doc
string.
| -rw-r--r-- | lisp/url/url-util.el | 7 |
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." | |||
| 632 | 632 | ||
| 633 | ;;;###autoload | 633 | ;;;###autoload |
| 634 | (defun url-domain (url) | 634 | (defun url-domain (url) |
| 635 | "Return the domain of the host of the url. | 635 | "Return the domain of the host of the URL. |
| 636 | Return nil if this can't be determined." | 636 | Return nil if this can't be determined. |
| 637 | |||
| 638 | For instance, this function will return \"fsf.co.uk\" if the host in URL | ||
| 639 | is \"www.fsf.co.uk\"." | ||
| 637 | (let* ((host (puny-encode-domain (url-host url))) | 640 | (let* ((host (puny-encode-domain (url-host url))) |
| 638 | (parts (nreverse (split-string host "\\."))) | 641 | (parts (nreverse (split-string host "\\."))) |
| 639 | (candidate (pop parts)) | 642 | (candidate (pop parts)) |