diff options
| author | Kim F. Storm | 2008-03-08 22:39:56 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2008-03-08 22:39:56 +0000 |
| commit | 7027c07b6cfa0167c006e7fb722cc56638606cd7 (patch) | |
| tree | 4e45991eaf0c91101ec1bd39aae8abe153c2c957 /src | |
| parent | 223ed6dbac17e7807a0213556e1b93ecd483d019 (diff) | |
| download | emacs-7027c07b6cfa0167c006e7fb722cc56638606cd7.tar.gz emacs-7027c07b6cfa0167c006e7fb722cc56638606cd7.zip | |
(GET_NEXT_DISPLAY_ELEMENT): New macro.
(get_next_display_element, next_element_from_string)
(next_element_from_ellipsis, next_element_from_buffer): Use it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index b93c151ed2b..b7a5ceec495 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5713,6 +5713,7 @@ static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) = | |||
| 5713 | next_element_from_stretch | 5713 | next_element_from_stretch |
| 5714 | }; | 5714 | }; |
| 5715 | 5715 | ||
| 5716 | #define GET_NEXT_DISPLAY_ELEMENT(it) (*get_next_element[(it)->method]) (it) | ||
| 5716 | 5717 | ||
| 5717 | /* Load IT's display element fields with information about the next | 5718 | /* Load IT's display element fields with information about the next |
| 5718 | display element from the current position of IT. Value is zero if | 5719 | display element from the current position of IT. Value is zero if |
| @@ -5733,7 +5734,7 @@ get_next_display_element (it) | |||
| 5733 | int success_p; | 5734 | int success_p; |
| 5734 | 5735 | ||
| 5735 | get_next: | 5736 | get_next: |
| 5736 | success_p = (*get_next_element[it->method]) (it); | 5737 | success_p = GET_NEXT_DISPLAY_ELEMENT (it); |
| 5737 | 5738 | ||
| 5738 | if (it->what == IT_CHARACTER) | 5739 | if (it->what == IT_CHARACTER) |
| 5739 | { | 5740 | { |
| @@ -6263,7 +6264,7 @@ next_element_from_string (it) | |||
| 6263 | 6264 | ||
| 6264 | /* Since a handler may have changed IT->method, we must | 6265 | /* Since a handler may have changed IT->method, we must |
| 6265 | recurse here. */ | 6266 | recurse here. */ |
| 6266 | return get_next_display_element (it); | 6267 | return GET_NEXT_DISPLAY_ELEMENT (it); |
| 6267 | } | 6268 | } |
| 6268 | 6269 | ||
| 6269 | if (it->current.overlay_string_index >= 0) | 6270 | if (it->current.overlay_string_index >= 0) |
| @@ -6401,7 +6402,7 @@ next_element_from_ellipsis (it) | |||
| 6401 | it->face_before_selective_p = 1; | 6402 | it->face_before_selective_p = 1; |
| 6402 | } | 6403 | } |
| 6403 | 6404 | ||
| 6404 | return get_next_display_element (it); | 6405 | return GET_NEXT_DISPLAY_ELEMENT (it); |
| 6405 | } | 6406 | } |
| 6406 | 6407 | ||
| 6407 | 6408 | ||
| @@ -6465,7 +6466,7 @@ next_element_from_buffer (it) | |||
| 6465 | } | 6466 | } |
| 6466 | 6467 | ||
| 6467 | if (overlay_strings_follow_p) | 6468 | if (overlay_strings_follow_p) |
| 6468 | success_p = get_next_display_element (it); | 6469 | success_p = GET_NEXT_DISPLAY_ELEMENT (it); |
| 6469 | else | 6470 | else |
| 6470 | { | 6471 | { |
| 6471 | it->what = IT_EOB; | 6472 | it->what = IT_EOB; |
| @@ -6476,7 +6477,7 @@ next_element_from_buffer (it) | |||
| 6476 | else | 6477 | else |
| 6477 | { | 6478 | { |
| 6478 | handle_stop (it); | 6479 | handle_stop (it); |
| 6479 | return get_next_display_element (it); | 6480 | return GET_NEXT_DISPLAY_ELEMENT (it); |
| 6480 | } | 6481 | } |
| 6481 | } | 6482 | } |
| 6482 | else | 6483 | else |