emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/net/net-utils.el


From: Peter Breton
Subject: [Emacs-diffs] Changes to emacs/lisp/net/net-utils.el
Date: Sun, 23 Mar 2003 08:36:32 -0500

Index: emacs/lisp/net/net-utils.el
diff -c emacs/lisp/net/net-utils.el:1.13 emacs/lisp/net/net-utils.el:1.14
*** emacs/lisp/net/net-utils.el:1.13    Sun Jan  6 10:08:58 2002
--- emacs/lisp/net/net-utils.el Sun Mar 23 08:36:32 2003
***************
*** 205,210 ****
--- 205,222 ----
    :group 'net-utils
    :type  'regexp)
  
+ (defcustom dns-lookup-program  "host"
+   "Program to interactively query DNS information."
+   :group 'net-utils
+   :type  'string
+   )
+ 
+ (defcustom dns-lookup-program-options  nil
+   "List of options to pass to the dns-lookup program."
+   :group 'net-utils
+   :type  '(repeat string)
+   )
+ 
  ;; Internal variables
  (defvar network-connection-service nil)
  (defvar network-connection-host    nil)
***************
*** 429,434 ****
--- 441,465 ----
  (define-key nslookup-mode-map "\t" 'comint-dynamic-complete)
  
  ;;;###autoload
+ (defun dns-lookup-host (host)
+   "Lookup the DNS information for HOST (name or IP address)."
+   (interactive
+    (list (read-from-minibuffer "Lookup host: " (net-utils-machine-at-point))))
+   (let ((options
+        (if dns-lookup-program-options
+            (append dns-lookup-program-options (list host))
+          (list host))))
+     (net-utils-run-program
+      (concat "DNS Lookup [" host "]")
+      (concat "** "
+       (mapconcat 'identity
+               (list "DNS Lookup" host dns-lookup-program)
+               " ** "))
+      dns-lookup-program
+      options
+      )))
+ 
+ ;;;###autoload
  (defun dig (host)
    "Run dig program."
    (interactive
***************
*** 622,631 ****
         (process-name (concat "Finger [" user-and-host "]"))
         (regexps finger-X.500-host-regexps)
         found)
!     (while (and regexps (not (string-match (car regexps) host)))
!       (setq regexps (cdr regexps)))
!     (when regexps
!       (setq user-and-host user))
      (run-network-program
       process-name
       host
--- 653,663 ----
         (process-name (concat "Finger [" user-and-host "]"))
         (regexps finger-X.500-host-regexps)
         found)
!     (and regexps
!        (while (not (string-match (car regexps) host))
!          (setq regexps (cdr regexps)))
!        (when regexps
!          (setq user-and-host user)))
      (run-network-program
       process-name
       host




reply via email to

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