Mercurial > emacs
changeset 9120:ed766dfb4efe
(read_minibuf, Fread_from_minibuffer, Fread_buffer, Ftry_completion,
Ftry_completion, Fall_completions, Fcompleting_read, do_completion,
assoc_for_completion, Fminibuffer_complete_word, Fdisplay_completion_list,
Fself_insert_and_exit): Use type test macros.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 27 Sep 1994 02:12:02 +0000 |
parents | 0c3c25c2456e |
children | faecbbbcceb4 |
files | src/minibuf.c |
diffstat | 1 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/src/minibuf.c Tue Sep 27 02:00:42 1994 +0000 +++ b/src/minibuf.c Tue Sep 27 02:12:02 1994 +0000 @@ -131,11 +131,11 @@ 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 @@ -187,7 +187,7 @@ 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 { @@ -200,7 +200,7 @@ 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; @@ -228,7 +228,7 @@ 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); } @@ -271,7 +271,7 @@ /* 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, @@ -436,7 +436,7 @@ 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); @@ -455,7 +455,7 @@ else keymap = get_keymap (keymap,2); - if (XTYPE (hist) == Lisp_Symbol) + if (SYMBOLP (hist)) { histvar = hist; histpos = Qnil; @@ -569,7 +569,7 @@ Lisp_Object args[3]; struct gcpro gcpro1; - if (XTYPE (def) == Lisp_Buffer) + if (BUFFERP (def)) def = XBUFFER (def)->name; if (!NILP (def)) { @@ -618,7 +618,7 @@ 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; @@ -669,7 +669,7 @@ /* 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)) @@ -821,7 +821,7 @@ 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); } @@ -873,7 +873,7 @@ /* 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. */ @@ -975,7 +975,7 @@ position = Qnil; if (!NILP (init)) { - if (XTYPE (init) == Lisp_Cons) + if (CONSP (init)) { position = Fcdr (init); init = Fcar (init); @@ -989,7 +989,7 @@ } } - if (XTYPE (hist) == Lisp_Symbol) + if (SYMBOLP (hist)) { histvar = hist; histpos = Qnil; @@ -1095,7 +1095,7 @@ || 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 (); @@ -1104,7 +1104,7 @@ /* 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); @@ -1166,7 +1166,7 @@ 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); @@ -1366,7 +1366,7 @@ Vminibuffer_completion_predicate); UNGCPRO; - if (XTYPE (tem) == Lisp_String) + if (STRINGP (tem)) completion = tem; else { @@ -1377,7 +1377,7 @@ Vminibuffer_completion_predicate); UNGCPRO; - if (XTYPE (tem) == Lisp_String) + if (STRINGP (tem)) completion = tem; } } @@ -1429,7 +1429,7 @@ 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)) @@ -1446,7 +1446,7 @@ 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 { @@ -1466,7 +1466,7 @@ elt = Fcar (tail); if (CONSP (elt)) { - if (XTYPE (Vstandard_output) != Lisp_Buffer) + if (!BUFFERP (Vstandard_output)) { Lisp_Object tem; tem = Flength (Fcar (elt)); @@ -1479,7 +1479,7 @@ } else { - if (XTYPE (Vstandard_output) != Lisp_Buffer) + if (!BUFFERP (Vstandard_output)) { Lisp_Object tem; tem = Flength (elt); @@ -1492,7 +1492,7 @@ UNGCPRO; - if (XTYPE (Vstandard_output) == Lisp_Buffer) + if (BUFFERP (Vstandard_output)) set_buffer_internal (old); if (!NILP (Vrun_hooks)) @@ -1530,7 +1530,7 @@ "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 ();