]> git.eshelyaron.com Git - emacs.git/commitdiff
(tmm-prompt): Delete tmm-add-prompt if we fail.
authorRichard M. Stallman <rms@gnu.org>
Sat, 18 Nov 1995 15:57:50 +0000 (15:57 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 18 Nov 1995 15:57:50 +0000 (15:57 +0000)
Don't switch to *Completions* if it wasn't created.

lisp/tmm.el

index 281b6a3d84519e82f9796a0efdcae4b0703aa536..1d23ffb5ca9ecbdadc1538652098e6bed7229873 100644 (file)
@@ -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)