diff options
| author | Dmitry Antipov | 2012-06-19 20:56:28 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-06-19 20:56:28 +0400 |
| commit | 28be1ada0fb9a4b51cf361dc45208e764bd34143 (patch) | |
| tree | 30a21470e485d1d9f397d97dcb9a386c578ab746 /src/syntax.c | |
| parent | 68f12411893785de1cfc2c24ec36059e49af5d55 (diff) | |
| download | emacs-28be1ada0fb9a4b51cf361dc45208e764bd34143.tar.gz emacs-28be1ada0fb9a4b51cf361dc45208e764bd34143.zip | |
* alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
* font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
* print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/syntax.c b/src/syntax.c index 0518a47f92d..1ad66833ff7 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -988,7 +988,7 @@ text property. */) | |||
| 988 | } | 988 | } |
| 989 | 989 | ||
| 990 | if (val < ASIZE (Vsyntax_code_object) && NILP (match)) | 990 | if (val < ASIZE (Vsyntax_code_object) && NILP (match)) |
| 991 | return XVECTOR (Vsyntax_code_object)->contents[val]; | 991 | return AREF (Vsyntax_code_object, val); |
| 992 | else | 992 | else |
| 993 | /* Since we can't use a shared object, let's make a new one. */ | 993 | /* Since we can't use a shared object, let's make a new one. */ |
| 994 | return Fcons (make_number (val), match); | 994 | return Fcons (make_number (val), match); |
| @@ -3386,32 +3386,31 @@ init_syntax_once (void) | |||
| 3386 | /* Create objects which can be shared among syntax tables. */ | 3386 | /* Create objects which can be shared among syntax tables. */ |
| 3387 | Vsyntax_code_object = Fmake_vector (make_number (Smax), Qnil); | 3387 | Vsyntax_code_object = Fmake_vector (make_number (Smax), Qnil); |
| 3388 | for (i = 0; i < ASIZE (Vsyntax_code_object); i++) | 3388 | for (i = 0; i < ASIZE (Vsyntax_code_object); i++) |
| 3389 | XVECTOR (Vsyntax_code_object)->contents[i] | 3389 | ASET (Vsyntax_code_object, i, Fcons (make_number (i), Qnil)); |
| 3390 | = Fcons (make_number (i), Qnil); | ||
| 3391 | 3390 | ||
| 3392 | /* Now we are ready to set up this property, so we can | 3391 | /* Now we are ready to set up this property, so we can |
| 3393 | create syntax tables. */ | 3392 | create syntax tables. */ |
| 3394 | Fput (Qsyntax_table, Qchar_table_extra_slots, make_number (0)); | 3393 | Fput (Qsyntax_table, Qchar_table_extra_slots, make_number (0)); |
| 3395 | 3394 | ||
| 3396 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Swhitespace]; | 3395 | temp = AREF (Vsyntax_code_object, (int) Swhitespace); |
| 3397 | 3396 | ||
| 3398 | Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); | 3397 | Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); |
| 3399 | 3398 | ||
| 3400 | /* Control characters should not be whitespace. */ | 3399 | /* Control characters should not be whitespace. */ |
| 3401 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Spunct]; | 3400 | temp = AREF (Vsyntax_code_object, (int) Spunct); |
| 3402 | for (i = 0; i <= ' ' - 1; i++) | 3401 | for (i = 0; i <= ' ' - 1; i++) |
| 3403 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); | 3402 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); |
| 3404 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 0177, temp); | 3403 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 0177, temp); |
| 3405 | 3404 | ||
| 3406 | /* Except that a few really are whitespace. */ | 3405 | /* Except that a few really are whitespace. */ |
| 3407 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Swhitespace]; | 3406 | temp = AREF (Vsyntax_code_object, (int) Swhitespace); |
| 3408 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ' ', temp); | 3407 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ' ', temp); |
| 3409 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\t', temp); | 3408 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\t', temp); |
| 3410 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\n', temp); | 3409 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\n', temp); |
| 3411 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 015, temp); | 3410 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 015, temp); |
| 3412 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 014, temp); | 3411 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 014, temp); |
| 3413 | 3412 | ||
| 3414 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Sword]; | 3413 | temp = AREF (Vsyntax_code_object, (int) Sword); |
| 3415 | for (i = 'a'; i <= 'z'; i++) | 3414 | for (i = 'a'; i <= 'z'; i++) |
| 3416 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); | 3415 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); |
| 3417 | for (i = 'A'; i <= 'Z'; i++) | 3416 | for (i = 'A'; i <= 'Z'; i++) |
| @@ -3439,14 +3438,14 @@ init_syntax_once (void) | |||
| 3439 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\\', | 3438 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\\', |
| 3440 | Fcons (make_number ((int) Sescape), Qnil)); | 3439 | Fcons (make_number ((int) Sescape), Qnil)); |
| 3441 | 3440 | ||
| 3442 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Ssymbol]; | 3441 | temp = AREF (Vsyntax_code_object, (int) Ssymbol); |
| 3443 | for (i = 0; i < 10; i++) | 3442 | for (i = 0; i < 10; i++) |
| 3444 | { | 3443 | { |
| 3445 | c = "_-+*/&|<>="[i]; | 3444 | c = "_-+*/&|<>="[i]; |
| 3446 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, c, temp); | 3445 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, c, temp); |
| 3447 | } | 3446 | } |
| 3448 | 3447 | ||
| 3449 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Spunct]; | 3448 | temp = AREF (Vsyntax_code_object, (int) Spunct); |
| 3450 | for (i = 0; i < 12; i++) | 3449 | for (i = 0; i < 12; i++) |
| 3451 | { | 3450 | { |
| 3452 | c = ".,;:?!#@~^'`"[i]; | 3451 | c = ".,;:?!#@~^'`"[i]; |
| @@ -3454,7 +3453,7 @@ init_syntax_once (void) | |||
| 3454 | } | 3453 | } |
| 3455 | 3454 | ||
| 3456 | /* All multibyte characters have syntax `word' by default. */ | 3455 | /* All multibyte characters have syntax `word' by default. */ |
| 3457 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Sword]; | 3456 | temp = AREF (Vsyntax_code_object, (int) Sword); |
| 3458 | char_table_set_range (Vstandard_syntax_table, 0x80, MAX_CHAR, temp); | 3457 | char_table_set_range (Vstandard_syntax_table, 0x80, MAX_CHAR, temp); |
| 3459 | } | 3458 | } |
| 3460 | 3459 | ||