From c5c4b51cc68d84b6cf3db933ac595c95e54de104 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 18 Nov 1995 15:57:50 +0000 Subject: [PATCH] (tmm-prompt): Delete tmm-add-prompt if we fail. Don't switch to *Completions* if it wasn't created. --- lisp/tmm.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/tmm.el b/lisp/tmm.el index 281b6a3d845..1d23ffb5ca9 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -115,9 +115,12 @@ If the optional argument IN-POPUP is set, is argument-compatible with tmm-km-list nil t nil (cons 'history (* 2 history-len)))) (save-excursion - (set-buffer "*Completions*") - (use-local-map tmm-old-comp-map) - (bury-buffer (current-buffer))) + (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) + (if (get-buffer "*Completions*") + (progn + (set-buffer "*Completions*") + (use-local-map tmm-old-comp-map) + (bury-buffer (current-buffer))))) ))) (setq bind (cdr (assoc out tmm-km-list))) (and (null bind) -- 2.39.2