diff options
| author | Richard M. Stallman | 1998-02-05 03:28:36 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-02-05 03:28:36 +0000 |
| commit | c0f51373af15ff201a9d95efcb43a9ff4b2954d4 (patch) | |
| tree | ce865658581786f87f0301c38fd7aa5b51d4ef0d | |
| parent | a8ad43aa290bffa435821f31ddbec8d283d1d859 (diff) | |
| download | emacs-c0f51373af15ff201a9d95efcb43a9ff4b2954d4.tar.gz emacs-c0f51373af15ff201a9d95efcb43a9ff4b2954d4.zip | |
(list2, list3, list4, list5): New functions.
| -rw-r--r-- | src/alloc.c | 31 |
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, | |||
| 718 | cons_cells_consed++; | 718 | cons_cells_consed++; |
| 719 | return val; | 719 | return val; |
| 720 | } | 720 | } |
| 721 | |||
| 722 | /* Make a list of 2, 3, 4 or 5 specified objects. */ | ||
| 723 | |||
| 724 | Lisp_Object | ||
| 725 | list2 (arg1, arg2) | ||
| 726 | Lisp_Object arg1, arg2; | ||
| 727 | { | ||
| 728 | return Fcons (arg1, Fcons (arg2, Qnil)); | ||
| 729 | } | ||
| 730 | |||
| 731 | Lisp_Object | ||
| 732 | list3 (arg1, arg2, arg3) | ||
| 733 | Lisp_Object arg1, arg2, arg3; | ||
| 734 | { | ||
| 735 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil))); | ||
| 736 | } | ||
| 737 | |||
| 738 | Lisp_Object | ||
| 739 | list4 (arg1, arg2, arg3, arg4) | ||
| 740 | Lisp_Object arg1, arg2, arg3, arg4; | ||
| 741 | { | ||
| 742 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil)))); | ||
| 743 | } | ||
| 744 | |||
| 745 | Lisp_Object | ||
| 746 | list5 (arg1, arg2, arg3, arg4, arg5) | ||
| 747 | Lisp_Object arg1, arg2, arg3, arg4, arg5; | ||
| 748 | { | ||
| 749 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, | ||
| 750 | Fcons (arg5, Qnil))))); | ||
| 751 | } | ||
| 721 | 752 | ||
| 722 | DEFUN ("list", Flist, Slist, 0, MANY, 0, | 753 | DEFUN ("list", Flist, Slist, 0, MANY, 0, |
| 723 | "Return a newly created list with specified arguments as elements.\n\ | 754 | "Return a newly created list with specified arguments as elements.\n\ |