Mercurial > hg > xemacs-beta
comparison src/chartab.c @ 3879:f73b455b1472
[xemacs-hg @ 2007-03-25 15:34:59 by stephent]
Olivier's fix for syntax tables. <20070324221053.GA48218@dspnet.fr.eu.org>
author | stephent |
---|---|
date | Sun, 25 Mar 2007 15:35:06 +0000 |
parents | d830788d6a2c |
children | 1b6a5c6e012d |
comparison
equal
deleted
inserted
replaced
3878:91cb5170601e | 3879:f73b455b1472 |
---|---|
666 Lisp_Object obj; | 666 Lisp_Object obj; |
667 int i; | 667 int i; |
668 | 668 |
669 CHECK_CHAR_TABLE (char_table); | 669 CHECK_CHAR_TABLE (char_table); |
670 ct = XCHAR_TABLE (char_table); | 670 ct = XCHAR_TABLE (char_table); |
671 assert(!ct->mirror_table_p); | |
671 ctnew = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table); | 672 ctnew = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table); |
672 ctnew->type = ct->type; | 673 ctnew->type = ct->type; |
673 ctnew->parent = ct->parent; | 674 ctnew->parent = ct->parent; |
674 ctnew->default_ = ct->default_; | 675 ctnew->default_ = ct->default_; |
675 ctnew->mirror_table_p = ct->mirror_table_p; | 676 ctnew->mirror_table_p = 0; |
676 obj = wrap_char_table (ctnew); | 677 obj = wrap_char_table (ctnew); |
677 | 678 |
678 for (i = 0; i < NUM_ASCII_CHARS; i++) | 679 for (i = 0; i < NUM_ASCII_CHARS; i++) |
679 { | 680 { |
680 Lisp_Object new_ = ct->ascii[i]; | 681 Lisp_Object new_ = ct->ascii[i]; |
695 ctnew->level1[i] = new_; | 696 ctnew->level1[i] = new_; |
696 } | 697 } |
697 | 698 |
698 #endif /* MULE */ | 699 #endif /* MULE */ |
699 | 700 |
700 if (!ct->mirror_table_p && CHAR_TABLEP (ct->mirror_table)) | 701 if (ct->mirror_table != Qnil) |
701 { | 702 { |
702 ctnew->mirror_table = Fcopy_char_table (ct->mirror_table); | 703 ctnew->mirror_table = Fmake_char_table (Qgeneric); |
704 set_char_table_default (ctnew->mirror_table, make_int (Sword)); | |
703 XCHAR_TABLE (ctnew->mirror_table)->mirror_table = obj; | 705 XCHAR_TABLE (ctnew->mirror_table)->mirror_table = obj; |
706 XCHAR_TABLE (ctnew->mirror_table)->mirror_table_p = 1; | |
707 XCHAR_TABLE (ctnew->mirror_table)->dirty = 1; | |
704 } | 708 } |
705 else | 709 else |
706 ctnew->mirror_table = ct->mirror_table; | 710 ctnew->mirror_table = Qnil; |
711 | |
707 ctnew->next_table = Qnil; | 712 ctnew->next_table = Qnil; |
708 if (ctnew->type == CHAR_TABLE_TYPE_SYNTAX) | 713 if (ctnew->type == CHAR_TABLE_TYPE_SYNTAX) |
709 { | 714 { |
710 ctnew->next_table = Vall_syntax_tables; | 715 ctnew->next_table = Vall_syntax_tables; |
711 Vall_syntax_tables = obj; | 716 Vall_syntax_tables = obj; |