From b016851cb127f91a7ffa5d8295e5f3d4fdd3222a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 10 Feb 2011 11:56:00 -0500 Subject: Move keymap initialization into declaration. * lisp/textmodes/enriched.el (enriched-mode-map): * lisp/textmodes/bib-mode.el (bib-mode-map): * lisp/term/lk201.el (lk201-function-map): * lisp/tar-mode.el (tar-mode-map): * lisp/replace.el (occur-mode-map): * lisp/progmodes/idlwave.el (idlwave-rinfo-mouse-map, idlwave-rinfo-map): * lisp/progmodes/idlw-help.el (idlwave-help-mode-map): * lisp/progmodes/gdb-mi.el (gdb-memory-format-menu, gdb-memory-unit-menu): * lisp/play/solitaire.el (solitaire-mode-map): * lisp/play/snake.el (snake-mode-map, snake-null-map): * lisp/play/pong.el (pong-mode-map): * lisp/play/handwrite.el (menu-bar-handwrite-map): * lisp/play/gametree.el (gametree-mode-map): * lisp/net/rcirc.el (rcirc-mode-map, rcirc-browse-url-map (rcirc-multiline-minor-mode-map, rcirc-track-minor-mode-map): * lisp/net/newst-plainview.el (newsticker-menu, newsticker-mode-map) (newsticker--url-keymap): * lisp/net/net-utils.el (nslookup-mode-map, ftp-mode-map): * lisp/menu-bar.el (menu-bar-file-menu, menu-bar-i-search-menu) (menu-bar-search-menu, menu-bar-replace-menu, menu-bar-goto-menu) (menu-bar-edit-menu, menu-bar-custom-menu) (menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu) (menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu) (menu-bar-line-wrapping-menu, menu-bar-options-menu) (menu-bar-games-menu, menu-bar-encryption-decryption-menu) (menu-bar-tools-menu, menu-bar-describe-menu) (menu-bar-search-documentation-menu, menu-bar-manuals-menu) (menu-bar-help-menu): * lisp/mail/rmailsum.el (rmail-summary-mode-map): * lisp/kmacro.el (kmacro-step-edit-map): * lisp/ibuffer.el (ibuffer-mode-groups-popup, ibuffer-mode-map) (ibuffer-mode-operate-map): * lisp/hi-lock.el (hi-lock-menu, hi-lock-map): * lisp/emulation/vip.el (vip-mode-map): * lisp/emacs-lisp/re-builder.el (reb-lisp-mode-map): * lisp/bookmark.el (bookmark-bmenu-mode-map): * lisp/help-mode.el (help-mode-map): * lisp/erc/erc-list.el (erc-list-menu-mode-map): * lisp/org/org-remember.el (org-remember-mode-map): * lisp/org/org-src.el (org-src-mode-map): Move initialization into declaration. --- lisp/net/net-utils.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lisp/net/net-utils.el') diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 3c4588780a2..d75b36051f0 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -490,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." @@ -499,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)." @@ -556,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) @@ -571,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 -- cgit v1.2.3