summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-03-28 18:16:43 +0000
committerRichard M. Stallman <rms@gnu.org>1996-03-28 18:16:43 +0000
commit851c1d5643d130bab7e291e611082e11f2650fbb (patch)
tree25dc254d4625bc5f4122b18762c188d5b7ab4198
parent3f1bd9ca8de90d37de799103ffd87c08ec336522 (diff)
downloademacs-851c1d5643d130bab7e291e611082e11f2650fbb.tar.gz
(tmm-define-keys): New arg MINIBUFFER.
(tmm-add-prompt): Pass new arg in both calls.
-rw-r--r--lisp/tmm.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 2eb5ccf3acf..b648b922318 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -248,16 +248,18 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(cons (concat f tmm-mid-prompt str) (cdr elt)))))
(reverse list))))
-(defun tmm-define-keys ()
+(defun tmm-define-keys (minibuffer)
(mapcar (lambda (str)
(define-key (current-local-map) str 'tmm-shortcut)
(define-key (current-local-map) (downcase str) 'tmm-shortcut))
tmm-short-cuts)
- (define-key (current-local-map) [pageup] 'tmm-goto-completions)
- (define-key (current-local-map) [prior] 'tmm-goto-completions)
- (define-key (current-local-map) "\ev" 'tmm-goto-completions)
- (define-key (current-local-map) "\C-n" 'next-history-element)
- (define-key (current-local-map) "\C-p" 'previous-history-element))
+ (if minibuffer
+ (progn
+ (define-key (current-local-map) [pageup] 'tmm-goto-completions)
+ (define-key (current-local-map) [prior] 'tmm-goto-completions)
+ (define-key (current-local-map) "\ev" 'tmm-goto-completions)
+ (define-key (current-local-map) "\C-n" 'next-history-element)
+ (define-key (current-local-map) "\C-p" 'previous-history-element))))
(defun tmm-add-prompt ()
(remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
@@ -266,7 +268,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(let ((win (selected-window)))
(setq tmm-old-mb-map (current-local-map))
(use-local-map (append (make-sparse-keymap) tmm-old-mb-map))
- (tmm-define-keys)
+ (tmm-define-keys t)
;; Get window and hide it for electric mode to get correct size
(save-window-excursion
(let ((completions
@@ -283,7 +285,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(set-buffer (window-buffer (Electric-pop-up-window "*Completions*")))
(setq tmm-old-comp-map (current-local-map))
(use-local-map (append (make-sparse-keymap) tmm-old-comp-map))
- (tmm-define-keys)
+ (tmm-define-keys nil)
(select-window win) ; Cannot use
; save-window-excursion, since
; it restores the size