diff options
| author | Martin Rudalics | 2016-03-26 14:43:25 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2016-03-26 14:43:25 +0100 |
| commit | cad9d76e12a32c5ca752ce0cfd521a6faa29067b (patch) | |
| tree | 25c923a3f226a0097de0cf067f9ed138402b1354 /src | |
| parent | 6f3243db55e61847784178ea812f28ddf003544a (diff) | |
| download | emacs-cad9d76e12a32c5ca752ce0cfd521a6faa29067b.tar.gz emacs-cad9d76e12a32c5ca752ce0cfd521a6faa29067b.zip | |
Safely run window size change functions
* src/window.c (run_window_size_change_functions): Use
safe_call1 when running a size change function.
(grow_mini_window, shrink_mini_window): Report error when
minibuffer window cannot be resized.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 77a43b739ce..8c76c1f9975 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3319,7 +3319,7 @@ run_window_size_change_functions (Lisp_Object frame) | |||
| 3319 | while (CONSP (functions)) | 3319 | while (CONSP (functions)) |
| 3320 | { | 3320 | { |
| 3321 | if (!EQ (XCAR (functions), Qt)) | 3321 | if (!EQ (XCAR (functions), Qt)) |
| 3322 | call1 (XCAR (functions), frame); | 3322 | safe_call1 (XCAR (functions), frame); |
| 3323 | functions = XCDR (functions); | 3323 | functions = XCDR (functions); |
| 3324 | } | 3324 | } |
| 3325 | 3325 | ||
| @@ -4619,6 +4619,9 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) | |||
| 4619 | adjust_frame_glyphs (f); | 4619 | adjust_frame_glyphs (f); |
| 4620 | unblock_input (); | 4620 | unblock_input (); |
| 4621 | } | 4621 | } |
| 4622 | else | ||
| 4623 | error ("Failed to grow minibuffer window"); | ||
| 4624 | |||
| 4622 | } | 4625 | } |
| 4623 | } | 4626 | } |
| 4624 | 4627 | ||
| @@ -4662,6 +4665,8 @@ shrink_mini_window (struct window *w, bool pixelwise) | |||
| 4662 | one window frame here. The same routine will be needed when | 4665 | one window frame here. The same routine will be needed when |
| 4663 | shrinking the frame (and probably when making the initial | 4666 | shrinking the frame (and probably when making the initial |
| 4664 | *scratch* window). For the moment leave things as they are. */ | 4667 | *scratch* window). For the moment leave things as they are. */ |
| 4668 | else | ||
| 4669 | error ("Failed to shrink minibuffer window"); | ||
| 4665 | } | 4670 | } |
| 4666 | } | 4671 | } |
| 4667 | 4672 | ||