diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/casetab.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/casetab.c b/src/casetab.c index fa6ad91a155..c24fd05805e 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -35,7 +35,7 @@ See `set-case-table' for more information on these data structures.") | |||
| 35 | (table) | 35 | (table) |
| 36 | Lisp_Object table; | 36 | Lisp_Object table; |
| 37 | { | 37 | { |
| 38 | Lisp_Object down, up, canon, eqv; | 38 | Lisp_Object up, canon, eqv; |
| 39 | 39 | ||
| 40 | if (! CHAR_TABLE_P (table)) | 40 | if (! CHAR_TABLE_P (table)) |
| 41 | return Qnil; | 41 | return Qnil; |
| @@ -68,8 +68,6 @@ DEFUN ("current-case-table", Fcurrent_case_table, Scurrent_case_table, 0, 0, 0, | |||
| 68 | "Return the case table of the current buffer.") | 68 | "Return the case table of the current buffer.") |
| 69 | () | 69 | () |
| 70 | { | 70 | { |
| 71 | Lisp_Object down, up, canon, eqv; | ||
| 72 | |||
| 73 | return current_buffer->downcase_table; | 71 | return current_buffer->downcase_table; |
| 74 | } | 72 | } |
| 75 | 73 | ||
| @@ -119,7 +117,7 @@ set_case_table (table, standard) | |||
| 119 | Lisp_Object table; | 117 | Lisp_Object table; |
| 120 | int standard; | 118 | int standard; |
| 121 | { | 119 | { |
| 122 | Lisp_Object down, up, canon, eqv; | 120 | Lisp_Object up, canon, eqv; |
| 123 | 121 | ||
| 124 | check_case_table (table); | 122 | check_case_table (table); |
| 125 | 123 | ||
| @@ -130,7 +128,7 @@ set_case_table (table, standard) | |||
| 130 | if (NILP (up)) | 128 | if (NILP (up)) |
| 131 | { | 129 | { |
| 132 | up = Fmake_char_table (Qcase_table, Qnil); | 130 | up = Fmake_char_table (Qcase_table, Qnil); |
| 133 | compute_trt_inverse (XCHAR_TABLE (down), XCHAR_TABLE (up)); | 131 | compute_trt_inverse (XCHAR_TABLE (table), XCHAR_TABLE (up)); |
| 134 | XCHAR_TABLE (table)->extras[0] = up; | 132 | XCHAR_TABLE (table)->extras[0] = up; |
| 135 | } | 133 | } |
| 136 | 134 | ||
| @@ -138,9 +136,9 @@ set_case_table (table, standard) | |||
| 138 | { | 136 | { |
| 139 | register int i; | 137 | register int i; |
| 140 | Lisp_Object *upvec = XCHAR_TABLE (up)->contents; | 138 | Lisp_Object *upvec = XCHAR_TABLE (up)->contents; |
| 141 | Lisp_Object *downvec = XCHAR_TABLE (down)->contents; | 139 | Lisp_Object *downvec = XCHAR_TABLE (table)->contents; |
| 142 | 140 | ||
| 143 | up = Fmake_char_table (Qcase_table, Qnil); | 141 | canon = Fmake_char_table (Qcase_table, Qnil); |
| 144 | 142 | ||
| 145 | /* Set up the CANON vector; for each character, | 143 | /* Set up the CANON vector; for each character, |
| 146 | this sequence of upcasing and downcasing ought to | 144 | this sequence of upcasing and downcasing ought to |
| @@ -154,13 +152,13 @@ set_case_table (table, standard) | |||
| 154 | { | 152 | { |
| 155 | eqv = Fmake_char_table (Qcase_table, Qnil); | 153 | eqv = Fmake_char_table (Qcase_table, Qnil); |
| 156 | compute_trt_inverse (XCHAR_TABLE (canon), XCHAR_TABLE (eqv)); | 154 | compute_trt_inverse (XCHAR_TABLE (canon), XCHAR_TABLE (eqv)); |
| 157 | XCHAR_TABLE (table)->extras[0] = eqv; | 155 | XCHAR_TABLE (table)->extras[2] = eqv; |
| 158 | } | 156 | } |
| 159 | 157 | ||
| 160 | if (standard) | 158 | if (standard) |
| 161 | Vascii_downcase_table = down; | 159 | Vascii_downcase_table = table; |
| 162 | else | 160 | else |
| 163 | current_buffer->downcase_table = down; | 161 | current_buffer->downcase_table = table; |
| 164 | 162 | ||
| 165 | return table; | 163 | return table; |
| 166 | } | 164 | } |
| @@ -206,7 +204,7 @@ init_casetab_once () | |||
| 206 | 204 | ||
| 207 | /* Now we are ready to set up this property, so we can | 205 | /* Now we are ready to set up this property, so we can |
| 208 | create char tables. */ | 206 | create char tables. */ |
| 209 | Fput (Qcase_table, Qchar_table_extra_slots, make_number (4)); | 207 | Fput (Qcase_table, Qchar_table_extra_slots, make_number (3)); |
| 210 | 208 | ||
| 211 | down = Fmake_char_table (Qcase_table, Qnil); | 209 | down = Fmake_char_table (Qcase_table, Qnil); |
| 212 | Vascii_downcase_table = down; | 210 | Vascii_downcase_table = down; |