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);
}
}
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.
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
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);
{
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)
/* 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;
}
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,
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))
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,
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;
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;
}
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. */
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);
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;
}
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);
}
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;
}
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
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;
}
}
tem = Fmemq (Fcar (condit), conditions);
if (!NILP (tem))
return handler;
- condit = XCONS (condit)->cdr;
+ condit = XCDR (condit);
}
}
}
/* 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
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);
}
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));
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);
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. */
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))
}
else
{
- args[0] = XCONS (val)->car;
+ args[0] = XCAR (val);
ret = Ffuncall (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))
}
else
{
- args[0] = XCONS (val)->car;
+ args[0] = XCAR (val);
Ffuncall (nargs, args);
}
}
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;
}
else
{
tem = indirect_function (object);
- if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap))
+ if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
return tem;
}
if (autoload
&& SYMBOLP (object)
&& CONSP (tem)
- && EQ (XCONS (tem)->car, Qautoload))
+ && EQ (XCAR (tem), Qautoload))
{
Lisp_Object tail;
keymap = get_keymap_1 (keymap, 1, 1);
/* Skip past the initial element `keymap'. */
- list = XCONS (keymap)->cdr;
- for (; CONSP (list); list = XCONS (list)->cdr)
+ list = XCDR (keymap);
+ for (; CONSP (list); list = XCDR (list))
{
/* See if there is another `keymap'. */
- if (EQ (Qkeymap, XCONS (list)->car))
+ if (EQ (Qkeymap, XCAR (list)))
return list;
}
prev = keymap;
while (1)
{
- list = XCONS (prev)->cdr;
+ list = XCDR (prev);
/* If there is a parent keymap here, replace it.
If we came to the end, add the parent in PREV. */
- if (! CONSP (list) || EQ (Qkeymap, XCONS (list)->car))
+ if (! CONSP (list) || EQ (Qkeymap, XCAR (list)))
{
/* If we already have the right parent, return now
so that we avoid the loops below. */
- if (EQ (XCONS (prev)->cdr, parent))
+ if (EQ (XCDR (prev), parent))
return parent;
- XCONS (prev)->cdr = parent;
+ XCDR (prev) = parent;
break;
}
prev = list;
/* Scan through for submaps, and set their parents too. */
- for (list = XCONS (keymap)->cdr; CONSP (list); list = XCONS (list)->cdr)
+ for (list = XCDR (keymap); CONSP (list); list = XCDR (list))
{
/* Stop the scan when we come to the parent. */
- if (EQ (XCONS (list)->car, Qkeymap))
+ if (EQ (XCAR (list), Qkeymap))
break;
/* If this element holds a prefix map, deal with it. */
- if (CONSP (XCONS (list)->car)
- && CONSP (XCONS (XCONS (list)->car)->cdr))
- fix_submap_inheritance (keymap, XCONS (XCONS (list)->car)->car,
- XCONS (XCONS (list)->car)->cdr);
-
- if (VECTORP (XCONS (list)->car))
- for (i = 0; i < XVECTOR (XCONS (list)->car)->size; i++)
- if (CONSP (XVECTOR (XCONS (list)->car)->contents[i]))
+ if (CONSP (XCAR (list))
+ && CONSP (XCDR (XCAR (list))))
+ fix_submap_inheritance (keymap, XCAR (XCAR (list)),
+ XCDR (XCAR (list)));
+
+ if (VECTORP (XCAR (list)))
+ for (i = 0; i < XVECTOR (XCAR (list))->size; i++)
+ if (CONSP (XVECTOR (XCAR (list))->contents[i]))
fix_submap_inheritance (keymap, make_number (i),
- XVECTOR (XCONS (list)->car)->contents[i]);
+ XVECTOR (XCAR (list))->contents[i]);
- if (CHAR_TABLE_P (XCONS (list)->car))
+ if (CHAR_TABLE_P (XCAR (list)))
{
Lisp_Object indices[3];
- map_char_table (fix_submap_inheritance, Qnil, XCONS (list)->car,
+ map_char_table (fix_submap_inheritance, Qnil, XCAR (list),
keymap, 0, indices);
}
}
if (CONSP (submap))
{
/* May be an old format menu item */
- if (STRINGP (XCONS (submap)->car))
+ if (STRINGP (XCAR (submap)))
{
- submap = XCONS (submap)->cdr;
+ submap = XCDR (submap);
/* Also remove a menu help string, if any,
following the menu item name. */
- if (CONSP (submap) && STRINGP (XCONS (submap)->car))
- submap = XCONS (submap)->cdr;
+ if (CONSP (submap) && STRINGP (XCAR (submap)))
+ submap = XCDR (submap);
/* Also remove the sublist that caches key equivalences, if any. */
if (CONSP (submap)
- && CONSP (XCONS (submap)->car))
+ && CONSP (XCAR (submap)))
{
Lisp_Object carcar;
- carcar = XCONS (XCONS (submap)->car)->car;
+ carcar = XCAR (XCAR (submap));
if (NILP (carcar) || VECTORP (carcar))
- submap = XCONS (submap)->cdr;
+ submap = XCDR (submap);
}
}
/* Or a new format menu item */
- else if (EQ (XCONS (submap)->car, Qmenu_item)
- && CONSP (XCONS (submap)->cdr))
+ else if (EQ (XCAR (submap), Qmenu_item)
+ && CONSP (XCDR (submap)))
{
- submap = XCONS (XCONS (submap)->cdr)->cdr;
+ submap = XCDR (XCDR (submap));
if (CONSP (submap))
- submap = XCONS (submap)->car;
+ submap = XCAR (submap);
}
}
/* If it isn't a keymap now, there's no work to do. */
if (! CONSP (submap)
- || ! EQ (XCONS (submap)->car, Qkeymap))
+ || ! EQ (XCAR (submap), Qkeymap))
return;
map_parent = Fkeymap_parent (map);
/* If MAP's parent has something other than a keymap,
our own submap shadows it completely, so use nil as SUBMAP's parent. */
- if (! (CONSP (parent_entry) && EQ (XCONS (parent_entry)->car, Qkeymap)))
+ if (! (CONSP (parent_entry) && EQ (XCAR (parent_entry), Qkeymap)))
parent_entry = Qnil;
if (! EQ (parent_entry, submap))
if (EQ (tem, parent_entry))
return;
if (CONSP (tem)
- && EQ (XCONS (tem)->car, Qkeymap))
+ && EQ (XCAR (tem), Qkeymap))
submap_parent = tem;
else
break;
Lisp_Object t_binding;
t_binding = Qnil;
- for (tail = map; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = map; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object binding;
- binding = XCONS (tail)->car;
+ binding = XCAR (tail);
if (SYMBOLP (binding))
{
/* If NOINHERIT, stop finding prefix definitions
}
else if (CONSP (binding))
{
- if (EQ (XCONS (binding)->car, idx))
+ if (EQ (XCAR (binding), idx))
{
- val = XCONS (binding)->cdr;
- if (noprefix && CONSP (val) && EQ (XCONS (val)->car, Qkeymap))
+ val = XCDR (binding);
+ if (noprefix && CONSP (val) && EQ (XCAR (val), Qkeymap))
return Qnil;
if (CONSP (val))
fix_submap_inheritance (map, idx, val);
return val;
}
- if (t_ok && EQ (XCONS (binding)->car, Qt))
- t_binding = XCONS (binding)->cdr;
+ if (t_ok && EQ (XCAR (binding), Qt))
+ t_binding = XCDR (binding);
}
else if (VECTORP (binding))
{
if (NATNUMP (idx) && XFASTINT (idx) < XVECTOR (binding)->size)
{
val = XVECTOR (binding)->contents[XFASTINT (idx)];
- if (noprefix && CONSP (val) && EQ (XCONS (val)->car, Qkeymap))
+ if (noprefix && CONSP (val) && EQ (XCAR (val), Qkeymap))
return Qnil;
if (CONSP (val))
fix_submap_inheritance (map, idx, val);
| CHAR_SHIFT | CHAR_CTL | CHAR_META)))
{
val = Faref (binding, idx);
- if (noprefix && CONSP (val) && EQ (XCONS (val)->car, Qkeymap))
+ if (noprefix && CONSP (val) && EQ (XCAR (val), Qkeymap))
return Qnil;
if (CONSP (val))
fix_submap_inheritance (map, idx, val);
/* If we are preparing to dump, and DEF is a menu element
with a menu item indicator, copy it to ensure it is not pure. */
if (CONSP (def) && PURE_P (def)
- && (EQ (XCONS (def)->car, Qmenu_item) || STRINGP (XCONS (def)->car)))
- def = Fcons (XCONS (def)->car, XCONS (def)->cdr);
+ && (EQ (XCAR (def), Qmenu_item) || STRINGP (XCAR (def))))
+ def = Fcons (XCAR (def), XCDR (def));
- if (!CONSP (keymap) || ! EQ (XCONS (keymap)->car, Qkeymap))
+ if (!CONSP (keymap) || ! EQ (XCAR (keymap), Qkeymap))
error ("attempt to define a key in a non-keymap");
/* If idx is a list (some sort of mouse click, perhaps?),
Lisp_Object insertion_point;
insertion_point = keymap;
- for (tail = XCONS (keymap)->cdr; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = XCDR (keymap); CONSP (tail); tail = XCDR (tail))
{
Lisp_Object elt;
- elt = XCONS (tail)->car;
+ elt = XCAR (tail);
if (VECTORP (elt))
{
if (NATNUMP (idx) && XFASTINT (idx) < XVECTOR (elt)->size)
}
else if (CONSP (elt))
{
- if (EQ (idx, XCONS (elt)->car))
+ if (EQ (idx, XCAR (elt)))
{
- XCONS (elt)->cdr = def;
+ XCDR (elt) = def;
return def;
}
}
keymap_end:
/* We have scanned the entire keymap, and not found a binding for
IDX. Let's add one. */
- XCONS (insertion_point)->cdr
- = Fcons (Fcons (idx, def), XCONS (insertion_point)->cdr);
+ XCDR (insertion_point)
+ = Fcons (Fcons (idx, def), XCDR (insertion_point));
}
return def;
copy = Fcopy_alist (get_keymap (keymap));
- for (tail = copy; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = copy; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object elt;
- elt = XCONS (tail)->car;
+ elt = XCAR (tail);
if (CHAR_TABLE_P (elt))
{
Lisp_Object indices[3];
elt = Fcopy_sequence (elt);
- XCONS (tail)->car = elt;
+ XCAR (tail) = elt;
map_char_table (copy_keymap_1, Qnil, elt, elt, 0, indices);
}
int i;
elt = Fcopy_sequence (elt);
- XCONS (tail)->car = elt;
+ XCAR (tail) = elt;
for (i = 0; i < XVECTOR (elt)->size; i++)
if (!SYMBOLP (XVECTOR (elt)->contents[i])
XVECTOR (elt)->contents[i]
= Fcopy_keymap (XVECTOR (elt)->contents[i]);
}
- else if (CONSP (elt) && CONSP (XCONS (elt)->cdr))
+ else if (CONSP (elt) && CONSP (XCDR (elt)))
{
Lisp_Object tem;
- tem = XCONS (elt)->cdr;
+ tem = XCDR (elt);
/* Is this a new format menu item. */
- if (EQ (XCONS (tem)->car,Qmenu_item))
+ if (EQ (XCAR (tem),Qmenu_item))
{
/* Copy cell with menu-item marker. */
- XCONS (elt)->cdr
- = Fcons (XCONS (tem)->car, XCONS (tem)->cdr);
- elt = XCONS (elt)->cdr;
- tem = XCONS (elt)->cdr;
+ XCDR (elt)
+ = Fcons (XCAR (tem), XCDR (tem));
+ elt = XCDR (elt);
+ tem = XCDR (elt);
if (CONSP (tem))
{
/* Copy cell with menu-item name. */
- XCONS (elt)->cdr
- = Fcons (XCONS (tem)->car, XCONS (tem)->cdr);
- elt = XCONS (elt)->cdr;
- tem = XCONS (elt)->cdr;
+ XCDR (elt)
+ = Fcons (XCAR (tem), XCDR (tem));
+ elt = XCDR (elt);
+ tem = XCDR (elt);
};
if (CONSP (tem))
{
/* Copy cell with binding and if the binding is a keymap,
copy that. */
- XCONS (elt)->cdr
- = Fcons (XCONS (tem)->car, XCONS (tem)->cdr);
- elt = XCONS (elt)->cdr;
- tem = XCONS (elt)->car;
+ XCDR (elt)
+ = Fcons (XCAR (tem), XCDR (tem));
+ elt = XCDR (elt);
+ tem = XCAR (elt);
if (!(SYMBOLP (tem) || NILP (Fkeymapp (tem))))
- XCONS (elt)->car = Fcopy_keymap (tem);
- tem = XCONS (elt)->cdr;
- if (CONSP (tem) && CONSP (XCONS (tem)->car))
+ XCAR (elt) = Fcopy_keymap (tem);
+ tem = XCDR (elt);
+ if (CONSP (tem) && CONSP (XCAR (tem)))
/* Delete cache for key equivalences. */
- XCONS (elt)->cdr = XCONS (tem)->cdr;
+ XCDR (elt) = XCDR (tem);
}
}
else
/* It may be an old fomat menu item.
Skip the optional menu string.
*/
- if (STRINGP (XCONS (tem)->car))
+ if (STRINGP (XCAR (tem)))
{
/* Copy the cell, since copy-alist didn't go this deep. */
- XCONS (elt)->cdr
- = Fcons (XCONS (tem)->car, XCONS (tem)->cdr);
- elt = XCONS (elt)->cdr;
- tem = XCONS (elt)->cdr;
+ XCDR (elt)
+ = Fcons (XCAR (tem), XCDR (tem));
+ elt = XCDR (elt);
+ tem = XCDR (elt);
/* Also skip the optional menu help string. */
- if (CONSP (tem) && STRINGP (XCONS (tem)->car))
+ if (CONSP (tem) && STRINGP (XCAR (tem)))
{
- XCONS (elt)->cdr
- = Fcons (XCONS (tem)->car, XCONS (tem)->cdr);
- elt = XCONS (elt)->cdr;
- tem = XCONS (elt)->cdr;
+ XCDR (elt)
+ = Fcons (XCAR (tem), XCDR (tem));
+ elt = XCDR (elt);
+ tem = XCDR (elt);
}
/* There may also be a list that caches key equivalences.
Just delete it for the new keymap. */
if (CONSP (tem)
- && CONSP (XCONS (tem)->car)
- && (NILP (XCONS (XCONS (tem)->car)->car)
- || VECTORP (XCONS (XCONS (tem)->car)->car)))
- XCONS (elt)->cdr = XCONS (tem)->cdr;
+ && CONSP (XCAR (tem))
+ && (NILP (XCAR (XCAR (tem)))
+ || VECTORP (XCAR (XCAR (tem)))))
+ XCDR (elt) = XCDR (tem);
}
if (CONSP (elt)
- && ! SYMBOLP (XCONS (elt)->cdr)
- && ! NILP (Fkeymapp (XCONS (elt)->cdr)))
- XCONS (elt)->cdr = Fcopy_keymap (XCONS (elt)->cdr);
+ && ! SYMBOLP (XCDR (elt))
+ && ! NILP (Fkeymapp (XCDR (elt))))
+ XCDR (elt) = Fcopy_keymap (XCDR (elt));
}
}
make it define this key. */
Lisp_Object tail;
- for (tail = Fcdr (keymap); CONSP (tail); tail = XCONS (tail)->cdr)
- if (EQ (XCONS (tail)->car, Qkeymap))
+ for (tail = Fcdr (keymap); CONSP (tail); tail = XCDR (tail))
+ if (EQ (XCAR (tail), Qkeymap))
break;
if (!NILP (tail))
for (list_number = 0; list_number < 2; list_number++)
for (alist = lists[list_number];
CONSP (alist);
- alist = XCONS (alist)->cdr)
- if ((assoc = XCONS (alist)->car, CONSP (assoc))
- && (var = XCONS (assoc)->car, SYMBOLP (var))
+ alist = XCDR (alist))
+ if ((assoc = XCAR (alist), CONSP (assoc))
+ && (var = XCAR (assoc), SYMBOLP (var))
&& (val = find_symbol_value (var), ! EQ (val, Qunbound))
&& ! NILP (val))
{
/* Get the keymap definition--or nil if it is not defined. */
temp = internal_condition_case_1 (Findirect_function,
- XCONS (assoc)->cdr,
+ XCDR (assoc),
Qerror, current_minor_maps_error);
if (!NILP (temp))
{
This is a breadth-first traversal, where tail is the queue of
nodes, and maps accumulates a list of all nodes visited. */
- for (tail = maps; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = maps; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object thisseq, thismap;
Lisp_Object last;
&& XINT (last) >= prefixlen
&& EQ (Faref (thisseq, last), meta_prefix_char));
- for (; CONSP (thismap); thismap = XCONS (thismap)->cdr)
+ for (; CONSP (thismap); thismap = XCDR (thismap))
{
Lisp_Object elt;
- elt = XCONS (thismap)->car;
+ elt = XCAR (thismap);
QUIT;
/* This new sequence is the same length as
thisseq, so stick it in the list right
after this one. */
- XCONS (tail)->cdr
- = Fcons (Fcons (tem, cmd), XCONS (tail)->cdr);
+ XCDR (tail)
+ = Fcons (Fcons (tem, cmd), XCDR (tail));
}
else
{
{
register Lisp_Object cmd, tem, filter;
- cmd = get_keyelt (XCONS (elt)->cdr, 0);
+ cmd = get_keyelt (XCDR (elt), 0);
/* Ignore definitions that aren't keymaps themselves. */
tem = Fkeymapp (cmd);
if (!NILP (tem))
if (NILP (tem))
{
/* Let elt be the event defined by this map entry. */
- elt = XCONS (elt)->car;
+ elt = XCAR (elt);
/* If the last key in thisseq is meta-prefix-char, and
this entry is a binding for an ascii keystroke,
/* This new sequence is the same length as
thisseq, so stick it in the list right
after this one. */
- XCONS (tail)->cdr
- = Fcons (Fcons (tem, cmd), XCONS (tail)->cdr);
+ XCDR (tail)
+ = Fcons (Fcons (tem, cmd), XCDR (tail));
}
else
nconc2 (tail,
/* Now find just the maps whose access prefixes start with PREFIX. */
good_maps = Qnil;
- for (; CONSP (maps); maps = XCONS (maps)->cdr)
+ for (; CONSP (maps); maps = XCDR (maps))
{
Lisp_Object elt, thisseq;
- elt = XCONS (maps)->car;
- thisseq = XCONS (elt)->car;
+ elt = XCAR (maps);
+ thisseq = XCAR (elt);
/* The access prefix must be at least as long as PREFIX,
and the first elements must match those of PREFIX. */
if (XINT (Flength (thisseq)) >= prefixlen)
if (NILP (cmd))
return;
- maps = XCONS (args)->car;
- tail = XCONS (XCONS (args)->cdr)->car;
- thisseq = XCONS (XCONS (args)->cdr)->cdr;
+ maps = XCAR (args);
+ tail = XCAR (XCDR (args));
+ thisseq = XCDR (XCDR (args));
tem = Fkeymapp (cmd);
if (!NILP (tem))
for (i = 0; i < len; i++)
{
- args[i * 2] = Fsingle_key_description (XCONS (keys)->car);
+ args[i * 2] = Fsingle_key_description (XCAR (keys));
args[i * 2 + 1] = sep;
- keys = XCONS (keys)->cdr;
+ keys = XCDR (keys);
}
}
else
minors = Fnreverse (Fcurrent_minor_mode_maps ());
while (!NILP (minors))
{
- maps = nconc2 (Faccessible_keymaps (get_keymap (XCONS (minors)->car),
+ maps = nconc2 (Faccessible_keymaps (get_keymap (XCAR (minors)),
Qnil),
maps);
- minors = XCONS (minors)->cdr;
+ minors = XCDR (minors);
}
}
advance map to the next element until i indicates that we
have finished off the vector. */
Lisp_Object elt, key, binding;
- elt = XCONS (map)->car;
- map = XCONS (map)->cdr;
+ elt = XCAR (map);
+ map = XCDR (map);
sequences = Qnil;
map_char_table (where_is_internal_2, Qnil, elt, args,
0, indices);
- sequences = XCONS (XCONS (XCONS (args)->car)->cdr)->cdr;
+ sequences = XCDR (XCDR (XCAR (args)));
}
else if (CONSP (elt))
{
Lisp_Object sequence;
- key = XCONS (elt)->car;
- binding = XCONS (elt)->cdr;
+ key = XCAR (elt);
+ binding = XCDR (elt);
sequence = where_is_internal_1 (binding, key, definition,
noindirect, keymap, this,
}
- for (; ! NILP (sequences); sequences = XCONS (sequences)->cdr)
+ for (; ! NILP (sequences); sequences = XCDR (sequences))
{
Lisp_Object sequence;
- sequence = XCONS (sequences)->car;
+ sequence = XCAR (sequences);
/* It is a true unshadowed match. Record it, unless it's already
been seen (as could happen when inheriting keymaps). */
Lisp_Object result, sequence;
int nomenus, last_is_meta;
- result = XCONS (XCONS (XCONS (args)->car)->cdr)->cdr;
- definition = XCONS (XCONS (XCONS (args)->car)->car)->car;
- noindirect = XCONS (XCONS (XCONS (args)->car)->car)->cdr;
- keymap = XCONS (XCONS (XCONS (args)->car)->cdr)->car;
- this = XCONS (XCONS (XCONS (args)->cdr)->car)->car;
- last = XCONS (XCONS (XCONS (args)->cdr)->car)->cdr;
- nomenus = XFASTINT (XCONS (XCONS (XCONS (args)->cdr)->cdr)->car);
- last_is_meta = XFASTINT (XCONS (XCONS (XCONS (args)->cdr)->cdr)->cdr);
+ result = XCDR (XCDR (XCAR (args)));
+ definition = XCAR (XCAR (XCAR (args)));
+ noindirect = XCDR (XCAR (XCAR (args)));
+ keymap = XCAR (XCDR (XCAR (args)));
+ this = XCAR (XCAR (XCDR (args)));
+ last = XCDR (XCAR (XCDR (args)));
+ nomenus = XFASTINT (XCAR (XCDR (XCDR (args))));
+ last_is_meta = XFASTINT (XCDR (XCDR (XCDR (args))));
sequence = where_is_internal_1 (binding, key, definition, noindirect, keymap,
this, last, nomenus, last_is_meta);
if (!NILP (sequence))
- XCONS (XCONS (XCONS (args)->car)->cdr)->cdr
+ XCDR (XCDR (XCAR (args)))
= Fcons (sequence, result);
}
}
/* If the contents are (menu-item ...) or (STRING ...), reject. */
if (CONSP (definition)
- && (EQ (XCONS (definition)->car,Qmenu_item)
- || STRINGP (XCONS (definition)->car)))
+ && (EQ (XCAR (definition),Qmenu_item)
+ || STRINGP (XCAR (definition))))
return Qnil;
}
else
You type Translation\n\
-------- -----------\n";
- descbuf = XCONS (arg)->car;
- arg = XCONS (arg)->cdr;
- prefix = XCONS (arg)->car;
- arg = XCONS (arg)->cdr;
- nomenu = NILP (XCONS (arg)->car);
+ descbuf = XCAR (arg);
+ arg = XCDR (arg);
+ prefix = XCAR (arg);
+ arg = XCDR (arg);
+ nomenu = NILP (XCAR (arg));
shadow = Qnil;
GCPRO1 (shadow);
Lisp_Object list;
/* Delete from MAPS each element that is for the menu bar. */
- for (list = maps; !NILP (list); list = XCONS (list)->cdr)
+ for (list = maps; !NILP (list); list = XCDR (list))
{
Lisp_Object elt, prefix, tem;
sub_shadows = Qnil;
- for (tail = shadow; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = shadow; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object shmap;
- shmap = XCONS (tail)->car;
+ shmap = XCAR (tail);
/* If the sequence by which we reach this keymap is zero-length,
then the shadow map for this keymap is just SHADOW. */
{
Lisp_Object tail, value;
- for (tail = shadow; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = shadow; CONSP (tail); tail = XCDR (tail))
{
- value = Flookup_key (XCONS (tail)->car, key, flag);
+ value = Flookup_key (XCAR (tail), key, flag);
if (!NILP (value))
return value;
}
GCPRO3 (elt_prefix, definition, kludge);
- for (tail = map; CONSP (tail); tail = XCONS (tail)->cdr)
+ for (tail = map; CONSP (tail); tail = XCDR (tail))
{
QUIT;
- if (VECTORP (XCONS (tail)->car)
- || CHAR_TABLE_P (XCONS (tail)->car))
- describe_vector (XCONS (tail)->car,
+ if (VECTORP (XCAR (tail))
+ || CHAR_TABLE_P (XCAR (tail)))
+ describe_vector (XCAR (tail),
elt_prefix, elt_describer, partial, shadow, map,
(int *)0, 0);
- else if (CONSP (XCONS (tail)->car))
+ else if (CONSP (XCAR (tail)))
{
- event = XCONS (XCONS (tail)->car)->car;
+ event = XCAR (XCAR (tail));
/* Ignore bindings whose "keys" are not really valid events.
(We get these in the frames and buffers menu.) */
if (nomenu && EQ (event, Qmenu_bar))
continue;
- definition = get_keyelt (XCONS (XCONS (tail)->car)->cdr, 0);
+ definition = get_keyelt (XCDR (XCAR (tail)), 0);
/* Don't show undefined commands or suppressed commands. */
if (NILP (definition)) continue;
for alignment purposes. */
(*elt_describer) (definition);
}
- else if (EQ (XCONS (tail)->car, Qkeymap))
+ else if (EQ (XCAR (tail), Qkeymap))
{
/* The same keymap might be in the structure twice, if we're
using an inherited keymap. So skip anything we've already
encountered. */
tem = Fassq (tail, *seen);
- if (CONSP (tem) && !NILP (Fequal (XCONS (tem)->car, keys)))
+ if (CONSP (tem) && !NILP (Fequal (XCAR (tem), keys)))
break;
*seen = Fcons (Fcons (tail, keys), *seen);
}