diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-07-31 04:24:49 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-07-31 04:24:49 +0200 |
commit | f7a916a618955d38b1ee08a78b309fb97f5250cc (patch) | |
tree | e37a3a34e1f2ad71dfbe0e8de9efe5ae3b8c7b84 /lisp | |
parent | 50a12de877b752a4830b55beb196a7c3c1b7f715 (diff) | |
download | emacs-f7a916a618955d38b1ee08a78b309fb97f5250cc.tar.gz emacs-f7a916a618955d38b1ee08a78b309fb97f5250cc.tar.bz2 emacs-f7a916a618955d38b1ee08a78b309fb97f5250cc.zip |
Minor dns.el clean up
* lisp/net/dns.el (dns-query-asynchronous, dns-query): Adjust some
parameter names to not end with "p", as these are not predicates.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/net/dns.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/net/dns.el b/lisp/net/dns.el index ef250f067ea..c3c294395cb 100644 --- a/lisp/net/dns.el +++ b/lisp/net/dns.el @@ -374,20 +374,20 @@ Parses \"/etc/resolv.conf\" or calls \"nslookup\"." (set (intern key dns-cache) result) result)))) -(defun dns-query-asynchronous (name callback &optional type fullp reversep) +(defun dns-query-asynchronous (name callback &optional type full reverse) "Query a DNS server for NAME of TYPE. CALLBACK will be called with a single parameter: The result. If there's no result, or `dns-timeout' has passed, CALLBACK will be called with nil as the parameter. -If FULLP, return the entire record. -If REVERSEP, look up an IP address." +If FULL, return the entire record. +If REVERSE, look up an IP address." (setq type (or type 'A)) (unless (dns-servers-up-to-date-p) (dns-set-servers)) - (when reversep + (when reverse (setq name (concat (mapconcat 'identity (nreverse (split-string name "\\.")) ".") ".in-addr.arpa") @@ -397,7 +397,7 @@ If REVERSEP, look up an IP address." (progn (message "No DNS server configuration found") nil) - (dns--lookup name callback type fullp))) + (dns--lookup name callback type full))) (defun dns--lookup (name callback type full) (with-current-buffer (generate-new-buffer " *dns*") @@ -495,16 +495,16 @@ If REVERSEP, look up an IP address." (dns-get-txt-answer (dns-get 'answers result)) (dns-get 'data answer)))))))))) -(defun dns-query (name &optional type fullp reversep) +(defun dns-query (name &optional type full reverse) "Query a DNS server for NAME of TYPE. -If FULLP, return the entire record returned. -If REVERSEP, look up an IP address." +If FULL, return the entire record returned. +If REVERSE, look up an IP address." (let ((result nil)) (dns-query-asynchronous name (lambda (response) (setq result (list response))) - type fullp reversep) + type full reverse) ;; Loop until we get the callback. (while (not result) (sleep-for 0.01)) |