diff options
| author | Dan Nicolaescu | 2010-10-10 16:12:30 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-10-10 16:12:30 -0700 |
| commit | a0310a6c2226b23bc25c2dd66c8dd9664fdeb022 (patch) | |
| tree | 31c8181c70d9f9a3d0532f128b38a0fcb62f9d8c /lisp/shell.el | |
| parent | dab0271f8dfd284e0ecd5022745a67c182410b81 (diff) | |
| download | emacs-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/shell.el')
| -rw-r--r-- | lisp/shell.el | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 23b7f7d8498..6cb9a511101 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -334,26 +334,25 @@ Thus, this does not include the shell's current directory.") | |||
| 334 | (defvar shell-dirstack-query nil | 334 | (defvar shell-dirstack-query nil |
| 335 | "Command used by `shell-resync-dirs' to query the shell.") | 335 | "Command used by `shell-resync-dirs' to query the shell.") |
| 336 | 336 | ||
| 337 | (defvar shell-mode-map nil) | 337 | (defvar shell-mode-map |
| 338 | (cond ((not shell-mode-map) | 338 | (let ((map (nconc (make-sparse-keymap) comint-mode-map))) |
| 339 | (setq shell-mode-map (nconc (make-sparse-keymap) comint-mode-map)) | 339 | (define-key map "\C-c\C-f" 'shell-forward-command) |
| 340 | (define-key shell-mode-map "\C-c\C-f" 'shell-forward-command) | 340 | (define-key map "\C-c\C-b" 'shell-backward-command) |
| 341 | (define-key shell-mode-map "\C-c\C-b" 'shell-backward-command) | 341 | (define-key map "\t" 'comint-dynamic-complete) |
| 342 | (define-key shell-mode-map "\t" 'comint-dynamic-complete) | 342 | (define-key map (kbd "M-RET") 'shell-resync-dirs) |
| 343 | (define-key shell-mode-map (kbd "M-RET") 'shell-resync-dirs) | 343 | (define-key map "\M-?" 'comint-dynamic-list-filename-completions) |
| 344 | (define-key shell-mode-map "\M-?" | 344 | (define-key map [menu-bar completion] |
| 345 | 'comint-dynamic-list-filename-completions) | 345 | (cons "Complete" |
| 346 | (define-key shell-mode-map [menu-bar completion] | 346 | (copy-keymap (lookup-key comint-mode-map [menu-bar completion])))) |
| 347 | (cons "Complete" | 347 | (define-key-after (lookup-key map [menu-bar completion]) |
| 348 | (copy-keymap (lookup-key comint-mode-map [menu-bar completion])))) | 348 | [complete-env-variable] '("Complete Env. Variable Name" . |
| 349 | (define-key-after (lookup-key shell-mode-map [menu-bar completion]) | 349 | shell-dynamic-complete-environment-variable) |
| 350 | [complete-env-variable] '("Complete Env. Variable Name" . | 350 | 'complete-file) |
| 351 | shell-dynamic-complete-environment-variable) | 351 | (define-key-after (lookup-key map [menu-bar completion]) |
| 352 | 'complete-file) | 352 | [expand-directory] '("Expand Directory Reference" . |
| 353 | (define-key-after (lookup-key shell-mode-map [menu-bar completion]) | 353 | shell-replace-by-expanded-directory) |
| 354 | [expand-directory] '("Expand Directory Reference" . | 354 | 'complete-expand) |
| 355 | shell-replace-by-expanded-directory) | 355 | map)) |
| 356 | 'complete-expand))) | ||
| 357 | 356 | ||
| 358 | (defcustom shell-mode-hook '() | 357 | (defcustom shell-mode-hook '() |
| 359 | "Hook for customizing Shell mode." | 358 | "Hook for customizing Shell mode." |