emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8e6d6da: Allow `C-u M-x dig' to ask for a query type


From: Lars Ingebrigtsen
Subject: master 8e6d6da: Allow `C-u M-x dig' to ask for a query type
Date: Thu, 24 Jun 2021 12:51:46 -0400 (EDT)

branch: master
commit 8e6d6daacf3994a68f81b92ae2ce47ccf2a7bf28
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Allow `C-u M-x dig' to ask for a query type
    
    * lisp/net/dig.el (dig): Allow prompting for a query type
    (bug#31810).
---
 etc/NEWS        |  3 +++
 lisp/net/dig.el | 11 ++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 10f260a..0001758 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2134,6 +2134,9 @@ summaries will include the failing condition.
 
 ** Miscellaneous
 
+---
+*** `C-x M-x dig' will now prompt for a query type to use.
+
 +++
 *** rcirc now supports SASL authentication.
 
diff --git a/lisp/net/dig.el b/lisp/net/dig.el
index ddbfb95..4f0b0df 100644
--- a/lisp/net/dig.el
+++ b/lisp/net/dig.el
@@ -138,9 +138,14 @@ Buffer should contain output generated by `dig-invoke'."
 ;;;###autoload
 (defun dig (domain &optional
                   query-type query-class query-option dig-option server)
-  "Query addresses of a DOMAIN using dig, by calling `dig-invoke'.
-Optional arguments are passed to `dig-invoke'."
-  (interactive "sHost: ")
+  "Query addresses of a DOMAIN using dig.
+See `dig-invoke' for an explanation for the parameters.
+When called interactively, DOMAIN is prompted for.  If given a prefix,
+also prompt for the QUERY-TYPE parameter."
+  (interactive
+   (list (read-string "Host: ")
+         (and current-prefix-arg
+              (read-string "Query type: "))))
   (pop-to-buffer-same-window
    (dig-invoke domain query-type query-class query-option dig-option server))
   (goto-char (point-min))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]