|
From: | npostavs |
Subject: | bug#25426: [PATCH] in net-utils.el several DNS query functions now take optional name server argument; also, `dig-program-options' added |
Date: | Sat, 06 May 2017 08:04:01 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Andrew Robbins <contact@andrewrobbins.info> 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.
[Prev in Thread] | Current Thread | [Next in Thread] |