Subject: Re: bug#25426: [PATCH] in net-utils.el several DNS query functions now take optional name server argument; also, `dig-program-options' added

From: [email-masked]
Date: Sat, 06 May 2017 08:04:01 -0400

Andrew Robbins <[email-masked]> writes:

> -   (list (read-from-minibuffer "Lookup host: " (net-utils-machine-at-point))))
> +   (if current-prefix-arg
> +       (list
> +        (read-from-minibuffer "Look up host: " (net-utils-machine-at-point))
> +        (read-from-minibuffer "Name server: "))
> +     (list
> +      (read-from-minibuffer "Look up host: " (net-utils-machine-at-point)))))

You could avoid repeating the "Look up host" code like this:

    (list (read-from-minibuffer "Look up host: " (net-utils-machine-at-point))
          (if current-prefix-arg (read-from-minibuffer "Name server: ")))

> -	 (if nslookup-program-options
> -	     (append nslookup-program-options (list host))
> -	   (list host))))
> +	 (if name-server
> +	     (append nslookup-program-options (list host name-server))
> +	   (append nslookup-program-options (list host)))))

Similarly

    (append nslookup-program-options (list host)
            (if name-sever (list name-server)))

> -      (mapconcat 'identity
> -		(list "Nslookup" host nslookup-program)
> -		" ** "))
> +	     (mapconcat 'identity
> +		        (list "Nslookup" host nslookup-program)
> +		        " ** "))

This is just a whitespace change, right?

Same comments again for dns-lookup-host and run-dig changes.