From 1a89be1e46016afa977aa74cb6eb67920f79e5f7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 23 May 2003 23:32:55 +0000 Subject: [PATCH] (display_mode_element): Increase max depth. Simplify the error handling code. Use a different error string for the case where we hit the depth limit. --- src/xdisp.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 3ed57b299bf..a7009f8aac2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1,5 +1,5 @@ /* Display generation from window structure and buffer text. - Copyright (C) 1985,86,87,88,93,94,95,97,98,99, 2000, 2001, 2002, 2003 + Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -14927,8 +14927,8 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) int literal = 0; tail_recurse: - if (depth > 10) - goto invalid; + if (depth > 100) + elt = build_string ("*too-deep*"); depth++; @@ -15283,14 +15283,8 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) default: invalid: - if (frame_title_ptr) - n += store_frame_title ("*invalid*", 0, precision - n); - else if (!NILP (mode_line_string_list)) - n += store_mode_line_string ("*invalid*", Qnil, 0, 0, precision - n, Qnil); - else - n += display_string ("*invalid*", Qnil, Qnil, 0, 0, it, 0, - precision - n, 0, 0); - return n; + elt = build_string ("*invalid*"); + goto tail_recurse; } /* Pad to FIELD_WIDTH. */ -- 2.39.2