diff options
| author | Kenichi Handa | 1997-04-07 07:12:13 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-04-07 07:12:13 +0000 |
| commit | 0551bde3a4535c6880a3924ec29b8ffd1a22534b (patch) | |
| tree | 63990bde0a9bbbdc8c3e509f0467544a81e97dc0 /src/alloc.c | |
| parent | a1942d88594c7f2fa188077de4ef9f33a41a4437 (diff) | |
| download | emacs-0551bde3a4535c6880a3924ec29b8ffd1a22534b.tar.gz emacs-0551bde3a4535c6880a3924ec29b8ffd1a22534b.zip | |
(Fmake_char_table): Adjusted for the new structure of
Lisp_Char_Table.
(make_sub_char_table): New function.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 0e0241124bf..ad9e2dd1401 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -778,20 +778,36 @@ The property's value should be an integer between 0 and 10.") | |||
| 778 | Lisp_Object vector; | 778 | Lisp_Object vector; |
| 779 | Lisp_Object n; | 779 | Lisp_Object n; |
| 780 | CHECK_SYMBOL (purpose, 1); | 780 | CHECK_SYMBOL (purpose, 1); |
| 781 | /* For a deeper char-table, PURPOSE can be nil. */ | 781 | n = Fget (purpose, Qchar_table_extra_slots); |
| 782 | n = NILP (purpose) ? 0 : Fget (purpose, Qchar_table_extra_slots); | ||
| 783 | CHECK_NUMBER (n, 0); | 782 | CHECK_NUMBER (n, 0); |
| 784 | if (XINT (n) < 0 || XINT (n) > 10) | 783 | if (XINT (n) < 0 || XINT (n) > 10) |
| 785 | args_out_of_range (n, Qnil); | 784 | args_out_of_range (n, Qnil); |
| 786 | /* Add 2 to the size for the defalt and parent slots. */ | 785 | /* Add 2 to the size for the defalt and parent slots. */ |
| 787 | vector = Fmake_vector (make_number (CHAR_TABLE_STANDARD_SLOTS + XINT (n)), | 786 | vector = Fmake_vector (make_number (CHAR_TABLE_STANDARD_SLOTS + XINT (n)), |
| 788 | init); | 787 | init); |
| 788 | XCHAR_TABLE (vector)->top = Qt; | ||
| 789 | XCHAR_TABLE (vector)->parent = Qnil; | 789 | XCHAR_TABLE (vector)->parent = Qnil; |
| 790 | XCHAR_TABLE (vector)->purpose = purpose; | 790 | XCHAR_TABLE (vector)->purpose = purpose; |
| 791 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); | 791 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); |
| 792 | return vector; | 792 | return vector; |
| 793 | } | 793 | } |
| 794 | 794 | ||
| 795 | /* Return a newly created sub char table with default value DEFALT. | ||
| 796 | Since a sub char table does not appear as a top level Emacs Lisp | ||
| 797 | object, we don't need a Lisp interface to make it. */ | ||
| 798 | |||
| 799 | Lisp_Object | ||
| 800 | make_sub_char_table (defalt) | ||
| 801 | Lisp_Object defalt; | ||
| 802 | { | ||
| 803 | Lisp_Object vector | ||
| 804 | = Fmake_vector (make_number (SUB_CHAR_TABLE_STANDARD_SLOTS), Qnil); | ||
| 805 | XCHAR_TABLE (vector)->top = Qnil; | ||
| 806 | XCHAR_TABLE (vector)->defalt = defalt; | ||
| 807 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); | ||
| 808 | return vector; | ||
| 809 | } | ||
| 810 | |||
| 795 | DEFUN ("vector", Fvector, Svector, 0, MANY, 0, | 811 | DEFUN ("vector", Fvector, Svector, 0, MANY, 0, |
| 796 | "Return a newly created vector with specified arguments as elements.\n\ | 812 | "Return a newly created vector with specified arguments as elements.\n\ |
| 797 | Any number of arguments, even zero arguments, are allowed.") | 813 | Any number of arguments, even zero arguments, are allowed.") |