changeset 16180:9b0180c495ff

(read_minibuf): If not in minibuffer window, cancel the active minibuffer.
author Richard M. Stallman <rms@gnu.org>
date Fri, 13 Sep 1996 18:25:17 +0000
parents 7f8ce4d3e955
children de4b3d40218f
files src/minibuf.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Fri Sep 13 17:03:29 1996 +0000
+++ b/src/minibuf.c	Fri Sep 13 18:25:17 1996 +0000
@@ -191,9 +191,15 @@
     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.  */