diff options
| author | Richard M. Stallman | 1995-08-03 17:39:53 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-08-03 17:39:53 +0000 |
| commit | afb1835e0bc010ad4715ecc7dbf330f4ce10bfab (patch) | |
| tree | 8c65a265decb2e00c5ed2a73efdd074c14510537 | |
| parent | 04752ffbf2d7cd3a39f469b85142496cd64341c8 (diff) | |
| download | emacs-afb1835e0bc010ad4715ecc7dbf330f4ce10bfab.tar.gz emacs-afb1835e0bc010ad4715ecc7dbf330f4ce10bfab.zip | |
Don't alter bindings in minibuffer-local-must-match-map
or completion-list-mode-map.
(tmm-add-prompt): Use make-local-hook; add hook locally.
(tmm-delete-map): Delete hook locally.
| -rw-r--r-- | lisp/tmm.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/tmm.el b/lisp/tmm.el index 723046fa80c..e713703441f 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el | |||
| @@ -32,14 +32,9 @@ | |||
| 32 | ;;; tmm-menubar. | 32 | ;;; tmm-menubar. |
| 33 | 33 | ||
| 34 | (require 'electric) | 34 | (require 'electric) |
| 35 | (define-key completion-list-mode-map "\e\e" 'abort-recursive-edit) | ||
| 36 | (define-key completion-list-mode-map [left] 'backward-word) | ||
| 37 | (define-key completion-list-mode-map [right] 'forward-word) | ||
| 38 | ;(define-key minibuffer-local-must-match-map [pageup] 'tmm-goto-completions) | 35 | ;(define-key minibuffer-local-must-match-map [pageup] 'tmm-goto-completions) |
| 39 | ;(define-key minibuffer-local-must-match-map [prior] 'tmm-goto-completions) | 36 | ;(define-key minibuffer-local-must-match-map [prior] 'tmm-goto-completions) |
| 40 | ;(define-key minibuffer-local-must-match-map "\ev" 'tmm-goto-completions) | 37 | ;(define-key minibuffer-local-must-match-map "\ev" 'tmm-goto-completions) |
| 41 | (define-key minibuffer-local-must-match-map [up] 'previous-history-element) | ||
| 42 | (define-key minibuffer-local-must-match-map [down] 'next-history-element) | ||
| 43 | 38 | ||
| 44 | ;;; The following will be localized, added only to pacify the compiler. | 39 | ;;; The following will be localized, added only to pacify the compiler. |
| 45 | (defvar tmm-short-cuts) | 40 | (defvar tmm-short-cuts) |
| @@ -49,6 +44,8 @@ | |||
| 49 | (defvar tmm-km-list) | 44 | (defvar tmm-km-list) |
| 50 | (defvar tmm-table-undef) | 45 | (defvar tmm-table-undef) |
| 51 | 46 | ||
| 47 | ;;;###autoload (define-key global-map "\M-`" tmm-menubar) | ||
| 48 | |||
| 52 | ;;;###autoload | 49 | ;;;###autoload |
| 53 | (defun tmm-menubar () | 50 | (defun tmm-menubar () |
| 54 | "Text-mode emulation of looking and choosing from a menubar. | 51 | "Text-mode emulation of looking and choosing from a menubar. |
| @@ -67,7 +64,7 @@ See the documentation for `tmm-prompt'." | |||
| 67 | "Press PageUp Key to reach this buffer from the minibuffer. | 64 | "Press PageUp Key to reach this buffer from the minibuffer. |
| 68 | Alternatively, you can use Up/Down keys (or your History keys) to change | 65 | Alternatively, you can use Up/Down keys (or your History keys) to change |
| 69 | the item in the minibuffer, and press RET when you are done, or press the | 66 | the item in the minibuffer, and press RET when you are done, or press the |
| 70 | marked letters to pick up your choice. ESC ESC to cancel. | 67 | marked letters to pick up your choice. Type ESC ESC to cancel. |
| 71 | " | 68 | " |
| 72 | "What insert on top of completion buffer.") | 69 | "What insert on top of completion buffer.") |
| 73 | 70 | ||
| @@ -166,7 +163,8 @@ shortcuts added to these cars. Adds the shortcuts to a free variable | |||
| 166 | 163 | ||
| 167 | (defun tmm-add-prompt () | 164 | (defun tmm-add-prompt () |
| 168 | (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) | 165 | (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) |
| 169 | (add-hook 'minibuffer-exit-hook 'tmm-delete-map) | 166 | (make-local-hook 'minibuffer-exit-hook) |
| 167 | (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t) | ||
| 170 | (let ((map (make-sparse-keymap)) (win (selected-window))) | 168 | (let ((map (make-sparse-keymap)) (win (selected-window))) |
| 171 | (mapcar (lambda (str) | 169 | (mapcar (lambda (str) |
| 172 | (define-key map str 'tmm-shortcut) | 170 | (define-key map str 'tmm-shortcut) |
| @@ -198,7 +196,7 @@ shortcuts added to these cars. Adds the shortcuts to a free variable | |||
| 198 | (insert tmm-c-prompt))) | 196 | (insert tmm-c-prompt))) |
| 199 | 197 | ||
| 200 | (defun tmm-delete-map () | 198 | (defun tmm-delete-map () |
| 201 | (remove-hook 'minibuffer-exit-hook 'tmm-delete-map) | 199 | (remove-hook 'minibuffer-exit-hook 'tmm-delete-map t) |
| 202 | (use-local-map tmm-old-mb-map)) | 200 | (use-local-map tmm-old-mb-map)) |
| 203 | 201 | ||
| 204 | (defun tmm-shortcut () | 202 | (defun tmm-shortcut () |