diff options
| author | Lars Ingebrigtsen | 2020-12-29 06:07:44 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-12-29 06:07:44 +0100 |
| commit | 6481da6b90bcbccbd334f060ac2a4aafaea83df3 (patch) | |
| tree | 2ab0dd8c14f76360dc854260d2ca909fd1b7d795 | |
| parent | 88c96962cfd56f213ef88b506b510a42d21a2fe6 (diff) | |
| download | emacs-6481da6b90bcbccbd334f060ac2a4aafaea83df3.tar.gz emacs-6481da6b90bcbccbd334f060ac2a4aafaea83df3.zip | |
Revert the previous display_string change
* src/xdisp.c (display_string): Revert adding the additional
ignore_text_properties parameter -- it was already covered by the
other mix of parameters.
| -rw-r--r-- | src/xdisp.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4c4d349ee5a..72256cddd30 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1115,7 +1115,7 @@ static void pint2str (register char *, register int, register ptrdiff_t); | |||
| 1115 | 1115 | ||
| 1116 | static int display_string (const char *, Lisp_Object, Lisp_Object, | 1116 | static int display_string (const char *, Lisp_Object, Lisp_Object, |
| 1117 | ptrdiff_t, ptrdiff_t, struct it *, int, int, int, | 1117 | ptrdiff_t, ptrdiff_t, struct it *, int, int, int, |
| 1118 | int, bool); | 1118 | int); |
| 1119 | static void compute_line_metrics (struct it *); | 1119 | static void compute_line_metrics (struct it *); |
| 1120 | static void run_redisplay_end_trigger_hook (struct it *); | 1120 | static void run_redisplay_end_trigger_hook (struct it *); |
| 1121 | static bool get_overlay_strings (struct it *, ptrdiff_t); | 1121 | static bool get_overlay_strings (struct it *, ptrdiff_t); |
| @@ -13155,13 +13155,12 @@ display_tab_bar (struct window *w) | |||
| 13155 | 13155 | ||
| 13156 | if (it.current_x < it.last_visible_x) | 13156 | if (it.current_x < it.last_visible_x) |
| 13157 | display_string (NULL, string, Qnil, 0, 0, &it, | 13157 | display_string (NULL, string, Qnil, 0, 0, &it, |
| 13158 | SCHARS (string), 0, 0, STRING_MULTIBYTE (string), | 13158 | SCHARS (string), 0, 0, STRING_MULTIBYTE (string)); |
| 13159 | TRUE); | ||
| 13160 | } | 13159 | } |
| 13161 | 13160 | ||
| 13162 | /* Fill out the line with spaces. */ | 13161 | /* Fill out the line with spaces. */ |
| 13163 | if (it.current_x < it.last_visible_x) | 13162 | if (it.current_x < it.last_visible_x) |
| 13164 | display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1, TRUE); | 13163 | display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1); |
| 13165 | 13164 | ||
| 13166 | /* Compute the total height of the lines. */ | 13165 | /* Compute the total height of the lines. */ |
| 13167 | compute_line_metrics (&it); | 13166 | compute_line_metrics (&it); |
| @@ -25138,13 +25137,12 @@ display_menu_bar (struct window *w) | |||
| 25138 | /* Display the item, pad with one space. */ | 25137 | /* Display the item, pad with one space. */ |
| 25139 | if (it.current_x < it.last_visible_x) | 25138 | if (it.current_x < it.last_visible_x) |
| 25140 | display_string (NULL, string, Qnil, 0, 0, &it, | 25139 | display_string (NULL, string, Qnil, 0, 0, &it, |
| 25141 | SCHARS (string) + 1, 0, 0, STRING_MULTIBYTE (string), | 25140 | SCHARS (string) + 1, 0, 0, STRING_MULTIBYTE (string)); |
| 25142 | TRUE); | ||
| 25143 | } | 25141 | } |
| 25144 | 25142 | ||
| 25145 | /* Fill out the line with spaces. */ | 25143 | /* Fill out the line with spaces. */ |
| 25146 | if (it.current_x < it.last_visible_x) | 25144 | if (it.current_x < it.last_visible_x) |
| 25147 | display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1, TRUE); | 25145 | display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1); |
| 25148 | 25146 | ||
| 25149 | /* Compute the total height of the lines. */ | 25147 | /* Compute the total height of the lines. */ |
| 25150 | compute_line_metrics (&it); | 25148 | compute_line_metrics (&it); |
| @@ -25248,22 +25246,21 @@ display_tty_menu_item (const char *item_text, int width, int face_id, | |||
| 25248 | it.paragraph_embedding = L2R; | 25246 | it.paragraph_embedding = L2R; |
| 25249 | 25247 | ||
| 25250 | /* Pad with a space on the left. */ | 25248 | /* Pad with a space on the left. */ |
| 25251 | display_string (" ", Qnil, Qnil, 0, 0, &it, 1, 0, FRAME_COLS (f) - 1, -1, | 25249 | display_string (" ", Qnil, Qnil, 0, 0, &it, 1, 0, FRAME_COLS (f) - 1, -1); |
| 25252 | TRUE); | ||
| 25253 | width--; | 25250 | width--; |
| 25254 | /* Display the menu item, pad with spaces to WIDTH. */ | 25251 | /* Display the menu item, pad with spaces to WIDTH. */ |
| 25255 | if (submenu) | 25252 | if (submenu) |
| 25256 | { | 25253 | { |
| 25257 | display_string (item_text, Qnil, Qnil, 0, 0, &it, | 25254 | display_string (item_text, Qnil, Qnil, 0, 0, &it, |
| 25258 | item_len, 0, FRAME_COLS (f) - 1, -1, TRUE); | 25255 | item_len, 0, FRAME_COLS (f) - 1, -1); |
| 25259 | width -= item_len; | 25256 | width -= item_len; |
| 25260 | /* Indicate with " >" that there's a submenu. */ | 25257 | /* Indicate with " >" that there's a submenu. */ |
| 25261 | display_string (" >", Qnil, Qnil, 0, 0, &it, width, 0, | 25258 | display_string (" >", Qnil, Qnil, 0, 0, &it, width, 0, |
| 25262 | FRAME_COLS (f) - 1, -1, TRUE); | 25259 | FRAME_COLS (f) - 1, -1); |
| 25263 | } | 25260 | } |
| 25264 | else | 25261 | else |
| 25265 | display_string (item_text, Qnil, Qnil, 0, 0, &it, | 25262 | display_string (item_text, Qnil, Qnil, 0, 0, &it, |
| 25266 | width, 0, FRAME_COLS (f) - 1, -1, TRUE); | 25263 | width, 0, FRAME_COLS (f) - 1, -1); |
| 25267 | 25264 | ||
| 25268 | row->used[TEXT_AREA] = max (saved_used, row->used[TEXT_AREA]); | 25265 | row->used[TEXT_AREA] = max (saved_used, row->used[TEXT_AREA]); |
| 25269 | row->truncated_on_right_p = saved_truncated; | 25266 | row->truncated_on_right_p = saved_truncated; |
| @@ -25475,9 +25472,9 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) | |||
| 25475 | { | 25472 | { |
| 25476 | /* The window is wide enough; just display the mode line we | 25473 | /* The window is wide enough; just display the mode line we |
| 25477 | just computed. */ | 25474 | just computed. */ |
| 25478 | display_string (SSDATA (mode_string), mode_string, Qnil, | 25475 | display_string (NULL, mode_string, Qnil, |
| 25479 | 0, 0, &it, 0, 0, 0, | 25476 | 0, 0, &it, 0, 0, 0, |
| 25480 | STRING_MULTIBYTE (mode_string), FALSE); | 25477 | STRING_MULTIBYTE (mode_string)); |
| 25481 | } | 25478 | } |
| 25482 | else | 25479 | else |
| 25483 | { | 25480 | { |
| @@ -25494,7 +25491,7 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) | |||
| 25494 | Fsubstring (mode_string, make_fixnum (start), | 25491 | Fsubstring (mode_string, make_fixnum (start), |
| 25495 | make_fixnum (i - 1)), | 25492 | make_fixnum (i - 1)), |
| 25496 | Qnil, 0, 0, &it, 0, 0, 0, | 25493 | Qnil, 0, 0, &it, 0, 0, 0, |
| 25497 | STRING_MULTIBYTE (mode_string), FALSE); | 25494 | STRING_MULTIBYTE (mode_string)); |
| 25498 | /* Skip past the rest of the space characters. */ | 25495 | /* Skip past the rest of the space characters. */ |
| 25499 | while (c == ' ' && i < SCHARS (mode_string)) | 25496 | while (c == ' ' && i < SCHARS (mode_string)) |
| 25500 | c = fetch_string_char_advance (mode_string, &i, &i_byte); | 25497 | c = fetch_string_char_advance (mode_string, &i, &i_byte); |
| @@ -25509,7 +25506,7 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) | |||
| 25509 | Fsubstring (mode_string, make_fixnum (start), | 25506 | Fsubstring (mode_string, make_fixnum (start), |
| 25510 | make_fixnum (i - 1)), | 25507 | make_fixnum (i - 1)), |
| 25511 | Qnil, 0, 0, &it, 0, 0, 0, | 25508 | Qnil, 0, 0, &it, 0, 0, 0, |
| 25512 | STRING_MULTIBYTE (mode_string), FALSE); | 25509 | STRING_MULTIBYTE (mode_string)); |
| 25513 | } | 25510 | } |
| 25514 | } | 25511 | } |
| 25515 | pop_kboard (); | 25512 | pop_kboard (); |
| @@ -25517,7 +25514,7 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) | |||
| 25517 | unbind_to (count, Qnil); | 25514 | unbind_to (count, Qnil); |
| 25518 | 25515 | ||
| 25519 | /* Fill up with spaces. */ | 25516 | /* Fill up with spaces. */ |
| 25520 | display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0, TRUE); | 25517 | display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); |
| 25521 | 25518 | ||
| 25522 | compute_line_metrics (&it); | 25519 | compute_line_metrics (&it); |
| 25523 | it.glyph_row->full_width_p = true; | 25520 | it.glyph_row->full_width_p = true; |
| @@ -25721,7 +25718,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 25721 | break; | 25718 | break; |
| 25722 | case MODE_LINE_DISPLAY: | 25719 | case MODE_LINE_DISPLAY: |
| 25723 | n += display_string (NULL, elt, Qnil, 0, 0, it, | 25720 | n += display_string (NULL, elt, Qnil, 0, 0, it, |
| 25724 | 0, prec, 0, STRING_MULTIBYTE (elt), TRUE); | 25721 | 0, prec, 0, STRING_MULTIBYTE (elt)); |
| 25725 | break; | 25722 | break; |
| 25726 | } | 25723 | } |
| 25727 | 25724 | ||
| @@ -25783,7 +25780,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 25783 | nchars = string_byte_to_char (elt, offset) - charpos; | 25780 | nchars = string_byte_to_char (elt, offset) - charpos; |
| 25784 | n += display_string (NULL, elt, Qnil, 0, charpos, | 25781 | n += display_string (NULL, elt, Qnil, 0, charpos, |
| 25785 | it, 0, nchars, 0, | 25782 | it, 0, nchars, 0, |
| 25786 | STRING_MULTIBYTE (elt), TRUE); | 25783 | STRING_MULTIBYTE (elt)); |
| 25787 | } | 25784 | } |
| 25788 | break; | 25785 | break; |
| 25789 | } | 25786 | } |
| @@ -25855,7 +25852,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 25855 | nwritten = display_string (spec, string, elt, | 25852 | nwritten = display_string (spec, string, elt, |
| 25856 | charpos, 0, it, | 25853 | charpos, 0, it, |
| 25857 | field, prec, 0, | 25854 | field, prec, 0, |
| 25858 | multibyte, TRUE); | 25855 | multibyte); |
| 25859 | 25856 | ||
| 25860 | /* Assign to the glyphs written above the | 25857 | /* Assign to the glyphs written above the |
| 25861 | string where the `%x' came from, position | 25858 | string where the `%x' came from, position |
| @@ -26062,7 +26059,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 26062 | break; | 26059 | break; |
| 26063 | case MODE_LINE_DISPLAY: | 26060 | case MODE_LINE_DISPLAY: |
| 26064 | n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n, | 26061 | n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n, |
| 26065 | 0, 0, 0, TRUE); | 26062 | 0, 0, 0); |
| 26066 | break; | 26063 | break; |
| 26067 | } | 26064 | } |
| 26068 | } | 26065 | } |
| @@ -27132,8 +27129,7 @@ display_count_lines (ptrdiff_t start_byte, | |||
| 27132 | static int | 27129 | static int |
| 27133 | display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_string, | 27130 | display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_string, |
| 27134 | ptrdiff_t face_string_pos, ptrdiff_t start, struct it *it, | 27131 | ptrdiff_t face_string_pos, ptrdiff_t start, struct it *it, |
| 27135 | int field_width, int precision, int max_x, int multibyte, | 27132 | int field_width, int precision, int max_x, int multibyte) |
| 27136 | bool ignore_text_properties) | ||
| 27137 | { | 27133 | { |
| 27138 | int hpos_at_start = it->hpos; | 27134 | int hpos_at_start = it->hpos; |
| 27139 | int saved_face_id = it->face_id; | 27135 | int saved_face_id = it->face_id; |
| @@ -27145,7 +27141,7 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st | |||
| 27145 | reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, | 27141 | reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, |
| 27146 | start, precision, field_width, multibyte); | 27142 | start, precision, field_width, multibyte); |
| 27147 | 27143 | ||
| 27148 | if (string && STRINGP (lisp_string) && ignore_text_properties) | 27144 | if (string && STRINGP (lisp_string)) |
| 27149 | /* LISP_STRING is the one returned by decode_mode_spec. We should | 27145 | /* LISP_STRING is the one returned by decode_mode_spec. We should |
| 27150 | ignore its text properties. */ | 27146 | ignore its text properties. */ |
| 27151 | it->stop_charpos = it->end_charpos; | 27147 | it->stop_charpos = it->end_charpos; |