summaryrefslogtreecommitdiff
path: root/lisp/net/net-utils.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-07-07 12:05:35 +0200
committerStefan Kangas <stefan@marxist.se>2022-07-07 12:17:29 +0200
commita40a4d3a0964f0428033744f77b67376700e963f (patch)
treea01589c190098f60445bc41d9681073e4462c412 /lisp/net/net-utils.el
parent707124d2b92780b4f21d72c7c62899e074fa8ced (diff)
downloademacs-a40a4d3a0964f0428033744f77b67376700e963f.tar.gz
Mark comint modes in net-utils.el as non-interactive
* lisp/net/net-utils.el (net-utils-mode, nslookup-mode, ftp-mode) (smbclient-mode, network-connection-mode): Mark as non-interactive. (nslookup-mode-map, ftp-mode-map): Prefer defvar-keymap.
Diffstat (limited to 'lisp/net/net-utils.el')
-rw-r--r--lisp/net/net-utils.el25
1 files changed, 11 insertions, 14 deletions
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index ea1dd0f3ca9..016fdec921a 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -271,6 +271,7 @@ This variable is only used if the variable
(define-derived-mode net-utils-mode special-mode "NetworkUtil"
"Major mode for interacting with an external network utility."
+ :interactive nil
(setq-local font-lock-defaults
'((net-utils-font-lock-keywords)))
(setq-local revert-buffer-function #'net-utils--revert-function))
@@ -580,14 +581,12 @@ This command uses `nslookup-program' to look up DNS records."
(autoload 'comint-mode "comint" nil t)
-(defvar nslookup-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\t" #'completion-at-point)
- map))
+(defvar-keymap nslookup-mode-map
+ "TAB" #'completion-at-point)
-;; 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."
+ :interactive nil
(setq-local font-lock-defaults
'((nslookup-font-lock-keywords)))
(setq comint-prompt-regexp nslookup-prompt-regexp)
@@ -650,14 +649,12 @@ This command uses `dig-program' for looking up the DNS information."
(list host)))
(pop-to-buffer buf)))
-(defvar ftp-mode-map
- (let ((map (make-sparse-keymap)))
- ;; Occasionally useful
- (define-key map "\t" #'completion-at-point)
- map))
+(defvar-keymap ftp-mode-map
+ "TAB" #'completion-at-point)
(define-derived-mode ftp-mode comint-mode "FTP"
"Major mode for interacting with the ftp program."
+ :interactive nil
(setq comint-prompt-regexp ftp-prompt-regexp)
(setq comint-input-autoexpand t)
;; Only add the password-prompting hook if it's not already in the
@@ -707,6 +704,7 @@ This command uses `smbclient-program' to connect to HOST."
(define-derived-mode smbclient-mode comint-mode "smbclient"
"Major mode for interacting with the smbclient program."
+ :interactive nil
(setq comint-prompt-regexp smbclient-prompt-regexp)
(setq comint-input-autoexpand t)
;; Only add the password-prompting hook if it's not already in the
@@ -922,10 +920,9 @@ The port is deduced from `network-connection-service-alist'."
;;; General Network connection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Using a derived mode gives us keymaps, hooks, etc.
-(define-derived-mode
- network-connection-mode comint-mode "Network-Connection"
- "Major mode for interacting with the `network-connection' program.")
+(define-derived-mode network-connection-mode comint-mode "Network-Connection"
+ "Major mode for interacting with the `network-connection' program."
+ :interactive nil)
(defun network-connection-mode-setup (host service)
(setq-local network-connection-host host)