diff src/editfns.c @ 9163:41fe5f636879

(lisp_time_argument, Finsert, Finsert_and_inherit, Finsert_before_markers, Finsert_and_inherit_before_markers, Fformat): Use type test macros.
author Karl Heuer <kwzh@gnu.org>
date Tue, 27 Sep 1994 23:32:55 +0000
parents b4739bcefc44
children e44908d7323b
line wrap: on
line diff
--- a/src/editfns.c	Tue Sep 27 22:59:50 1994 +0000
+++ b/src/editfns.c	Tue Sep 27 23:32:55 1994 +0000
@@ -581,7 +581,7 @@
       high = Fcar (specified_time);
       CHECK_NUMBER (high, 0);
       low = Fcdr (specified_time);
-      if (XTYPE (low) == Lisp_Cons)
+      if (CONSP (low))
 	low = Fcar (low);
       CHECK_NUMBER (low, 0);
       *result = (XINT (high) << 16) + (XINT (low) & 0xffff);
@@ -793,12 +793,12 @@
     {
       tem = args[argnum];
     retry:
-      if (XTYPE (tem) == Lisp_Int)
+      if (INTEGERP (tem))
 	{
 	  str[0] = XINT (tem);
 	  insert (str, 1);
 	}
-      else if (XTYPE (tem) == Lisp_String)
+      else if (STRINGP (tem))
 	{
 	  insert_from_string (tem, 0, XSTRING (tem)->size, 0);
 	}
@@ -829,12 +829,12 @@
     {
       tem = args[argnum];
     retry:
-      if (XTYPE (tem) == Lisp_Int)
+      if (INTEGERP (tem))
 	{
 	  str[0] = XINT (tem);
 	  insert_and_inherit (str, 1);
 	}
-      else if (XTYPE (tem) == Lisp_String)
+      else if (STRINGP (tem))
 	{
 	  insert_from_string (tem, 0, XSTRING (tem)->size, 1);
 	}
@@ -864,12 +864,12 @@
     {
       tem = args[argnum];
     retry:
-      if (XTYPE (tem) == Lisp_Int)
+      if (INTEGERP (tem))
 	{
 	  str[0] = XINT (tem);
 	  insert_before_markers (str, 1);
 	}
-      else if (XTYPE (tem) == Lisp_String)
+      else if (STRINGP (tem))
 	{
 	  insert_from_string_before_markers (tem, 0, XSTRING (tem)->size, 0);
 	}
@@ -901,12 +901,12 @@
     {
       tem = args[argnum];
     retry:
-      if (XTYPE (tem) == Lisp_Int)
+      if (INTEGERP (tem))
 	{
 	  str[0] = XINT (tem);
 	  insert_before_markers_and_inherit (str, 1);
 	}
-      else if (XTYPE (tem) == Lisp_String)
+      else if (STRINGP (tem))
 	{
 	  insert_from_string_before_markers (tem, 0, XSTRING (tem)->size, 1);
 	}
@@ -1629,12 +1629,12 @@
 	    args[n] = tem;
 	    goto string;
 	  }
-	else if (XTYPE (args[n]) == Lisp_Symbol)
+	else if (SYMBOLP (args[n]))
 	  {
 	    XSET (args[n], Lisp_String, XSYMBOL (args[n])->name);
 	    goto string;
 	  }
-	else if (XTYPE (args[n]) == Lisp_String)
+	else if (STRINGP (args[n]))
 	  {
 	  string:
 	    if (*format != 's' && *format != 'S')
@@ -1642,7 +1642,7 @@
 	    total += XSTRING (args[n])->size;
 	  }
 	/* Would get MPV otherwise, since Lisp_Int's `point' to low memory.  */
-	else if (XTYPE (args[n]) == Lisp_Int && *format != 's')
+	else if (INTEGERP (args[n]) && *format != 's')
 	  {
 #ifdef LISP_FLOAT_TYPE
 	    /* The following loop assumes the Lisp type indicates
@@ -1655,7 +1655,7 @@
 	    total += 10;
 	  }
 #ifdef LISP_FLOAT_TYPE
-	else if (XTYPE (args[n]) == Lisp_Float && *format != 's')
+	else if (FLOATP (args[n]) && *format != 's')
 	  {
 	    if (! (*format == 'e' || *format == 'f' || *format == 'g'))
 	      args[n] = Ftruncate (args[n]);
@@ -1686,12 +1686,12 @@
       {
 	if (n >= nargs)
 	  strings[i++] = (unsigned char *) "";
-	else if (XTYPE (args[n]) == Lisp_Int)
+	else if (INTEGERP (args[n]))
 	  /* We checked above that the corresponding format effector
 	     isn't %s, which would cause MPV.  */
 	  strings[i++] = (unsigned char *) XINT (args[n]);
 #ifdef LISP_FLOAT_TYPE
-	else if (XTYPE (args[n]) == Lisp_Float)
+	else if (FLOATP (args[n]))
 	  {
 	    union { double d; int half[2]; } u;