summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-09-27 23:32:55 +0000
committerKarl Heuer <kwzh@gnu.org>1994-09-27 23:32:55 +0000
commitae68312980506e0d2deafad6005845c12debd97c (patch)
tree5815c0fc9beb1ec60c121cfa4482571cbcd472b3 /src
parent6672c42bd1f7eeeca95eb239462bf3975109e0be (diff)
downloademacs-ae68312980506e0d2deafad6005845c12debd97c.tar.gz
(lisp_time_argument, Finsert, Finsert_and_inherit, Finsert_before_markers,
Finsert_and_inherit_before_markers, Fformat): Use type test macros.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/editfns.c b/src/editfns.c
index d06b7607c41..ff3536e9691 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -581,7 +581,7 @@ lisp_time_argument (specified_time, result)
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 @@ Any other markers at the point of insertion remain before the text.")
{
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 @@ Any other markers at the point of insertion remain before the text.")
{
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 @@ Any other markers at the point of insertion also end up after the text.")
{
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 @@ Any other markers at the point of insertion also end up after the text.")
{
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 @@ Use %% to put a single % into the output.")
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 @@ Use %% to put a single % into the output.")
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 @@ Use %% to put a single % into the output.")
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 @@ Use %% to put a single % into the output.")
{
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;