Commit c0f51373 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(list2, list3, list4, list5): New functions.

parent a8ad43aa
......@@ -718,6 +718,37 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
cons_cells_consed++;
return val;
}
/* Make a list of 2, 3, 4 or 5 specified objects. */
Lisp_Object
list2 (arg1, arg2)
Lisp_Object arg1, arg2;
{
return Fcons (arg1, Fcons (arg2, Qnil));
}
Lisp_Object
list3 (arg1, arg2, arg3)
Lisp_Object arg1, arg2, arg3;
{
return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil)));
}
Lisp_Object
list4 (arg1, arg2, arg3, arg4)
Lisp_Object arg1, arg2, arg3, arg4;
{
return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil))));
}
Lisp_Object
list5 (arg1, arg2, arg3, arg4, arg5)
Lisp_Object arg1, arg2, arg3, arg4, arg5;
{
return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4,
Fcons (arg5, Qnil)))));
}
DEFUN ("list", Flist, Slist, 0, MANY, 0,
"Return a newly created list with specified arguments as elements.\n\
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment