aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2003-05-23 23:32:55 +0000
committerStefan Monnier2003-05-23 23:32:55 +0000
commit1a89be1e46016afa977aa74cb6eb67920f79e5f7 (patch)
treecb3b105ae82a1700d526c672b6fe3c18aa1b3c98 /src
parent6d7cff7217ebfe4afb42d7ccecdb6cfcf29b03b2 (diff)
downloademacs-1a89be1e46016afa977aa74cb6eb67920f79e5f7.tar.gz
emacs-1a89be1e46016afa977aa74cb6eb67920f79e5f7.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c16
1 files 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 @@
1/* Display generation from window structure and buffer text. 1/* Display generation from window structure and buffer text.
2 Copyright (C) 1985,86,87,88,93,94,95,97,98,99, 2000, 2001, 2002, 2003 2 Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -14927,8 +14927,8 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
14927 int literal = 0; 14927 int literal = 0;
14928 14928
14929 tail_recurse: 14929 tail_recurse:
14930 if (depth > 10) 14930 if (depth > 100)
14931 goto invalid; 14931 elt = build_string ("*too-deep*");
14932 14932
14933 depth++; 14933 depth++;
14934 14934
@@ -15283,14 +15283,8 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
15283 15283
15284 default: 15284 default:
15285 invalid: 15285 invalid:
15286 if (frame_title_ptr) 15286 elt = build_string ("*invalid*");
15287 n += store_frame_title ("*invalid*", 0, precision - n); 15287 goto tail_recurse;
15288 else if (!NILP (mode_line_string_list))
15289 n += store_mode_line_string ("*invalid*", Qnil, 0, 0, precision - n, Qnil);
15290 else
15291 n += display_string ("*invalid*", Qnil, Qnil, 0, 0, it, 0,
15292 precision - n, 0, 0);
15293 return n;
15294 } 15288 }
15295 15289
15296 /* Pad to FIELD_WIDTH. */ 15290 /* Pad to FIELD_WIDTH. */