]> git.eshelyaron.com Git - emacs.git/commitdiff
(Vscript_alist): This variable deleted.
authorKenichi Handa <handa@m17n.org>
Fri, 26 Jul 2002 06:20:29 +0000 (06:20 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 26 Jul 2002 06:20:29 +0000 (06:20 +0000)
(Vchar_script_table, Qchar_script_table): New variable.
(syms_of_character): Declare Vchar_script_table as a lisp variable
and initialize it.

src/ChangeLog
src/character.c

index 679f9bc440ab8a8928954578338209376b80100d..6514a9784631251d0b7e2d0504108959c743deed 100644 (file)
@@ -11,6 +11,8 @@
 
        * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
 
+       * character.h (Vchar_script_table): Extern it.
+
        * character.c (Vscript_alist): This variable deleted.
        (Vchar_script_table, Qchar_script_table): New variable.
        (syms_of_character): Declare Vchar_script_table as a lisp variable
index 6af2698d6b05b3db6b31b7a354fe98ccb640fbff..eb0f8c84d04fa4f6a279b3fcfcd73f1020afa72f 100644 (file)
@@ -77,8 +77,11 @@ Lisp_Object Vchar_direction_table;
 unsigned char *_fetch_multibyte_char_p;
 int _fetch_multibyte_char_len;
 
-/* Alist of scripts vs character ranges.  */
-Lisp_Object Vscript_alist;
+/* Char table of scripts.  */
+Lisp_Object Vchar_script_table;
+
+static Lisp_Object Qchar_script_table;
+
 
 \f
 
@@ -920,13 +923,17 @@ A char-table for width (columns) of each character.  */);
               doc: /* A char-table for each printable character.  */);
   Vprintable_chars = Fmake_char_table (Qnil, Qnil);
 
-  DEFVAR_LISP ("script-alist", &Vscript_alist,
-              doc: /* Alist of scripts vs the corresponding character ranges.
-Each element has this form:
-       ( SCRIPT (FROM-1 . TO-1) (FROM-2 . TO-2) ...)
-SCRIPT is a symbol representing a script name.
-FROM-n and TO-n specifies ranges of characters that belongs to SCRIPT.  */);
-  Vscript_alist = Qnil;
+  DEFVAR_LISP ("char-script-table", &Vchar_script_table,
+              doc: /* Char table of script symbols.
+It has one extra slot whose value is a list of script symbols.  */);
+
+  /* Intern this now in case it isn't already done.
+     Setting this variable twice is harmless.
+     But don't staticpro it here--that is done in alloc.c.  */
+  Qchar_table_extra_slots = intern ("char-table-extra-slots");
+  DEFSYM (Qchar_script_table, "char-script-table");
+  Fput (Qchar_script_table, Qchar_table_extra_slots, make_number (1));
+  Vchar_script_table = Fmake_char_table (Qchar_script_table, Qnil);
 }
 
 #endif /* emacs */