]> code.delx.au - gnu-emacs/blobdiff - lisp/net/net-utils.el
Merge from emacs-23; up to 2010-06-16T23:27:20Z!jay.p.belanger@gmail.com.
[gnu-emacs] / lisp / net / net-utils.el
index 60829f300b5de89b2989e7cdf6e8f4c0d3f80e33..d75b36051f08d5073cac695163594386ebc6c84c 100644 (file)
@@ -1,7 +1,6 @@
 ;;; net-utils.el --- network functions
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1998-2011  Free Software Foundation, Inc.
 
 ;; Author:  Peter Breton <pbreton@cs.umb.edu>
 ;; Created: Sun Mar 16 1997
@@ -491,6 +490,11 @@ If your system's ping continues until interrupted, you can try setting
 
 (autoload 'comint-mode "comint" nil t)
 
+(defvar nslookup-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\t" 'comint-dynamic-complete)
+    map))
+
 ;; Using a derived mode gives us keymaps, hooks, etc.
 (define-derived-mode nslookup-mode comint-mode "Nslookup"
   "Major mode for interacting with the nslookup program."
@@ -500,8 +504,6 @@ If your system's ping continues until interrupted, you can try setting
   (setq comint-prompt-regexp nslookup-prompt-regexp)
   (setq comint-input-autoexpand t))
 
-(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)."
@@ -557,6 +559,12 @@ If your system's ping continues until interrupted, you can try setting
                   (list host)))
     (pop-to-buffer buf)))
 
+(defvar ftp-mode-map
+  (let ((map (make-sparse-keymap)))
+    ;; Occasionally useful
+    (define-key map "\t" 'comint-dynamic-complete)
+    map))
+
 (define-derived-mode ftp-mode comint-mode "FTP"
   "Major mode for interacting with the ftp program."
   (setq comint-prompt-regexp ftp-prompt-regexp)
@@ -572,9 +580,6 @@ If your system's ping continues until interrupted, you can try setting
     (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt
              nil t)))
 
-;; Occasionally useful
-(define-key ftp-mode-map "\t" 'comint-dynamic-complete)
-
 (defun smbclient (host service)
   "Connect to SERVICE on HOST via SMB."
   (interactive