summaryrefslogtreecommitdiff
path: root/lisp/net/dig.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/dig.el')
-rw-r--r--lisp/net/dig.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/net/dig.el b/lisp/net/dig.el
index 9392c73855b..d36247a1d1f 100644
--- a/lisp/net/dig.el
+++ b/lisp/net/dig.el
@@ -129,12 +129,11 @@ Buffer should contain output generated by `dig-invoke'."
(put 'dig-mode 'mode-class 'special)
-(defvar dig-mode-map nil)
-(unless dig-mode-map
- (setq dig-mode-map (make-sparse-keymap))
- (suppress-keymap dig-mode-map)
-
- (define-key dig-mode-map "q" 'dig-exit))
+(defvar dig-mode-map
+ (let ((map (make-sparse-keymap)))
+ (suppress-keymap map)
+ (define-key map "q" 'dig-exit)
+ map))
(define-derived-mode dig-mode nil "Dig"
"Major mode for displaying dig output."