changeset 20849:3b2f72ed135c

(list2, list3, list4, list5): New functions.
author Richard M. Stallman <rms@gnu.org>
date Thu, 05 Feb 1998 03:28:36 +0000
parents 4c3e62fe8898
children ffbaaba0bf76
files src/alloc.c
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Thu Feb 05 03:26:45 1998 +0000
+++ b/src/alloc.c	Thu Feb 05 03:28:36 1998 +0000
@@ -718,6 +718,37 @@
   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\