int count = specpdl_ptr - specpdl;
Lisp_Object mini_frame;
- if (XTYPE (prompt) != Lisp_String)
+ if (!STRINGP (prompt))
prompt = build_string ("");
/* Emacs in -batch mode calls minibuffer: print the prompt. */
- if (noninteractive && XTYPE (prompt) == Lisp_String)
+ if (noninteractive && STRINGP (prompt))
printf ("%s", XSTRING (prompt)->data);
if (!enable_recursive_minibuffers
up Emacs and buf's default directory is Qnil. Here's a hack; can
you think of something better to do? Find another buffer with a
better directory, and use that one instead. */
- if (XTYPE (val) == Lisp_String)
+ if (STRINGP (val))
current_buffer->directory = val;
else
{
Lisp_Object other_buf;
other_buf = XCONS (XCONS (buf_list)->car)->cdr;
- if (XTYPE (XBUFFER (other_buf)->directory) == Lisp_String)
+ if (STRINGP (XBUFFER (other_buf)->directory))
{
current_buffer->directory = XBUFFER (other_buf)->directory;
break;
if (!NILP (initial))
{
Finsert (1, &initial);
- if (!NILP (backup_n) && XTYPE (backup_n) == Lisp_Int)
+ if (!NILP (backup_n) && INTEGERP (backup_n))
Fforward_char (backup_n);
}
/* Add the value to the appropriate history list unless it is empty. */
if (XSTRING (val)->size != 0
- && XTYPE (Vminibuffer_history_variable) == Lisp_Symbol
+ && SYMBOLP (Vminibuffer_history_variable)
&& ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound))
{
/* If the caller wanted to save the value read on a history list,
CHECK_STRING (prompt, 0);
if (!NILP (initial_contents))
{
- if (XTYPE (initial_contents) == Lisp_Cons)
+ if (CONSP (initial_contents))
{
position = Fcdr (initial_contents);
initial_contents = Fcar (initial_contents);
else
keymap = get_keymap (keymap,2);
- if (XTYPE (hist) == Lisp_Symbol)
+ if (SYMBOLP (hist))
{
histvar = hist;
histpos = Qnil;
Lisp_Object args[3];
struct gcpro gcpro1;
- if (XTYPE (def) == Lisp_Buffer)
+ if (BUFFERP (def))
def = XBUFFER (def)->name;
if (!NILP (def))
{
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string, 0);
- if (!list && XTYPE (alist) != Lisp_Vector)
+ if (!list && !VECTORP (alist))
return call3 (alist, string, pred, Qnil);
bestmatch = Qnil;
/* Is this element a possible completion? */
- if (XTYPE (eltstring) == Lisp_String
+ if (STRINGP (eltstring)
&& XSTRING (string)->size <= XSTRING (eltstring)->size
&& 0 > scmp (XSTRING (eltstring)->data, XSTRING (string)->data,
XSTRING (string)->size))
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string, 0);
- if (!list && XTYPE (alist) != Lisp_Vector)
+ if (!list && !VECTORP (alist))
{
return call3 (alist, string, pred, Qt);
}
/* Is this element a possible completion? */
- if (XTYPE (eltstring) == Lisp_String
+ if (STRINGP (eltstring)
&& XSTRING (string)->size <= XSTRING (eltstring)->size
/* Reject alternatives that start with space
unless the input starts with space. */
position = Qnil;
if (!NILP (init))
{
- if (XTYPE (init) == Lisp_Cons)
+ if (CONSP (init))
{
position = Fcdr (init);
init = Fcar (init);
}
}
- if (XTYPE (hist) == Lisp_Symbol)
+ if (SYMBOLP (hist))
{
histvar = hist;
histpos = Qnil;
|| NILP (Vminibuffer_completion_table))
tem = assoc_for_completion (Fbuffer_string (),
Vminibuffer_completion_table);
- else if (XTYPE (Vminibuffer_completion_table) == Lisp_Vector)
+ else if (VECTORP (Vminibuffer_completion_table))
{
/* the primitive used by Fintern_soft */
extern Lisp_Object oblookup ();
/* Bypass intern-soft as that loses for nil */
tem = oblookup (Vminibuffer_completion_table,
XSTRING (tem)->data, XSTRING (tem)->size);
- if (XTYPE (tem) != Lisp_Symbol)
+ if (!SYMBOLP (tem))
tem = Qnil;
else if (!NILP (Vminibuffer_completion_predicate))
tem = call1 (Vminibuffer_completion_predicate, tem);
elt = Fcar (tail);
if (!CONSP (elt)) continue;
thiscar = Fcar (elt);
- if (XTYPE (thiscar) != Lisp_String)
+ if (!STRINGP (thiscar))
continue;
if (completion_ignore_case)
thiscar = Fupcase (thiscar);
Vminibuffer_completion_predicate);
UNGCPRO;
- if (XTYPE (tem) == Lisp_String)
+ if (STRINGP (tem))
completion = tem;
else
{
Vminibuffer_completion_predicate);
UNGCPRO;
- if (XTYPE (tem) == Lisp_String)
+ if (STRINGP (tem))
completion = tem;
}
}
points to a non-string that is pointed to by COMPLETIONS. */
GCPRO1 (completions);
- if (XTYPE (Vstandard_output) == Lisp_Buffer)
+ if (BUFFERP (Vstandard_output))
set_buffer_internal (XBUFFER (Vstandard_output));
if (NILP (completions))
until after the text has been made. */
if (i & 1)
{
- if (XTYPE (Vstandard_output) == Lisp_Buffer)
+ if (BUFFERP (Vstandard_output))
Findent_to (make_number (35), make_number (2));
else
{
elt = Fcar (tail);
if (CONSP (elt))
{
- if (XTYPE (Vstandard_output) != Lisp_Buffer)
+ if (!BUFFERP (Vstandard_output))
{
Lisp_Object tem;
tem = Flength (Fcar (elt));
}
else
{
- if (XTYPE (Vstandard_output) != Lisp_Buffer)
+ if (!BUFFERP (Vstandard_output))
{
Lisp_Object tem;
tem = Flength (elt);
UNGCPRO;
- if (XTYPE (Vstandard_output) == Lisp_Buffer)
+ if (BUFFERP (Vstandard_output))
set_buffer_internal (old);
if (!NILP (Vrun_hooks))
"Terminate minibuffer input.")
()
{
- if (XTYPE (last_command_char) == Lisp_Int)
+ if (INTEGERP (last_command_char))
internal_self_insert (last_command_char, 0);
else
bitch_at_user ();