Commit 03699b14 authored by Ken Raeburn's avatar Ken Raeburn

Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member access.

parent 92610620
......@@ -591,15 +591,15 @@ word_boundary_p (c1, c2)
if (NILP (category_set2))
return default_result;
for (; CONSP (tail); tail = XCONS (tail)->cdr)
for (; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object elt = XCONS(tail)->car;
Lisp_Object elt = XCAR (tail);
if (CONSP (elt)
&& CATEGORYP (XCONS (elt)->car)
&& CATEGORYP (XCONS (elt)->cdr)
&& CATEGORY_MEMBER (XFASTINT (XCONS (elt)->car), category_set1)
&& CATEGORY_MEMBER (XFASTINT (XCONS (elt)->cdr), category_set2))
&& CATEGORYP (XCAR (elt))
&& CATEGORYP (XCDR (elt))
&& CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set1)
&& CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set2))
return !default_result;
}
return default_result;
......
......@@ -1328,7 +1328,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
/* Check map varidity. */
if (!CONSP (map)) continue;
map = XCONS(map)->cdr;
map = XCDR (map);
if (!VECTORP (map)) continue;
size = XVECTOR (map)->size;
if (size <= 1) continue;
......@@ -1372,8 +1372,8 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
}
else if (CONSP (content))
{
attrib = XCONS (content)->car;
value = XCONS (content)->cdr;
attrib = XCAR (content);
value = XCDR (content);
if (!NUMBERP (attrib) || !NUMBERP (value))
continue;
reg[RRR] = i;
......@@ -1437,7 +1437,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
/* Check map varidity. */
if (!CONSP (map)) continue;
map = XCONS (map)->cdr;
map = XCDR (map);
if (!VECTORP (map)) continue;
size = XVECTOR (map)->size;
if (size <= 1) continue;
......@@ -1477,8 +1477,8 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
}
else if (CONSP (content))
{
attrib = XCONS (content)->car;
value = XCONS (content)->cdr;
attrib = XCAR (content);
value = XCDR (content);
if (!NUMBERP (attrib) || !NUMBERP (value))
continue;
reg[RRR] = i;
......@@ -1522,7 +1522,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
reg[RRR] = -1;
break;
}
map = XCONS(map)->cdr;
map = XCDR (map);
if (!VECTORP (map))
{
reg[RRR] = -1;
......@@ -1546,8 +1546,8 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
reg[RRR] = i;
else if (CONSP (content))
{
attrib = XCONS (content)->car;
value = XCONS (content)->cdr;
attrib = XCAR (content);
value = XCDR (content);
if (!NUMBERP (attrib) || !NUMBERP (value))
continue;
reg[rrr] = XUINT(value);
......@@ -1663,8 +1663,8 @@ resolve_symbol_ccl_program (ccl)
if (INTEGERP (contents))
continue;
else if (CONSP (contents)
&& SYMBOLP (XCONS (contents)->car)
&& SYMBOLP (XCONS (contents)->cdr))
&& SYMBOLP (XCAR (contents))
&& SYMBOLP (XCDR (contents)))
{
/* This is the new style for embedding symbols. The form is
(SYMBOL . PROPERTY). (get SYMBOL PROPERTY) should give
......@@ -1673,7 +1673,7 @@ resolve_symbol_ccl_program (ccl)
if (EQ (result, ccl))
result = Fcopy_sequence (ccl);
val = Fget (XCONS (contents)->car, XCONS (contents)->cdr);
val = Fget (XCAR (contents), XCDR (contents));
if (NATNUMP (val))
XVECTOR (result)->contents[i] = val;
else
......@@ -2038,10 +2038,10 @@ Return index number of the registered map.")
if (!CONSP (slot))
break;
if (EQ (symbol, XCONS (slot)->car))
if (EQ (symbol, XCAR (slot)))
{
index = make_number (i);
XCONS (slot)->cdr = map;
XCDR (slot) = map;
Fput (symbol, Qcode_conversion_map, map);
Fput (symbol, Qcode_conversion_map_id, index);
return index;
......
......@@ -2974,9 +2974,9 @@ setup_coding_system (coding_system, coding)
bzero (coding->safe_charsets, MAX_CHARSET + 1);
while (CONSP (val))
{
if ((i = get_charset_id (XCONS (val)->car)) >= 0)
if ((i = get_charset_id (XCAR (val))) >= 0)
coding->safe_charsets[i] = 1;
val = XCONS (val)->cdr;
val = XCDR (val);
}
}
......@@ -3042,12 +3042,12 @@ setup_coding_system (coding_system, coding)
val = Vcharset_revision_alist;
while (CONSP (val))
{
charset = get_charset_id (Fcar_safe (XCONS (val)->car));
charset = get_charset_id (Fcar_safe (XCAR (val)));
if (charset >= 0
&& (temp = Fcdr_safe (XCONS (val)->car), INTEGERP (temp))
&& (temp = Fcdr_safe (XCAR (val)), INTEGERP (temp))
&& (i = XINT (temp), (i >= 0 && (i + '@') < 128)))
CODING_SPEC_ISO_REVISION_NUMBER (coding, charset) = i;
val = XCONS (val)->cdr;
val = XCDR (val);
}
/* Checks FLAGS[REG] (REG = 0, 1, 2 3) and decide designations.
......@@ -3084,28 +3084,28 @@ setup_coding_system (coding_system, coding)
tail = flags[i];
coding->flags |= CODING_FLAG_ISO_DESIGNATION;
if (INTEGERP (XCONS (tail)->car)
&& (charset = XINT (XCONS (tail)->car),
if (INTEGERP (XCAR (tail))
&& (charset = XINT (XCAR (tail)),
CHARSET_VALID_P (charset))
|| (charset = get_charset_id (XCONS (tail)->car)) >= 0)
|| (charset = get_charset_id (XCAR (tail))) >= 0)
{
CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = charset;
CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) =i;
}
else
CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = -1;
tail = XCONS (tail)->cdr;
tail = XCDR (tail);
while (CONSP (tail))
{
if (INTEGERP (XCONS (tail)->car)
&& (charset = XINT (XCONS (tail)->car),
if (INTEGERP (XCAR (tail))
&& (charset = XINT (XCAR (tail)),
CHARSET_VALID_P (charset))
|| (charset = get_charset_id (XCONS (tail)->car)) >= 0)
|| (charset = get_charset_id (XCAR (tail))) >= 0)
CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset)
= i;
else if (EQ (XCONS (tail)->car, Qt))
else if (EQ (XCAR (tail), Qt))
reg_bits |= 1 << i;
tail = XCONS (tail)->cdr;
tail = XCDR (tail);
}
}
else
......@@ -3168,9 +3168,9 @@ setup_coding_system (coding_system, coding)
val = XVECTOR (coding_spec)->contents[4];
if (! CONSP (val)
|| setup_ccl_program (&(coding->spec.ccl.decoder),
XCONS (val)->car) < 0
XCAR (val)) < 0
|| setup_ccl_program (&(coding->spec.ccl.encoder),
XCONS (val)->cdr) < 0)
XCDR (val)) < 0)
goto label_invalid_coding_system;
bzero (coding->spec.ccl.valid_codes, 256);
......@@ -3179,18 +3179,18 @@ setup_coding_system (coding_system, coding)
{
Lisp_Object this;
for (; CONSP (val); val = XCONS (val)->cdr)
for (; CONSP (val); val = XCDR (val))
{
this = XCONS (val)->car;
this = XCAR (val);
if (INTEGERP (this)
&& XINT (this) >= 0 && XINT (this) < 256)
coding->spec.ccl.valid_codes[XINT (this)] = 1;
else if (CONSP (this)
&& INTEGERP (XCONS (this)->car)
&& INTEGERP (XCONS (this)->cdr))
&& INTEGERP (XCAR (this))
&& INTEGERP (XCDR (this)))
{
int start = XINT (XCONS (this)->car);
int end = XINT (XCONS (this)->cdr);
int start = XINT (XCAR (this));
int end = XINT (XCDR (this));
if (start >= 0 && start <= end && end < 256)
while (start <= end)
......@@ -4876,13 +4876,13 @@ detect_coding_system (src, src_bytes, highest)
/* At first, gather possible coding systems in VAL. */
val = Qnil;
for (tmp = Vcoding_category_list; !NILP (tmp); tmp = XCONS (tmp)->cdr)
for (tmp = Vcoding_category_list; !NILP (tmp); tmp = XCDR (tmp))
{
int idx
= XFASTINT (Fget (XCONS (tmp)->car, Qcoding_category_index));
= XFASTINT (Fget (XCAR (tmp), Qcoding_category_index));
if (coding_mask & (1 << idx))
{
val = Fcons (Fsymbol_value (XCONS (tmp)->car), val);
val = Fcons (Fsymbol_value (XCAR (tmp)), val);
if (highest)
break;
}
......@@ -4891,18 +4891,18 @@ detect_coding_system (src, src_bytes, highest)
val = Fnreverse (val);
/* Then, replace the elements with subsidiary coding systems. */
for (tmp = val; !NILP (tmp); tmp = XCONS (tmp)->cdr)
for (tmp = val; !NILP (tmp); tmp = XCDR (tmp))
{
if (eol_type != CODING_EOL_UNDECIDED
&& eol_type != CODING_EOL_INCONSISTENT)
{
Lisp_Object eol;
eol = Fget (XCONS (tmp)->car, Qeol_type);
eol = Fget (XCAR (tmp), Qeol_type);
if (VECTORP (eol))
XCONS (tmp)->car = XVECTOR (eol)->contents[eol_type];
XCAR (tmp) = XVECTOR (eol)->contents[eol_type];
}
}
return (highest ? XCONS (val)->car : val);
return (highest ? XCAR (val) : val);
}
DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region,
......@@ -5324,18 +5324,18 @@ which is a list of all the arguments given to this function.")
if (NILP (chain))
return Qnil;
for (; CONSP (chain); chain = XCONS (chain)->cdr)
for (; CONSP (chain); chain = XCDR (chain))
{
Lisp_Object elt;
elt = XCONS (chain)->car;
elt = XCAR (chain);
if (CONSP (elt)
&& ((STRINGP (target)
&& STRINGP (XCONS (elt)->car)
&& fast_string_match (XCONS (elt)->car, target) >= 0)
|| (INTEGERP (target) && EQ (target, XCONS (elt)->car))))
&& STRINGP (XCAR (elt))
&& fast_string_match (XCAR (elt), target) >= 0)
|| (INTEGERP (target) && EQ (target, XCAR (elt)))))
{
val = XCONS (elt)->cdr;
val = XCDR (elt);
/* Here, if VAL is both a valid coding system and a valid
function symbol, we return VAL as a coding system. */
if (CONSP (val))
......@@ -5406,13 +5406,13 @@ This function is internal use only.")
while (CONSP (val) && i < CODING_CATEGORY_IDX_MAX)
{
if (! SYMBOLP (XCONS (val)->car))
if (! SYMBOLP (XCAR (val)))
break;
idx = XFASTINT (Fget (XCONS (val)->car, Qcoding_category_index));
idx = XFASTINT (Fget (XCAR (val), Qcoding_category_index));
if (idx >= CODING_CATEGORY_IDX_MAX)
break;
coding_priorities[i++] = (1 << idx);
val = XCONS (val)->cdr;
val = XCDR (val);
}
/* If coding-category-list is valid and contains all coding
categories, `i' should be CODING_CATEGORY_IDX_MAX now. If not,
......
......@@ -126,8 +126,8 @@ get_doc_string (filepos, unibyte, definition)
}
else if (CONSP (filepos))
{
file = XCONS (filepos)->car;
position = XINT (XCONS (filepos)->cdr);
file = XCAR (filepos);
position = XINT (XCDR (filepos));
if (position < 0)
position = - position;
}
......@@ -353,7 +353,7 @@ string is passed through `substitute-command-keys'.")
/* Handle a doc reference--but these never come last
in the function body, so reject them if they are last. */
else if ((NATNUMP (tem) || CONSP (tem))
&& ! NILP (XCONS (tem1)->cdr))
&& ! NILP (XCDR (tem1)))
doc = get_doc_string (tem, 0, 0);
else
return Qnil;
......@@ -424,15 +424,15 @@ store_function_docstring (fun, offset)
{
Lisp_Object tem;
tem = XCONS (fun)->car;
tem = XCAR (fun);
if (EQ (tem, Qlambda) || EQ (tem, Qautoload))
{
tem = Fcdr (Fcdr (fun));
if (CONSP (tem) && INTEGERP (XCONS (tem)->car))
XSETFASTINT (XCONS (tem)->car, offset);
if (CONSP (tem) && INTEGERP (XCAR (tem)))
XSETFASTINT (XCAR (tem), offset);
}
else if (EQ (tem, Qmacro))
store_function_docstring (XCONS (fun)->cdr, offset);
store_function_docstring (XCDR (fun), offset);
}
/* Bytecode objects sometimes have slots for it. */
......
......@@ -2288,13 +2288,13 @@ save_restriction_restore (data)
register Lisp_Object tem;
int obegv, ozv;
buf = XBUFFER (XCONS (data)->car);
buf = XBUFFER (XCAR (data));
data = XCONS (data)->cdr;
data = XCDR (data);
tem = XCONS (data)->car;
tem = XCAR (data);
newhead = XINT (tem);
tem = XCONS (data)->cdr;
tem = XCDR (data);
newtail = XINT (tem);
if (newhead + newtail > BUF_Z (buf) - BUF_BEG (buf))
{
......@@ -2761,7 +2761,7 @@ Use %% to put a single % into the output.")
if (INTEGERP (args[n]))
sprintf (p, this_format, XINT (args[n]));
else
sprintf (p, this_format, XFLOAT (args[n])->data);
sprintf (p, this_format, XFLOAT_DATA (args[n]));
if (p > buf
&& multibyte
......
......@@ -322,11 +322,11 @@ CONDITION's value if non-nil is returned from the cond-form.")
val = Feval (Fcar (clause));
if (!NILP (val))
{
if (!EQ (XCONS (clause)->cdr, Qnil))
val = Fprogn (XCONS (clause)->cdr);
if (!EQ (XCDR (clause), Qnil))
val = Fprogn (XCDR (clause));
break;
}
args = XCONS (args)->cdr;
args = XCDR (args);
}
UNGCPRO;
......@@ -670,9 +670,9 @@ for the variable is `*'.")
return Qt;
/* If it is (STRING . INTEGER), a negative integer means a user variable. */
if (CONSP (documentation)
&& STRINGP (XCONS (documentation)->car)
&& INTEGERP (XCONS (documentation)->cdr)
&& XINT (XCONS (documentation)->cdr) < 0)
&& STRINGP (XCAR (documentation))
&& INTEGERP (XCDR (documentation))
&& XINT (XCDR (documentation)) < 0)
return Qt;
return Qnil;
}
......@@ -818,7 +818,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
if (!CONSP (form))
break;
/* Set SYM, give DEF and TEM right values in case SYM is not a symbol. */
def = sym = XCONS (form)->car;
def = sym = XCAR (form);
tem = Qnil;
/* Trace symbols aliases to other symbols
until we get a symbol that is not an alias. */
......@@ -844,7 +844,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
if (EQ (def, Qunbound) || !CONSP (def))
/* Not defined or definition not suitable */
break;
if (EQ (XCONS (def)->car, Qautoload))
if (EQ (XCAR (def), Qautoload))
{
/* Autoloading function: will it be a macro when loaded? */
tem = Fnth (make_number (4), def);
......@@ -860,17 +860,17 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
else
break;
}
else if (!EQ (XCONS (def)->car, Qmacro))
else if (!EQ (XCAR (def), Qmacro))
break;
else expander = XCONS (def)->cdr;
else expander = XCDR (def);
}
else
{
expander = XCONS (tem)->cdr;
expander = XCDR (tem);
if (NILP (expander))
break;
}
form = apply1 (expander, XCONS (form)->cdr);
form = apply1 (expander, XCDR (form));
}
return form;
}
......@@ -1062,8 +1062,8 @@ See also the function `signal' for more info.")
tem = Fcar (val);
if (! (NILP (tem)
|| (CONSP (tem)
&& (SYMBOLP (XCONS (tem)->car)
|| CONSP (XCONS (tem)->car)))))
&& (SYMBOLP (XCAR (tem))
|| CONSP (XCAR (tem))))))
error ("Invalid condition handler", tem);
}
......@@ -1311,11 +1311,11 @@ wants_debugger (list, conditions)
while (CONSP (conditions))
{
Lisp_Object this, tail;
this = XCONS (conditions)->car;
for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
if (EQ (XCONS (tail)->car, this))
this = XCAR (conditions);
for (tail = list; CONSP (tail); tail = XCDR (tail))
if (EQ (XCAR (tail), this))
return 1;
conditions = XCONS (conditions)->cdr;
conditions = XCDR (conditions);
}
return 0;
}
......@@ -1333,16 +1333,16 @@ skip_debugger (conditions, data)
Lisp_Object error_message;
for (tail = Vdebug_ignored_errors; CONSP (tail);
tail = XCONS (tail)->cdr)
tail = XCDR (tail))
{
if (STRINGP (XCONS (tail)->car))
if (STRINGP (XCAR (tail)))
{
if (first_string)
{
error_message = Ferror_message_string (data);
first_string = 0;
}
if (fast_string_match (XCONS (tail)->car, error_message) >= 0)
if (fast_string_match (XCAR (tail), error_message) >= 0)
return 1;
}
else
......@@ -1350,8 +1350,8 @@ skip_debugger (conditions, data)
Lisp_Object contail;
for (contail = conditions; CONSP (contail);
contail = XCONS (contail)->cdr)
if (EQ (XCONS (tail)->car, XCONS (contail)->car))
contail = XCDR (contail))
if (EQ (XCAR (tail), XCAR (contail)))
return 1;
}
}
......@@ -1458,7 +1458,7 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
tem = Fmemq (Fcar (condit), conditions);
if (!NILP (tem))
return handler;
condit = XCONS (condit)->cdr;
condit = XCDR (condit);
}
}
}
......@@ -1599,7 +1599,7 @@ this does nothing and returns nil.")
/* If function is defined and not as an autoload, don't override */
if (!EQ (XSYMBOL (function)->function, Qunbound)
&& !(CONSP (XSYMBOL (function)->function)
&& EQ (XCONS (XSYMBOL (function)->function)->car, Qautoload)))
&& EQ (XCAR (XSYMBOL (function)->function), Qautoload)))
return Qnil;
#ifdef NO_ARG_ARRAY
......@@ -1929,7 +1929,7 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.")
return Ffuncall (nargs - 1, args);
else if (numargs == 1)
{
args [nargs - 1] = XCONS (spread_arg)->car;
args [nargs - 1] = XCAR (spread_arg);
return Ffuncall (nargs, args);
}
......@@ -1977,8 +1977,8 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.")
i = nargs - 1;
while (!NILP (spread_arg))
{
funcall_args [i++] = XCONS (spread_arg)->car;
spread_arg = XCONS (spread_arg)->cdr;
funcall_args [i++] = XCAR (spread_arg);
spread_arg = XCDR (spread_arg);
}
RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args));
......@@ -2101,7 +2101,7 @@ run_hook_with_args (nargs, args, cond)
if (EQ (val, Qunbound) || NILP (val))
return ret;
else if (!CONSP (val) || EQ (XCONS (val)->car, Qlambda))
else if (!CONSP (val) || EQ (XCAR (val), Qlambda))
{
args[0] = val;
return Ffuncall (nargs, args);
......@@ -2115,9 +2115,9 @@ run_hook_with_args (nargs, args, cond)
CONSP (val) && ((cond == to_completion)
|| (cond == until_success ? NILP (ret)
: !NILP (ret)));
val = XCONS (val)->cdr)
val = XCDR (val))
{
if (EQ (XCONS (val)->car, Qt))
if (EQ (XCAR (val), Qt))
{
/* t indicates this hook has a local binding;
it means to run the global binding too. */
......@@ -2126,9 +2126,9 @@ run_hook_with_args (nargs, args, cond)
CONSP (globals) && ((cond == to_completion)
|| (cond == until_success ? NILP (ret)
: !NILP (ret)));
globals = XCONS (globals)->cdr)
globals = XCDR (globals))
{
args[0] = XCONS (globals)->car;
args[0] = XCAR (globals);
/* In a global value, t should not occur. If it does, we
must ignore it to avoid an endless loop. */
if (!EQ (args[0], Qt))
......@@ -2137,7 +2137,7 @@ run_hook_with_args (nargs, args, cond)
}
else
{
args[0] = XCONS (val)->car;
args[0] = XCAR (val);
ret = Ffuncall (nargs, args);
}
}
......@@ -2169,18 +2169,18 @@ run_hook_list_with_args (funlist, nargs, args)
globals = Qnil;
GCPRO3 (sym, val, globals);
for (val = funlist; CONSP (val); val = XCONS (val)->cdr)
for (val = funlist; CONSP (val); val = XCDR (val))
{
if (EQ (XCONS (val)->car, Qt))
if (EQ (XCAR (val), Qt))
{
/* t indicates this hook has a local binding;
it means to run the global binding too. */
for (globals = Fdefault_value (sym);
CONSP (globals);
globals = XCONS (globals)->cdr)
globals = XCDR (globals))
{
args[0] = XCONS (globals)->car;
args[0] = XCAR (globals);
/* In a global value, t should not occur. If it does, we
must ignore it to avoid an endless loop. */
if (!EQ (args[0], Qt))
......@@ -2189,7 +2189,7 @@ run_hook_list_with_args (funlist, nargs, args)
}
else
{
args[0] = XCONS (val)->car;
args[0] = XCAR (val);
Ffuncall (nargs, args);
}
}
......@@ -2675,8 +2675,8 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
tem = read_doc_string (XVECTOR (object)->contents[COMPILED_BYTECODE]);
if (!CONSP (tem))
error ("invalid byte code");
XVECTOR (object)->contents[COMPILED_BYTECODE] = XCONS (tem)->car;
XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCONS (tem)->cdr;
XVECTOR (object)->contents[COMPILED_BYTECODE] = XCAR (tem);
XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCDR (tem);
}
return object;
}
......
......@@ -344,19 +344,19 @@ use the standard functions without calling themselves recursively.")
inhibited_handlers = Qnil;
for (chain = Vfile_name_handler_alist; CONSP (chain);
chain = XCONS (chain)->cdr)
chain = XCDR (chain))
{
Lisp_Object elt;
elt = XCONS (chain)->car;
elt = XCAR (chain);
if (CONSP (elt))
{
Lisp_Object string;
string = XCONS (elt)->car;
string = XCAR (elt);
if (STRINGP (string) && fast_string_match (string, filename) >= 0)
{
Lisp_Object handler, tem;
handler = XCONS (elt)->cdr;
handler = XCDR (elt);
tem = Fmemq (handler, inhibited_handlers);
if (NILP (tem))
return handler;
......@@ -3375,8 +3375,8 @@ actually used.")
{
val = call6 (handler, Qinsert_file_contents, filename,
visit, beg, end, replace);
if (CONSP (val) && CONSP (XCONS (val)->cdr))
inserted = XINT (XCONS (XCONS (val)->cdr)->car);
if (CONSP (val) && CONSP (XCDR (val)))
inserted = XINT (XCAR (XCDR (val)));