From: Richard M. Stallman Date: Fri, 13 Sep 1996 18:25:17 +0000 (+0000) Subject: (read_minibuf): If not in minibuffer window, X-Git-Tag: emacs-20.1~3764 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be15a5185343840c5c7278e2a0c2c9bb05b198d8;p=emacs.git (read_minibuf): If not in minibuffer window, cancel the active minibuffer. --- diff --git a/src/minibuf.c b/src/minibuf.c index db6d5f05cff..b9fc7fa5dd6 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -191,9 +191,15 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) prompt = build_string (""); if (!enable_recursive_minibuffers - && minibuf_level > 0 - && (EQ (selected_window, minibuf_window))) - error ("Command attempted to use minibuffer while in minibuffer"); + && minibuf_level > 0) + { + if (EQ (selected_window, minibuf_window)) + error ("Command attempted to use minibuffer while in minibuffer"); + else + /* If we're in another window, cancel the minibuffer that's active. */ + Fthrow (Qexit, + build_string ("Command attempted to use minibuffer while in minibuffer")); + } /* Choose the minibuffer window and frame, and take action on them. */