summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-02-05 03:28:36 +0000
committerRichard M. Stallman <rms@gnu.org>1998-02-05 03:28:36 +0000
commit3c9688e827690d7ed7a4beddae16a83ccc216a7a (patch)
treea3570a88eb4b2f7c58e798d4921aee3e00d66330
parent7d149550594bd42dbd7eceda985242f1506a84b5 (diff)
downloademacs-3c9688e827690d7ed7a4beddae16a83ccc216a7a.tar.gz
(list2, list3, list4, list5): New functions.
-rw-r--r--src/alloc.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 9b84a7e51f8..fa5a3461fd7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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\