aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1997-10-27 04:34:26 +0000
committerKenichi Handa1997-10-27 04:34:26 +0000
commit9da95d532d009eef58d7655d101ae0710c9034e2 (patch)
tree4eb1008cc9f2998ae83bfa1e6ab3d5d89108b469 /src
parent9036eb4502cc763993b219fcb74b546a2b5ab999 (diff)
downloademacs-9da95d532d009eef58d7655d101ae0710c9034e2.tar.gz
emacs-9da95d532d009eef58d7655d101ae0710c9034e2.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/category.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/category.c b/src/category.c
index 5a3507e985f..94739b0eff7 100644
--- a/src/category.c
+++ b/src/category.c
@@ -187,7 +187,7 @@ This is the one used for new buffers.")
187/* Return a copy of category table TABLE. We can't simply use the 187/* Return a copy of category table TABLE. We can't simply use the
188 function copy-sequence because no contents should be shared between 188 function copy-sequence because no contents should be shared between
189 the original and the copy. This function is called recursively by 189 the original and the copy. This function is called recursively by
190 biding TABLE to a sub char table. */ 190 binding TABLE to a sub char table. */
191 191
192Lisp_Object 192Lisp_Object
193copy_category_table (table) 193copy_category_table (table)
@@ -207,6 +207,12 @@ copy_category_table (table)
207 if (!NILP (tmp = XCHAR_TABLE (table)->contents[i])) 207 if (!NILP (tmp = XCHAR_TABLE (table)->contents[i]))
208 XCHAR_TABLE (table)->contents[i] = Fcopy_sequence (tmp); 208 XCHAR_TABLE (table)->contents[i] = Fcopy_sequence (tmp);
209 to = CHAR_TABLE_ORDINARY_SLOTS; 209 to = CHAR_TABLE_ORDINARY_SLOTS;
210
211 /* Also copy the first (and sole) extra slot. It is a vector
212 containing docstring of each category. */
213 Fset_char_table_extra_slot
214 (table, make_number (0),
215 Fcopy_sequence (Fchar_table_extra_slot (table, make_number (0))));
210 } 216 }
211 else 217 else
212 { 218 {
@@ -241,7 +247,7 @@ It is a copy of the TABLE, which defaults to the standard category table.")
241 else 247 else
242 table = Vstandard_category_table; 248 table = Vstandard_category_table;
243 249
244 return copy_category_table (table, 1); 250 return copy_category_table (table);
245} 251}
246 252
247DEFUN ("set-category-table", Fset_category_table, Sset_category_table, 1, 1, 0, 253DEFUN ("set-category-table", Fset_category_table, Sset_category_table, 1, 1, 0,
@@ -606,7 +612,7 @@ init_category_once ()
606 Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil); 612 Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil);
607 /* Set a category set which contains nothing to the default. */ 613 /* Set a category set which contains nothing to the default. */
608 XCHAR_TABLE (Vstandard_category_table)->defalt = MAKE_CATEGORY_SET; 614 XCHAR_TABLE (Vstandard_category_table)->defalt = MAKE_CATEGORY_SET;
609 Fset_char_table_extra_slot (Vstandard_category_table, 0, 615 Fset_char_table_extra_slot (Vstandard_category_table, make_number (0),
610 Fmake_vector (make_number (95), Qnil)); 616 Fmake_vector (make_number (95), Qnil));
611} 617}
612 618