From 8e6d6daacf3994a68f81b92ae2ce47ccf2a7bf28 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 24 Jun 2021 18:51:38 +0200 Subject: [PATCH] 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 10f260a515e..0001758b141 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 ddbfb9598b8..4f0b0df2b73 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)) -- 2.39.2