Function: url-gateway-nslookup-host
url-gateway-nslookup-host is an autoloaded, interactive and
byte-compiled function defined in url-gw.el.gz.
Signature
(url-gateway-nslookup-host HOST)
Documentation
Attempt to resolve the given HOST using nslookup if possible.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-gw.el.gz
;; Stolen from ange-ftp
;;;###autoload
(defun url-gateway-nslookup-host (host)
"Attempt to resolve the given HOST using nslookup if possible."
(interactive "sHost: ")
(if url-gateway-nslookup-program
(let ((proc (start-process " *nslookup*" " *nslookup*"
url-gateway-nslookup-program host))
(res host))
(set-process-query-on-exit-flag proc nil)
(with-current-buffer (process-buffer proc)
(while (memq (process-status proc) '(run open))
(accept-process-output proc))
(goto-char (point-min))
(if (re-search-forward "Name:.*\nAddress: *\\(.*\\)$" nil t)
(setq res (buffer-substring (match-beginning 1)
(match-end 1))))
(kill-buffer (current-buffer)))
res)
host))