if (STRINGP (sequence))
val = SCHARS (sequence);
+ else if (CONSP (sequence))
+ val = list_length (sequence);
+ else if (NILP (sequence))
+ val = 0;
else if (VECTORP (sequence))
val = ASIZE (sequence);
else if (CHAR_TABLE_P (sequence))
val = bool_vector_size (sequence);
else if (COMPILEDP (sequence) || RECORDP (sequence))
val = PVSIZE (sequence);
- else if (CONSP (sequence))
- val = list_length (sequence);
- else if (NILP (sequence))
- val = 0;
else
wrong_type_argument (Qsequencep, sequence);
does not modify the argument. */)
(Lisp_Object elt, Lisp_Object seq)
{
- if (VECTORP (seq))
+ if (NILP (seq))
+ ;
+ else if (CONSP (seq))
+ {
+ Lisp_Object prev = Qnil, tail = seq;
+
+ FOR_EACH_TAIL (tail)
+ {
+ if (!NILP (Fequal (elt, XCAR (tail))))
+ {
+ if (NILP (prev))
+ seq = XCDR (tail);
+ else
+ Fsetcdr (prev, XCDR (tail));
+ }
+ else
+ prev = tail;
+ }
+ CHECK_LIST_END (tail, seq);
+ }
+ else if (VECTORP (seq))
{
ptrdiff_t n = 0;
ptrdiff_t size = ASIZE (seq);
}
}
else
- {
- Lisp_Object prev = Qnil, tail = seq;
-
- FOR_EACH_TAIL (tail)
- {
- if (!NILP (Fequal (elt, XCAR (tail))))
- {
- if (NILP (prev))
- seq = XCDR (tail);
- else
- Fsetcdr (prev, XCDR (tail));
- }
- else
- prev = tail;
- }
- CHECK_LIST_END (tail, seq);
- }
+ wrong_type_argument (Qsequencep, seq);
return seq;
}
{
if (NILP (seq))
return seq;
- else if (STRINGP (seq))
- return Freverse (seq);
else if (CONSP (seq))
{
Lisp_Object prev, tail, next;
bool_vector_set (seq, size - i - 1, tem);
}
}
+ else if (STRINGP (seq))
+ return Freverse (seq);
else
wrong_type_argument (Qarrayp, seq);
return seq;