#define min(a, b) ((a) < (b) ? (a) : (b))
+extern int quit_char;
+
/* List of buffers for use as minibuffers.
The first element of the list is used for the outermost minibuffer invocation,
the next element is used for a recursive minibuffer invocation, etc.
if (XFRAME (mini_frame) != selected_frame)
record_unwind_protect (Fset_window_configuration,
Fcurrent_window_configuration (mini_frame));
+
+ /* If the minibuffer is on an iconified or invisible frame,
+ make it visible now. */
+ Fmake_frame_visible (mini_frame);
+
if (minibuffer_auto_raise)
Fraise_frame (mini_frame);
#endif
/* If Lisp form desired instead of string, parse it. */
if (expflag)
- val = Fread (val);
+ {
+ Lisp_Object expr_and_pos;
+ unsigned char *p;
+
+ expr_and_pos = Fread_from_string (val, Qnil, Qnil);
+ /* Ignore trailing whitespace; any other trailing junk is an error. */
+ for (p = XSTRING (val)->data + XINT (Fcdr (expr_and_pos)); *p; p++)
+ if (*p != ' ' && *p != '\t' && *p != '\n')
+ error ("Trailing garbage following expression");
+ val = Fcar (expr_and_pos);
+ }
unbind_to (count, Qnil); /* The appropriate frame will get selected
in set-window-configuration. */
int depth;
{
Lisp_Object tail, num, buf;
- char name[14];
+ char name[24];
extern Lisp_Object nconc2 ();
XFASTINT (num) = depth;
if (!NILP (Vquit_flag))
{
Vquit_flag = Qnil;
- unread_command_events = Fcons (make_number (Ctl ('g')), Qnil);
+ unread_command_events = Fcons (make_number (quit_char), Qnil);
}
Vinhibit_quit = oinhibit;
}
}
DEFUN ("minibuffer-complete", Fminibuffer_complete, Sminibuffer_complete, 0, 0, "",
- "Complete the minibuffer contents as far as possible.")
+ "Complete the minibuffer contents as far as possible.\n\
+Return nil if there is no valid completion, else t.")
()
{
register int i = do_completion ();
0, 0, "",
"Complete the minibuffer contents at most a single word.\n\
After one word is completed as much as possible, a space or hyphen\n\
-is added, provided that matches some possible completion.")
+is added, provided that matches some possible completion.\n\
+Return nil if there is no valid completion, else t.")
()
{
Lisp_Object completion, tem;