Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0551bde3
Commit
0551bde3
authored
Apr 07, 1997
by
Kenichi Handa
Browse files
(Fmake_char_table): Adjusted for the new structure of
Lisp_Char_Table. (make_sub_char_table): New function.
parent
a1942d88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
src/alloc.c
src/alloc.c
+18
-2
No files found.
src/alloc.c
View file @
0551bde3
...
...
@@ -778,20 +778,36 @@ The property's value should be an integer between 0 and 10.")
Lisp_Object
vector
;
Lisp_Object
n
;
CHECK_SYMBOL
(
purpose
,
1
);
/* For a deeper char-table, PURPOSE can be nil. */
n
=
NILP
(
purpose
)
?
0
:
Fget
(
purpose
,
Qchar_table_extra_slots
);
n
=
Fget
(
purpose
,
Qchar_table_extra_slots
);
CHECK_NUMBER
(
n
,
0
);
if
(
XINT
(
n
)
<
0
||
XINT
(
n
)
>
10
)
args_out_of_range
(
n
,
Qnil
);
/* Add 2 to the size for the defalt and parent slots. */
vector
=
Fmake_vector
(
make_number
(
CHAR_TABLE_STANDARD_SLOTS
+
XINT
(
n
)),
init
);
XCHAR_TABLE
(
vector
)
->
top
=
Qt
;
XCHAR_TABLE
(
vector
)
->
parent
=
Qnil
;
XCHAR_TABLE
(
vector
)
->
purpose
=
purpose
;
XSETCHAR_TABLE
(
vector
,
XCHAR_TABLE
(
vector
));
return
vector
;
}
/* Return a newly created sub char table with default value DEFALT.
Since a sub char table does not appear as a top level Emacs Lisp
object, we don't need a Lisp interface to make it. */
Lisp_Object
make_sub_char_table
(
defalt
)
Lisp_Object
defalt
;
{
Lisp_Object
vector
=
Fmake_vector
(
make_number
(
SUB_CHAR_TABLE_STANDARD_SLOTS
),
Qnil
);
XCHAR_TABLE
(
vector
)
->
top
=
Qnil
;
XCHAR_TABLE
(
vector
)
->
defalt
=
defalt
;
XSETCHAR_TABLE
(
vector
,
XCHAR_TABLE
(
vector
));
return
vector
;
}
DEFUN
(
"vector"
,
Fvector
,
Svector
,
0
,
MANY
,
0
,
"Return a newly created vector with specified arguments as elements.
\n
\
Any number of arguments, even zero arguments, are allowed."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment