aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorDan Nicolaescu2010-10-10 16:12:30 -0700
committerDan Nicolaescu2010-10-10 16:12:30 -0700
commita0310a6c2226b23bc25c2dd66c8dd9664fdeb022 (patch)
tree31c8181c70d9f9a3d0532f128b38a0fcb62f9d8c /lisp/progmodes
parentdab0271f8dfd284e0ecd5022745a67c182410b81 (diff)
downloademacs-a0310a6c2226b23bc25c2dd66c8dd9664fdeb022.tar.gz
emacs-a0310a6c2226b23bc25c2dd66c8dd9664fdeb022.zip
Declare and define in one step various mode maps.
* lisp/shell.el (shell-mode-map): * lisp/progmodes/modula2.el (m2-mode-map): * lisp/progmodes/inf-lisp.el (inferior-lisp-mode-map): * lisp/play/mpuz.el (mpuz-mode-map): * lisp/play/landmark.el (lm-mode-map): * lisp/play/decipher.el (decipher-mode-map): * lisp/play/5x5.el (5x5-mode-map): * lisp/net/telnet.el (telnet-mode-map): * lisp/net/quickurl.el (quickurl-list-mode-map): * lisp/net/mairix.el (mairix-searches-mode-map): * lisp/net/eudc-hotlist.el (eudc-hotlist-mode-map): * lisp/net/dig.el (dig-mode-map): * lisp/mail/mspools.el (mspools-mode-map): * lisp/hexl.el (hexl-mode-map): * lisp/emulation/ws-mode.el (wordstar-C-k-map, wordstar-mode-map) (wordstar-C-o-map, wordstar-C-q-map): * lisp/emacs-lisp/edebug.el (edebug-eval-mode-map): * lisp/emacs-lisp/chart.el (chart-map): * lisp/edmacro.el (edmacro-mode-map): * lisp/array.el (array-mode-map): Declare and define in one step. * lisp/erc/erc-list.el (erc-list-menu-mode-map): Declare and define in one step.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/inf-lisp.el24
-rw-r--r--lisp/progmodes/modula2.el8
2 files changed, 14 insertions, 18 deletions
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index ee5e2a49ead..41ce378e966 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -80,19 +80,17 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
80 :type 'regexp 80 :type 'regexp
81 :group 'inferior-lisp) 81 :group 'inferior-lisp)
82 82
83(defvar inferior-lisp-mode-map nil) 83(defvar inferior-lisp-mode-map
84(unless inferior-lisp-mode-map 84 (let ((map (copy-keymap comint-mode-map)))
85 (setq inferior-lisp-mode-map (copy-keymap comint-mode-map)) 85 (set-keymap-parent map lisp-mode-shared-map)
86 (set-keymap-parent inferior-lisp-mode-map lisp-mode-shared-map) 86 (define-key map "\C-x\C-e" 'lisp-eval-last-sexp)
87 (define-key inferior-lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) 87 (define-key map "\C-c\C-l" 'lisp-load-file)
88 (define-key inferior-lisp-mode-map "\C-c\C-l" 'lisp-load-file) 88 (define-key map "\C-c\C-k" 'lisp-compile-file)
89 (define-key inferior-lisp-mode-map "\C-c\C-k" 'lisp-compile-file) 89 (define-key map "\C-c\C-a" 'lisp-show-arglist)
90 (define-key inferior-lisp-mode-map "\C-c\C-a" 'lisp-show-arglist) 90 (define-key map "\C-c\C-d" 'lisp-describe-sym)
91 (define-key inferior-lisp-mode-map "\C-c\C-d" 'lisp-describe-sym) 91 (define-key map "\C-c\C-f" 'lisp-show-function-documentation)
92 (define-key inferior-lisp-mode-map "\C-c\C-f" 92 (define-key map "\C-c\C-v" 'lisp-show-variable-documentation)
93 'lisp-show-function-documentation) 93 map))
94 (define-key inferior-lisp-mode-map "\C-c\C-v"
95 'lisp-show-variable-documentation))
96 94
97;;; These commands augment Lisp mode, so you can process Lisp code in 95;;; These commands augment Lisp mode, so you can process Lisp code in
98;;; the source files. 96;;; the source files.
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index 9d226cefbd4..3d2af5e217e 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -69,10 +69,7 @@
69 (setq m2-mode-syntax-table table))) 69 (setq m2-mode-syntax-table table)))
70 70
71;;; Added by TEP 71;;; Added by TEP
72(defvar m2-mode-map nil 72(defvar m2-mode-map
73 "Keymap used in Modula-2 mode.")
74
75(if m2-mode-map ()
76 (let ((map (make-sparse-keymap))) 73 (let ((map (make-sparse-keymap)))
77 (define-key map "\^i" 'm2-tab) 74 (define-key map "\^i" 'm2-tab)
78 (define-key map "\C-cb" 'm2-begin) 75 (define-key map "\C-cb" 'm2-begin)
@@ -103,7 +100,8 @@
103 (define-key map "\C-c\C-t" 'm2-toggle) 100 (define-key map "\C-c\C-t" 'm2-toggle)
104 (define-key map "\C-c\C-l" 'm2-link) 101 (define-key map "\C-c\C-l" 'm2-link)
105 (define-key map "\C-c\C-c" 'm2-compile) 102 (define-key map "\C-c\C-c" 'm2-compile)
106 (setq m2-mode-map map))) 103 map)
104 "Keymap used in Modula-2 mode.")
107 105
108(defcustom m2-indent 5 106(defcustom m2-indent 5
109 "*This variable gives the indentation in Modula-2-Mode." 107 "*This variable gives the indentation in Modula-2-Mode."