summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>1999-09-12 05:07:01 +0000
committerKen Raeburn <raeburn@raeburn.org>1999-09-12 05:07:01 +0000
commit70949dac51f3e975477e6b1a38cc78625efc4a40 (patch)
treed0048c9a0b9bc18a9dd65e094b0fce43d1067f9b
parente952bf4445863c01763f402389b38c00f77e024b (diff)
downloademacs-70949dac51f3e975477e6b1a38cc78625efc4a40.tar.gz
Use XCAR, XCDR, XFLOAT_DATA instead of explicit member access.
-rw-r--r--src/alloc.c40
-rw-r--r--src/bytecode.c14
-rw-r--r--src/callint.c28
-rw-r--r--src/callproc.c32
-rw-r--r--src/dired.c8
-rw-r--r--src/floatfns.c18
-rw-r--r--src/fns.c84
-rw-r--r--src/indent.c24
-rw-r--r--src/process.c54
-rw-r--r--src/textprop.c24
10 files changed, 163 insertions, 163 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 64f9e0ccd2b..8cebe6d598a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -680,7 +680,7 @@ make_float (float_value)
}
XSETFLOAT (val, &float_block->floats[float_block_index++]);
}
- XFLOAT (val)->data = float_value;
+ XFLOAT_DATA (val) = float_value;
XSETFASTINT (XFLOAT (val)->type, 0); /* bug chasing -wsr */
consing_since_gc += sizeof (struct Lisp_Float);
floats_consed++;
@@ -765,8 +765,8 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
}
XSETCONS (val, &cons_block->conses[cons_block_index++]);
}
- XCONS (val)->car = car;
- XCONS (val)->cdr = cdr;
+ XCAR (val) = car;
+ XCDR (val) = cdr;
consing_since_gc += sizeof (struct Lisp_Cons);
cons_cells_consed++;
return val;
@@ -1568,8 +1568,8 @@ pure_cons (car, cdr)
error ("Pure Lisp storage exhausted");
XSETCONS (new, PUREBEG + pureptr);
pureptr += sizeof (struct Lisp_Cons);
- XCONS (new)->car = Fpurecopy (car);
- XCONS (new)->cdr = Fpurecopy (cdr);
+ XCAR (new) = Fpurecopy (car);
+ XCDR (new) = Fpurecopy (cdr);
return new;
}
@@ -1606,7 +1606,7 @@ make_pure_float (num)
error ("Pure Lisp storage exhausted");
XSETFLOAT (new, PUREBEG + pureptr);
pureptr += sizeof (struct Lisp_Float);
- XFLOAT (new)->data = num;
+ XFLOAT_DATA (new) = num;
XSETFASTINT (XFLOAT (new)->type, 0); /* bug chasing -wsr */
return new;
}
@@ -1644,10 +1644,10 @@ Does not copy symbols.")
return obj;
if (CONSP (obj))
- return pure_cons (XCONS (obj)->car, XCONS (obj)->cdr);
+ return pure_cons (XCAR (obj), XCDR (obj));
#ifdef LISP_FLOAT_TYPE
else if (FLOATP (obj))
- return make_pure_float (XFLOAT (obj)->data);
+ return make_pure_float (XFLOAT_DATA (obj));
#endif /* LISP_FLOAT_TYPE */
else if (STRINGP (obj))
return make_pure_string (XSTRING (obj)->data, XSTRING (obj)->size,
@@ -1892,19 +1892,19 @@ Garbage collection happens automatically if you cons more than\n\
prev = Qnil;
while (CONSP (tail))
{
- if (GC_CONSP (XCONS (tail)->car)
- && GC_MARKERP (XCONS (XCONS (tail)->car)->car)
- && ! XMARKBIT (XMARKER (XCONS (XCONS (tail)->car)->car)->chain))
+ if (GC_CONSP (XCAR (tail))
+ && GC_MARKERP (XCAR (XCAR (tail)))
+ && ! XMARKBIT (XMARKER (XCAR (XCAR (tail)))->chain))
{
if (NILP (prev))
- nextb->undo_list = tail = XCONS (tail)->cdr;
+ nextb->undo_list = tail = XCDR (tail);
else
- tail = XCONS (prev)->cdr = XCONS (tail)->cdr;
+ tail = XCDR (prev) = XCDR (tail);
}
else
{
prev = tail;
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
}
}
}
@@ -2462,7 +2462,7 @@ mark_object (argptr)
}
mark_object (&ptr->car);
/* See comment above under Lisp_Vector for why not use ptr here. */
- objptr = &XCONS (obj)->cdr;
+ objptr = &XCDR (obj);
goto loop;
}
@@ -2509,11 +2509,11 @@ mark_buffer (buf)
break;
XMARK (ptr->car);
if (GC_CONSP (ptr->car)
- && ! XMARKBIT (XCONS (ptr->car)->car)
- && GC_MARKERP (XCONS (ptr->car)->car))
+ && ! XMARKBIT (XCAR (ptr->car))
+ && GC_MARKERP (XCAR (ptr->car)))
{
- XMARK (XCONS (ptr->car)->car);
- mark_object (&XCONS (ptr->car)->cdr);
+ XMARK (XCAR (ptr->car));
+ mark_object (&XCDR (ptr->car));
}
else
mark_object (&ptr->car);
@@ -2524,7 +2524,7 @@ mark_buffer (buf)
break;
}
- mark_object (&XCONS (tail)->cdr);
+ mark_object (&XCDR (tail));
}
else
mark_object (&buffer->undo_list);
diff --git a/src/bytecode.c b/src/bytecode.c
index 6ed0eda904f..e69ae722248 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -629,7 +629,7 @@ If the third argument is incorrect, Emacs may crash.")
while (--op >= 0)
{
if (CONSP (v1))
- v1 = XCONS (v1)->cdr;
+ v1 = XCDR (v1);
else if (!NILP (v1))
{
immediate_quit = 0;
@@ -674,14 +674,14 @@ If the third argument is incorrect, Emacs may crash.")
case Bcar:
v1 = TOP;
docar:
- if (CONSP (v1)) TOP = XCONS (v1)->car;
+ if (CONSP (v1)) TOP = XCAR (v1);
else if (NILP (v1)) TOP = Qnil;
else Fcar (wrong_type_argument (Qlistp, v1));
break;
case Bcdr:
v1 = TOP;
- if (CONSP (v1)) TOP = XCONS (v1)->cdr;
+ if (CONSP (v1)) TOP = XCDR (v1);
else if (NILP (v1)) TOP = Qnil;
else Fcdr (wrong_type_argument (Qlistp, v1));
break;
@@ -810,8 +810,8 @@ If the third argument is incorrect, Emacs may crash.")
{
double f1, f2;
- f1 = (FLOATP (v1) ? XFLOAT (v1)->data : XINT (v1));
- f2 = (FLOATP (v2) ? XFLOAT (v2)->data : XINT (v2));
+ f1 = (FLOATP (v1) ? XFLOAT_DATA (v1) : XINT (v1));
+ f2 = (FLOATP (v2) ? XFLOAT_DATA (v2) : XINT (v2));
TOP = (f1 == f2 ? Qt : Qnil);
}
else
@@ -1097,7 +1097,7 @@ If the third argument is incorrect, Emacs may crash.")
case Bcar_safe:
v1 = TOP;
if (CONSP (v1))
- TOP = XCONS (v1)->car;
+ TOP = XCAR (v1);
else
TOP = Qnil;
break;
@@ -1105,7 +1105,7 @@ If the third argument is incorrect, Emacs may crash.")
case Bcdr_safe:
v1 = TOP;
if (CONSP (v1))
- TOP = XCONS (v1)->cdr;
+ TOP = XCDR (v1);
else
TOP = Qnil;
break;
diff --git a/src/callint.c b/src/callint.c
index f033d32b417..644f9bc55c0 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -314,17 +314,17 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
instead of the present values. */
if (CONSP (input))
{
- car = XCONS (input)->car;
+ car = XCAR (input);
/* Skip through certain special forms. */
while (EQ (car, Qlet) || EQ (car, Qletx)
|| EQ (car, Qsave_excursion))
{
- while (CONSP (XCONS (input)->cdr))
- input = XCONS (input)->cdr;
- input = XCONS (input)->car;
+ while (CONSP (XCDR (input)))
+ input = XCDR (input);
+ input = XCAR (input);
if (!CONSP (input))
break;
- car = XCONS (input)->car;
+ car = XCAR (input);
}
if (EQ (car, Qlist))
{
@@ -353,7 +353,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
{
teml = Fnthcdr (Vhistory_length, Vcommand_history);
if (CONSP (teml))
- XCONS (teml)->cdr = Qnil;
+ XCDR (teml) = Qnil;
}
}
single_kboard_state ();
@@ -388,9 +388,9 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
event = XVECTOR (keys)->contents[next_event];
if (EVENT_HAS_PARAMETERS (event)
- && (event = XCONS (event)->cdr, CONSP (event))
- && (event = XCONS (event)->car, CONSP (event))
- && (event = XCONS (event)->car, WINDOWP (event)))
+ && (event = XCDR (event), CONSP (event))
+ && (event = XCAR (event), CONSP (event))
+ && (event = XCAR (event), WINDOWP (event)))
{
if (MINI_WINDOW_P (XWINDOW (event))
&& ! (minibuf_level > 0 && EQ (event, minibuf_window)))
@@ -554,7 +554,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
discard the following up-event. */
teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1));
if (CONSP (teml))
- teml = XCONS (teml)->car;
+ teml = XCAR (teml);
if (SYMBOLP (teml))
{
Lisp_Object tem2;
@@ -582,7 +582,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
discard the following up-event. */
teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1));
if (CONSP (teml))
- teml = XCONS (teml)->car;
+ teml = XCAR (teml);
if (SYMBOLP (teml))
{
Lisp_Object tem2;
@@ -771,7 +771,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
{
teml = Fnthcdr (Vhistory_length, Vcommand_history);
if (CONSP (teml))
- XCONS (teml)->cdr = Qnil;
+ XCDR (teml) = Qnil;
}
}
@@ -807,8 +807,8 @@ Its numeric meaning is what you would get from `(interactive \"p\")'.")
XSETFASTINT (val, 1);
else if (EQ (raw, Qminus))
XSETINT (val, -1);
- else if (CONSP (raw) && INTEGERP (XCONS (raw)->car))
- XSETINT (val, XINT (XCONS (raw)->car));
+ else if (CONSP (raw) && INTEGERP (XCAR (raw)))
+ XSETINT (val, XINT (XCAR (raw)));
else if (INTEGERP (raw))
val = raw;
else
diff --git a/src/callproc.c b/src/callproc.c
index f17b4cc63af..fec6c53733e 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -270,9 +270,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
coding_systems = Ffind_operation_coding_system (nargs + 1, args2);
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->cdr;
+ val = XCDR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->cdr;
+ val = XCDR (Vdefault_process_coding_system);
else
val = Qnil;
}
@@ -296,10 +296,10 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
(BUFFER-FOR-STDOUT FILE-FOR-STDERR). */
if (CONSP (buffer))
{
- if (CONSP (XCONS (buffer)->cdr))
+ if (CONSP (XCDR (buffer)))
{
Lisp_Object stderr_file;
- stderr_file = XCONS (XCONS (buffer)->cdr)->car;
+ stderr_file = XCAR (XCDR (buffer));
if (NILP (stderr_file) || EQ (Qt, stderr_file))
error_file = stderr_file;
@@ -307,7 +307,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
error_file = Fexpand_file_name (stderr_file, Qnil);
}
- buffer = XCONS (buffer)->car;
+ buffer = XCAR (buffer);
}
if (!(EQ (buffer, Qnil)
@@ -698,9 +698,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
= Ffind_operation_coding_system (nargs + 1, args2);
}
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->car;
+ val = XCAR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->car;
+ val = XCAR (Vdefault_process_coding_system);
else
val = Qnil;
}
@@ -943,9 +943,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
coding_systems = Ffind_operation_coding_system (nargs + 1, args2);
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->cdr;
+ val = XCDR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->cdr;
+ val = XCDR (Vdefault_process_coding_system);
else
val = Qnil;
}
@@ -1088,8 +1088,8 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
new_length = 0;
for (tem = Vprocess_environment;
- CONSP (tem) && STRINGP (XCONS (tem)->car);
- tem = XCONS (tem)->cdr)
+ CONSP (tem) && STRINGP (XCAR (tem));
+ tem = XCDR (tem))
new_length++;
/* new_length + 2 to include PWD and terminating 0. */
@@ -1102,11 +1102,11 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
/* Copy the Vprocess_environment strings into new_env. */
for (tem = Vprocess_environment;
- CONSP (tem) && STRINGP (XCONS (tem)->car);
- tem = XCONS (tem)->cdr)
+ CONSP (tem) && STRINGP (XCAR (tem));
+ tem = XCDR (tem))
{
char **ep = env;
- char *string = (char *) XSTRING (XCONS (tem)->car)->data;
+ char *string = (char *) XSTRING (XCAR (tem))->data;
/* See if this string duplicates any string already in the env.
If so, don't put it in.
When an env var has multiple definitions,
@@ -1255,11 +1255,11 @@ getenv_internal (var, varlen, value, valuelen)
{
Lisp_Object scan;
- for (scan = Vprocess_environment; CONSP (scan); scan = XCONS (scan)->cdr)
+ for (scan = Vprocess_environment; CONSP (scan); scan = XCDR (scan))
{
Lisp_Object entry;
- entry = XCONS (scan)->car;
+ entry = XCAR (scan);
if (STRINGP (entry)
&& STRING_BYTES (XSTRING (entry)) > varlen
&& XSTRING (entry)->data[varlen] == '='
diff --git a/src/dired.c b/src/dired.c
index 49e95a54795..d9c2ab0f865 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -486,9 +486,9 @@ file_name_completion (file, dirname, all_flag, ver_flag)
if (!passcount && len > XSTRING (encoded_file)->size)
/* and exit this for loop if a match is found */
for (tem = Vcompletion_ignored_extensions;
- CONSP (tem); tem = XCONS (tem)->cdr)
+ CONSP (tem); tem = XCDR (tem))
{
- elt = XCONS (tem)->car;
+ elt = XCAR (tem);
if (!STRINGP (elt)) continue;
skip = len - XSTRING (elt)->size;
if (skip < 0) continue;
@@ -514,9 +514,9 @@ file_name_completion (file, dirname, all_flag, ver_flag)
/* Ignore this element if it fails to match all the regexps. */
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
- regexps = XCONS (regexps)->cdr)
+ regexps = XCDR (regexps))
{
- tem = Fstring_match (XCONS (regexps)->car, elt, zero);
+ tem = Fstring_match (XCAR (regexps), elt, zero);
if (NILP (tem))
break;
}
diff --git a/src/floatfns.c b/src/floatfns.c
index cd1c0c4441e..b989591cc81 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -222,7 +222,7 @@ extract_float (num)
CHECK_NUMBER_OR_FLOAT (num, 0);
if (FLOATP (num))
- return XFLOAT (num)->data;
+ return XFLOAT_DATA (num);
return (double) XINT (num);
}
@@ -480,8 +480,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
XSETINT (val, acc);
return val;
}
- f1 = FLOATP (arg1) ? XFLOAT (arg1)->data : XINT (arg1);
- f2 = FLOATP (arg2) ? XFLOAT (arg2)->data : XINT (arg2);
+ f1 = FLOATP (arg1) ? XFLOAT_DATA (arg1) : XINT (arg1);
+ f2 = FLOATP (arg2) ? XFLOAT_DATA (arg2) : XINT (arg2);
/* Really should check for overflow, too */
if (f1 == 0.0 && f2 == 0.0)
f1 = 1.0;
@@ -650,7 +650,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
CHECK_NUMBER_OR_FLOAT (arg, 0);
if (FLOATP (arg))
- IN_FLOAT (arg = make_float (fabs (XFLOAT (arg)->data)), "abs", arg);
+ IN_FLOAT (arg = make_float (fabs (XFLOAT_DATA (arg))), "abs", arg);
else if (XINT (arg) < 0)
XSETINT (arg, - XINT (arg));
@@ -743,8 +743,8 @@ rounding_driver (arg, divisor, double_round, int_round2, name)
{
double f1, f2;
- f1 = FLOATP (arg) ? XFLOAT (arg)->data : XINT (arg);
- f2 = (FLOATP (divisor) ? XFLOAT (divisor)->data : XINT (divisor));
+ f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XINT (arg);
+ f2 = (FLOATP (divisor) ? XFLOAT_DATA (divisor) : XINT (divisor));
if (! IEEE_FLOATING_POINT && f2 == 0)
Fsignal (Qarith_error, Qnil);
@@ -769,7 +769,7 @@ rounding_driver (arg, divisor, double_round, int_round2, name)
{
double d;
- IN_FLOAT (d = (*double_round) (XFLOAT (arg)->data), name, arg);
+ IN_FLOAT (d = (*double_round) (XFLOAT_DATA (arg)), name, arg);
FLOAT_TO_INT (d, arg, name, arg);
}
#endif
@@ -890,8 +890,8 @@ fmod_float (x, y)
{
double f1, f2;
- f1 = FLOATP (x) ? XFLOAT (x)->data : XINT (x);
- f2 = FLOATP (y) ? XFLOAT (y)->data : XINT (y);
+ f1 = FLOATP (x) ? XFLOAT_DATA (x) : XINT (x);
+ f2 = FLOATP (y) ? XFLOAT_DATA (y) : XINT (y);
if (! IEEE_FLOATING_POINT && f2 == 0)
Fsignal (Qarith_error, Qnil);
diff --git a/src/fns.c b/src/fns.c
index 7e6995ad347..1c9f375ad09 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -182,13 +182,13 @@ which is at least the number of distinct elements.")
/* halftail is used to detect circular lists. */
halftail = list;
- for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
if (EQ (tail, halftail) && len != 0)
break;
len++;
if ((len & 1) == 0)
- halftail = XCONS (halftail)->cdr;
+ halftail = XCDR (halftail);
}
XSETINT (length, len);
@@ -630,9 +630,9 @@ concat (nargs, args, target_type, last_special)
else if (BOOL_VECTOR_P (this) && XBOOL_VECTOR (this)->size > 0)
wrong_type_argument (Qintegerp, Faref (this, make_number (0)));
else if (CONSP (this))
- for (; CONSP (this); this = XCONS (this)->cdr)
+ for (; CONSP (this); this = XCDR (this))
{
- ch = XCONS (this)->car;
+ ch = XCAR (this);
if (! INTEGERP (ch))
wrong_type_argument (Qintegerp, ch);
this_len_byte = CHAR_BYTES (XINT (ch));
@@ -744,7 +744,7 @@ concat (nargs, args, target_type, last_special)
`this' is exhausted. */
if (NILP (this)) break;
if (CONSP (this))
- elt = XCONS (this)->car, this = XCONS (this)->cdr;
+ elt = XCAR (this), this = XCDR (this);
else if (thisindex >= thisleni)
break;
else if (STRINGP (this))
@@ -787,9 +787,9 @@ concat (nargs, args, target_type, last_special)
/* Store this element into the result. */
if (toindex < 0)
{
- XCONS (tail)->car = elt;
+ XCAR (tail) = elt;
prev = tail;
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
}
else if (VECTORP (val))
XVECTOR (val)->contents[toindex++] = elt;
@@ -826,7 +826,7 @@ concat (nargs, args, target_type, last_special)
}
}
if (!NILP (prev))
- XCONS (prev)->cdr = last_tail;
+ XCDR (prev) = last_tail;
if (num_textprops > 0)
{
@@ -1127,13 +1127,13 @@ Elements of ALIST that are not conses are also shared.")
if (NILP (alist))
return alist;
alist = concat (1, &alist, Lisp_Cons, 0);
- for (tem = alist; CONSP (tem); tem = XCONS (tem)->cdr)
+ for (tem = alist; CONSP (tem); tem = XCDR (tem))
{
register Lisp_Object car;
- car = XCONS (tem)->car;
+ car = XCAR (tem);
if (CONSP (car))
- XCONS (tem)->car = Fcons (XCONS (car)->car, XCONS (car)->cdr);
+ XCAR (tem) = Fcons (XCAR (car), XCDR (car));
}
return alist;
}
@@ -1302,7 +1302,7 @@ The value is actually the tail of LIST whose car is ELT.")
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
tem = Fcar (tail);
@@ -1321,7 +1321,7 @@ The value is actually the tail of LIST whose car is ELT.")
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
tem = Fcar (tail);
@@ -1340,12 +1340,12 @@ Elements of LIST that are not conses are ignored.")
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
if (!CONSP (elt)) continue;
- tem = XCONS (elt)->car;
+ tem = XCAR (elt);
if (EQ (key, tem)) return elt;
QUIT;
}
@@ -1361,12 +1361,12 @@ assq_no_quit (key, list)
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
if (!CONSP (elt)) continue;
- tem = XCONS (elt)->car;
+ tem = XCAR (elt);
if (EQ (key, tem)) return elt;
}
return Qnil;
@@ -1380,12 +1380,12 @@ The value is actually the element of LIST whose car equals KEY.")
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
if (!CONSP (elt)) continue;
- tem = Fequal (XCONS (elt)->car, key);
+ tem = Fequal (XCAR (elt), key);
if (!NILP (tem)) return elt;
QUIT;
}
@@ -1400,12 +1400,12 @@ The value is actually the element of LIST whose cdr is ELT.")
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
if (!CONSP (elt)) continue;
- tem = XCONS (elt)->cdr;
+ tem = XCDR (elt);
if (EQ (key, tem)) return elt;
QUIT;
}
@@ -1420,12 +1420,12 @@ The value is actually the element of LIST whose cdr equals KEY.")
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr)
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
if (!CONSP (elt)) continue;
- tem = Fequal (XCONS (elt)->cdr, key);
+ tem = Fequal (XCDR (elt), key);
if (!NILP (tem)) return elt;
QUIT;
}
@@ -1453,13 +1453,13 @@ to be sure of changing the value of `foo'.")
if (EQ (elt, tem))
{
if (NILP (prev))
- list = XCONS (tail)->cdr;
+ list = XCDR (tail);
else
- Fsetcdr (prev, XCONS (tail)->cdr);
+ Fsetcdr (prev, XCDR (tail));
}
else
prev = tail;
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
QUIT;
}
return list;
@@ -1487,13 +1487,13 @@ to be sure of changing the value of `foo'.")
if (! NILP (Fequal (elt, tem)))
{
if (NILP (prev))
- list = XCONS (tail)->cdr;
+ list = XCDR (tail);
else
- Fsetcdr (prev, XCONS (tail)->cdr);
+ Fsetcdr (prev, XCDR (tail));
}
else
prev = tail;
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
QUIT;
}
return list;
@@ -1529,8 +1529,8 @@ See also the function `nreverse', which is used more often.")
{
Lisp_Object new;
- for (new = Qnil; CONSP (list); list = XCONS (list)->cdr)
- new = Fcons (XCONS (list)->car, new);
+ for (new = Qnil; CONSP (list); list = XCDR (list))
+ new = Fcons (XCAR (list), new);
if (!NILP (list))
wrong_type_argument (Qconsp, list);
return new;
@@ -1641,12 +1641,12 @@ one of the properties on the list.")
register Lisp_Object prop;
{
register Lisp_Object tail;
- for (tail = plist; !NILP (tail); tail = Fcdr (XCONS (tail)->cdr))
+ for (tail = plist; !NILP (tail); tail = Fcdr (XCDR (tail)))
{
register Lisp_Object tem;
tem = Fcar (tail);
if (EQ (prop, tem))
- return Fcar (XCONS (tail)->cdr);
+ return Fcar (XCDR (tail));
}
return Qnil;
}
@@ -1677,12 +1677,12 @@ The PLIST is modified by side effects.")
register Lisp_Object tail, prev;
Lisp_Object newcell;
prev = Qnil;
- for (tail = plist; CONSP (tail) && CONSP (XCONS (tail)->cdr);
- tail = XCONS (XCONS (tail)->cdr)->cdr)
+ for (tail = plist; CONSP (tail) && CONSP (XCDR (tail));
+ tail = XCDR (XCDR (tail)))
{
- if (EQ (prop, XCONS (tail)->car))
+ if (EQ (prop, XCAR (tail)))
{
- Fsetcar (XCONS (tail)->cdr, val);
+ Fsetcar (XCDR (tail), val);
return plist;
}
prev = tail;
@@ -1691,7 +1691,7 @@ The PLIST is modified by side effects.")
if (NILP (prev))
return newcell;
else
- Fsetcdr (XCONS (prev)->cdr, newcell);
+ Fsetcdr (XCDR (prev), newcell);
return plist;
}
@@ -1744,10 +1744,10 @@ internal_equal (o1, o2, depth)
#endif
case Lisp_Cons:
- if (!internal_equal (XCONS (o1)->car, XCONS (o2)->car, depth + 1))
+ if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1))
return 0;
- o1 = XCONS (o1)->cdr;
- o2 = XCONS (o2)->cdr;
+ o1 = XCDR (o1);
+ o2 = XCDR (o2);
goto tail_recurse;
case Lisp_Misc:
@@ -2375,7 +2375,7 @@ mapcar1 (leni, vals, fn, seq)
for (i = 0; i < leni; i++)
{
vals[i] = call1 (fn, Fcar (tail));
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
}
}
diff --git a/src/indent.c b/src/indent.c
index f53d971018c..54967684441 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1534,20 +1534,20 @@ DEFUN ("compute-motion", Fcompute_motion, Scompute_motion, 7, 7, 0,
CHECK_NUMBER_COERCE_MARKER (from, 0);
CHECK_CONS (frompos, 0);
- CHECK_NUMBER (XCONS (frompos)->car, 0);
- CHECK_NUMBER (XCONS (frompos)->cdr, 0);
+ CHECK_NUMBER (XCAR (frompos), 0);
+ CHECK_NUMBER (XCDR (frompos), 0);
CHECK_NUMBER_COERCE_MARKER (to, 0);
CHECK_CONS (topos, 0);
- CHECK_NUMBER (XCONS (topos)->car, 0);
- CHECK_NUMBER (XCONS (topos)->cdr, 0);
+ CHECK_NUMBER (XCAR (topos), 0);
+ CHECK_NUMBER (XCDR (topos), 0);
CHECK_NUMBER (width, 0);
if (!NILP (offsets))
{
CHECK_CONS (offsets, 0);
- CHECK_NUMBER (XCONS (offsets)->car, 0);
- CHECK_NUMBER (XCONS (offsets)->cdr, 0);
- hscroll = XINT (XCONS (offsets)->car);
- tab_offset = XINT (XCONS (offsets)->cdr);
+ CHECK_NUMBER (XCAR (offsets), 0);
+ CHECK_NUMBER (XCDR (offsets), 0);
+ hscroll = XINT (XCAR (offsets));
+ tab_offset = XINT (XCDR (offsets));
}
else
hscroll = tab_offset = 0;
@@ -1562,10 +1562,10 @@ DEFUN ("compute-motion", Fcompute_motion, Scompute_motion, 7, 7, 0,
if (XINT (to) < BEGV || XINT (to) > ZV)
args_out_of_range_3 (to, make_number (BEGV), make_number (ZV));
- pos = compute_motion (XINT (from), XINT (XCONS (frompos)->cdr),
- XINT (XCONS (frompos)->car), 0,
- XINT (to), XINT (XCONS (topos)->cdr),
- XINT (XCONS (topos)->car),
+ pos = compute_motion (XINT (from), XINT (XCDR (frompos)),
+ XINT (XCAR (frompos)), 0,
+ XINT (to), XINT (XCDR (topos)),
+ XINT (XCAR (topos)),
XINT (width), hscroll, tab_offset,
XWINDOW (window));
diff --git a/src/process.c b/src/process.c
index d3f54fd5e0a..a67aeb329f6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -331,10 +331,10 @@ decode_status (l, symbol, code, coredump)
}
else
{
- *symbol = XCONS (l)->car;
- tem = XCONS (l)->cdr;
- *code = XFASTINT (XCONS (tem)->car);
- tem = XCONS (tem)->cdr;
+ *symbol = XCAR (l);
+ tem = XCDR (l);
+ *code = XFASTINT (XCAR (tem));
+ tem = XCDR (tem);
*coredump = !NILP (tem);
}
}
@@ -665,7 +665,7 @@ nil, indicating the current buffer's process.")
update_status (p);
status = p->status;
if (CONSP (status))
- status = XCONS (status)->car;
+ status = XCAR (status);
if (NETCONN_P (process))
{
if (EQ (status, Qrun))
@@ -687,7 +687,7 @@ If PROCESS has not yet exited or died, return 0.")
if (!NILP (XPROCESS (process)->raw_status_low))
update_status (XPROCESS (process));
if (CONSP (XPROCESS (process)->status))
- return XCONS (XCONS (XPROCESS (process)->status)->cdr)->car;
+ return XCAR (XCDR (XPROCESS (process)->status));
return make_number (0);
}
@@ -964,7 +964,7 @@ Proc Status Buffer Tty Command\n\
update_status (p);
symbol = p->status;
if (CONSP (p->status))
- symbol = XCONS (p->status)->car;
+ symbol = XCAR (p->status);
if (EQ (symbol, Qsignal))
@@ -1024,7 +1024,7 @@ Proc Status Buffer Tty Command\n\
if (NETCONN_P (proc))
{
sprintf (tembuf, "(network stream connection to %s)\n",
- XSTRING (XCONS (p->childp)->car)->data);
+ XSTRING (XCAR (p->childp))->data);
insert_string (tembuf);
}
else
@@ -1226,9 +1226,9 @@ Remaining arguments are strings to give program as arguments.")
coding_systems = Ffind_operation_coding_system (nargs + 1, args2);
UNGCPRO;
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->car;
+ val = XCAR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->car;
+ val = XCAR (Vdefault_process_coding_system);
}
XPROCESS (proc)->decode_coding_system = val;
@@ -1245,9 +1245,9 @@ Remaining arguments are strings to give program as arguments.")
UNGCPRO;
}
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->cdr;
+ val = XCDR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->cdr;
+ val = XCDR (Vdefault_process_coding_system);
}
XPROCESS (proc)->encode_coding_system = val;
}
@@ -2101,9 +2101,9 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
coding_systems = Ffind_operation_coding_system (5, args);
UNGCPRO;
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->car;
+ val = XCAR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->car;
+ val = XCAR (Vdefault_process_coding_system);
else
val = Qnil;
}
@@ -2124,9 +2124,9 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
UNGCPRO;
}
if (CONSP (coding_systems))
- val = XCONS (coding_systems)->cdr;
+ val = XCDR (coding_systems);
else if (CONSP (Vdefault_process_coding_system))
- val = XCONS (Vdefault_process_coding_system)->cdr;
+ val = XCDR (Vdefault_process_coding_system);
else
val = Qnil;
}
@@ -2378,7 +2378,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
/* If waiting for non-nil in a cell, record where. */
if (CONSP (read_kbd))
{
- wait_for_cell = &XCONS (read_kbd)->car;
+ wait_for_cell = &XCAR (read_kbd);
XSETFASTINT (read_kbd, 0);
}
@@ -2837,7 +2837,7 @@ static Lisp_Object
read_process_output_call (fun_and_args)
Lisp_Object fun_and_args;
{
- return apply1 (XCONS (fun_and_args)->car, XCONS (fun_and_args)->cdr);
+ return apply1 (XCAR (fun_and_args), XCDR (fun_and_args));
}
static Lisp_Object
@@ -4075,9 +4075,9 @@ kill_buffer_processes (buffer)
{
Lisp_Object tail, proc;
- for (tail = Vprocess_alist; GC_CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = Vprocess_alist; GC_CONSP (tail); tail = XCDR (tail))
{
- proc = XCONS (XCONS (tail)->car)->cdr;
+ proc = XCDR (XCAR (tail));
if (GC_PROCESSP (proc)
&& (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer)))
{
@@ -4165,9 +4165,9 @@ sigchld_handler (signo)
/* Find the process that signaled us, and record its status. */
p = 0;
- for (tail = Vprocess_alist; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
{
- proc = XCONS (XCONS (tail)->car)->cdr;
+ proc = XCDR (XCAR (tail));
p = XPROCESS (proc);
if (EQ (p->childp, Qt) && XFASTINT (p->pid) == pid)
break;
@@ -4177,9 +4177,9 @@ sigchld_handler (signo)
/* Look for an asynchronous process whose pid hasn't been filled
in yet. */
if (p == 0)
- for (tail = Vprocess_alist; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
{
- proc = XCONS (XCONS (tail)->car)->cdr;
+ proc = XCDR (XCAR (tail));
p = XPROCESS (proc);
if (INTEGERP (p->pid) && XINT (p->pid) == -1)
break;
@@ -4270,7 +4270,7 @@ static Lisp_Object
exec_sentinel_unwind (data)
Lisp_Object data;
{
- XPROCESS (XCONS (data)->car)->sentinel = XCONS (data)->cdr;
+ XPROCESS (XCAR (data))->sentinel = XCDR (data);
return Qnil;
}
@@ -4407,7 +4407,7 @@ status_notify ()
/* If process is terminated, deactivate it or delete it. */
symbol = p->status;
if (CONSP (p->status))
- symbol = XCONS (p->status)->car;
+ symbol = XCAR (p->status);
if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)
|| EQ (symbol, Qclosed))
@@ -4755,7 +4755,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
/* If waiting for non-nil in a cell, record where. */
if (CONSP (read_kbd))
{
- wait_for_cell = &XCONS (read_kbd)->car;
+ wait_for_cell = &XCAR (read_kbd);
XSETFASTINT (read_kbd, 0);
}
diff --git a/src/textprop.c b/src/textprop.c
index c938fb441b8..db7f4edd2f1 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -67,7 +67,7 @@ Lisp_Object Qfront_sticky, Qrear_nonsticky;
/* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to
the o1's cdr. Otherwise, return zero. This is handy for
traversing plists. */
-#define PLIST_ELT_P(o1, o2) (CONSP (o1) && ((o2)=XCONS (o1)->cdr, CONSP (o2)))
+#define PLIST_ELT_P(o1, o2) (CONSP (o1) && ((o2)=XCDR (o1), CONSP (o2)))
Lisp_Object Vinhibit_point_motion_hooks;
Lisp_Object Vdefault_text_properties;
@@ -268,10 +268,10 @@ property_value (plist, prop)
Lisp_Object value;
while (PLIST_ELT_P (plist, value))
- if (EQ (XCONS (plist)->car, prop))
- return XCONS (value)->car;
+ if (EQ (XCAR (plist), prop))
+ return XCAR (value);
else
- plist = XCONS (value)->cdr;
+ plist = XCDR (value);
return Qunbound;
}
@@ -293,12 +293,12 @@ set_properties (properties, interval, object)
or has a different value in PROPERTIES, make an undo record. */
for (sym = interval->plist;
PLIST_ELT_P (sym, value);
- sym = XCONS (value)->cdr)
- if (! EQ (property_value (properties, XCONS (sym)->car),
- XCONS (value)->car))
+ sym = XCDR (value))
+ if (! EQ (property_value (properties, XCAR (sym)),
+ XCAR (value)))
{
record_property_change (interval->position, LENGTH (interval),
- XCONS (sym)->car, XCONS (value)->car,
+ XCAR (sym), XCAR (value),
object);
}
@@ -306,11 +306,11 @@ set_properties (properties, interval, object)
make an undo record binding it to nil, so it will be removed. */
for (sym = properties;
PLIST_ELT_P (sym, value);
- sym = XCONS (value)->cdr)
- if (EQ (property_value (interval->plist, XCONS (sym)->car), Qunbound))
+ sym = XCDR (value))
+ if (EQ (property_value (interval->plist, XCAR (sym)), Qunbound))
{
record_property_change (interval->position, LENGTH (interval),
- XCONS (sym)->car, Qnil,
+ XCAR (sym), Qnil,
object);
}
}
@@ -1535,7 +1535,7 @@ extend_property_ranges (list, old_end, new_end)
end = XCAR (XCDR (item));
if (EQ (end, old_end))
- XCONS (XCDR (item))->car = new_end;
+ XCAR (XCDR (item)) = new_end;
}
}