Skip to content

Commit a6b41a8

Browse files
committed
* src/minibuf.c (read_minibuf): Use user-error
1 parent 60fba71 commit a6b41a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/minibuf.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,13 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
414414
if (!enable_recursive_minibuffers
415415
&& minibuf_level > 0)
416416
{
417+
Lisp_Object str = build_string ("Command attempted to use minibuffer"
418+
"while in minibuffer");
417419
if (EQ (selected_window, minibuf_window))
418-
error ("Command attempted to use minibuffer while in minibuffer");
420+
Fsignal (Quser_error, (list1 (str)));
419421
else
420422
/* If we're in another window, cancel the minibuffer that's active. */
421-
Fthrow (Qexit,
422-
build_string ("Command attempted to use minibuffer while in minibuffer"));
423+
Fthrow (Qexit, str);
423424
}
424425

425426
if ((noninteractive

0 commit comments

Comments
 (0)