diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 9b4febdd61a..1199e1c1b7d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -23516,6 +23516,17 @@ move_elt_to_front (Lisp_Object elt, Lisp_Object list) | |||
| 23516 | return list; | 23516 | return list; |
| 23517 | } | 23517 | } |
| 23518 | 23518 | ||
| 23519 | /* Subroutine to call Fset_text_properties through | ||
| 23520 | internal_condition_case_n. ARGS are the arguments of | ||
| 23521 | Fset_text_properties, in order. */ | ||
| 23522 | |||
| 23523 | static Lisp_Object | ||
| 23524 | safe_set_text_properties (ptrdiff_t nargs, Lisp_Object *args) | ||
| 23525 | { | ||
| 23526 | eassert (nargs == 4); | ||
| 23527 | return Fset_text_properties (args[0], args[1], args[2], args[3]); | ||
| 23528 | } | ||
| 23529 | |||
| 23519 | /* Contribute ELT to the mode line for window IT->w. How it | 23530 | /* Contribute ELT to the mode line for window IT->w. How it |
| 23520 | translates into text depends on its data type. | 23531 | translates into text depends on its data type. |
| 23521 | 23532 | ||
| @@ -23610,8 +23621,17 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 23610 | = Fdelq (aelt, mode_line_proptrans_alist); | 23621 | = Fdelq (aelt, mode_line_proptrans_alist); |
| 23611 | 23622 | ||
| 23612 | elt = Fcopy_sequence (elt); | 23623 | elt = Fcopy_sequence (elt); |
| 23613 | Fset_text_properties (make_number (0), Flength (elt), | 23624 | /* PROPS might cause set-text-properties to signal |
| 23614 | props, elt); | 23625 | an error, so we call it via internal_condition_case_n, |
| 23626 | to avoid an infloop in redisplay due to the error. */ | ||
| 23627 | internal_condition_case_n (safe_set_text_properties, | ||
| 23628 | 4, | ||
| 23629 | ((Lisp_Object []) | ||
| 23630 | {make_number (0), | ||
| 23631 | Flength (elt), | ||
| 23632 | props, | ||
| 23633 | elt}), | ||
| 23634 | Qt, safe_eval_handler); | ||
| 23615 | /* Add this item to mode_line_proptrans_alist. */ | 23635 | /* Add this item to mode_line_proptrans_alist. */ |
| 23616 | mode_line_proptrans_alist | 23636 | mode_line_proptrans_alist |
| 23617 | = Fcons (Fcons (elt, props), | 23637 | = Fcons (Fcons (elt, props), |