Commit 9da95d53 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(copy_category_table): Copy also the first extra slot

(vector of docstrings).
(Fcopy_category_table): Do not give unused second arg to
copy_category_table.
parent 9036eb45
...@@ -187,7 +187,7 @@ This is the one used for new buffers.") ...@@ -187,7 +187,7 @@ This is the one used for new buffers.")
/* Return a copy of category table TABLE. We can't simply use the /* Return a copy of category table TABLE. We can't simply use the
function copy-sequence because no contents should be shared between function copy-sequence because no contents should be shared between
the original and the copy. This function is called recursively by the original and the copy. This function is called recursively by
biding TABLE to a sub char table. */ binding TABLE to a sub char table. */
Lisp_Object Lisp_Object
copy_category_table (table) copy_category_table (table)
...@@ -207,6 +207,12 @@ copy_category_table (table) ...@@ -207,6 +207,12 @@ copy_category_table (table)
if (!NILP (tmp = XCHAR_TABLE (table)->contents[i])) if (!NILP (tmp = XCHAR_TABLE (table)->contents[i]))
XCHAR_TABLE (table)->contents[i] = Fcopy_sequence (tmp); XCHAR_TABLE (table)->contents[i] = Fcopy_sequence (tmp);
to = CHAR_TABLE_ORDINARY_SLOTS; to = CHAR_TABLE_ORDINARY_SLOTS;
/* Also copy the first (and sole) extra slot. It is a vector
containing docstring of each category. */
Fset_char_table_extra_slot
(table, make_number (0),
Fcopy_sequence (Fchar_table_extra_slot (table, make_number (0))));
} }
else else
{ {
...@@ -241,7 +247,7 @@ It is a copy of the TABLE, which defaults to the standard category table.") ...@@ -241,7 +247,7 @@ It is a copy of the TABLE, which defaults to the standard category table.")
else else
table = Vstandard_category_table; table = Vstandard_category_table;
return copy_category_table (table, 1); return copy_category_table (table);
} }
DEFUN ("set-category-table", Fset_category_table, Sset_category_table, 1, 1, 0, DEFUN ("set-category-table", Fset_category_table, Sset_category_table, 1, 1, 0,
...@@ -606,7 +612,7 @@ init_category_once () ...@@ -606,7 +612,7 @@ init_category_once ()
Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil); Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil);
/* Set a category set which contains nothing to the default. */ /* Set a category set which contains nothing to the default. */
XCHAR_TABLE (Vstandard_category_table)->defalt = MAKE_CATEGORY_SET; XCHAR_TABLE (Vstandard_category_table)->defalt = MAKE_CATEGORY_SET;
Fset_char_table_extra_slot (Vstandard_category_table, 0, Fset_char_table_extra_slot (Vstandard_category_table, make_number (0),
Fmake_vector (make_number (95), Qnil)); Fmake_vector (make_number (95), Qnil));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment