diff options
| author | Gerd Moellmann | 2000-10-05 19:27:17 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-10-05 19:27:17 +0000 |
| commit | 1db0076e78b71009e98fc30cf02019c502da96b2 (patch) | |
| tree | 2a4c38ca51f21d4147e63ed0cd5e78c6bc20f6dd | |
| parent | a18c0a477e917eee64654a043b595258174e9d88 (diff) | |
| download | emacs-1db0076e78b71009e98fc30cf02019c502da96b2.tar.gz emacs-1db0076e78b71009e98fc30cf02019c502da96b2.zip | |
(Frecursive_edit): Make sure redisplay can happen.
(show_help_echo): Use safe_call instead of
call_function; use safe_eval instead of eval_form.
| -rw-r--r-- | src/keyboard.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 754a80fe74b..16df84b80f5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -939,6 +939,18 @@ This function is called by the editor initialization to begin editing.") | |||
| 939 | command_loop_level++; | 939 | command_loop_level++; |
| 940 | update_mode_lines = 1; | 940 | update_mode_lines = 1; |
| 941 | 941 | ||
| 942 | /* This function may have been called from a debugger called from | ||
| 943 | within redisplay, for instance by Edebugging a function called | ||
| 944 | from fontification-functions. We want to allow redisplay in | ||
| 945 | the debugging session. | ||
| 946 | |||
| 947 | The recursive edit is left with a `(throw exit ...)'. The `exit' | ||
| 948 | tag is not caught anywhere in redisplay, i.e. when we leave the | ||
| 949 | recursive edit, the original redisplay leading to the recursive | ||
| 950 | edit will be unwound. The outcome should therefore be safe. */ | ||
| 951 | specbind (Qinhibit_redisplay, Qnil); | ||
| 952 | redisplaying_p = 0; | ||
| 953 | |||
| 942 | record_unwind_protect (recursive_edit_unwind, | 954 | record_unwind_protect (recursive_edit_unwind, |
| 943 | (command_loop_level | 955 | (command_loop_level |
| 944 | && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer)) | 956 | && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer)) |
| @@ -1960,10 +1972,10 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) | |||
| 1960 | args[1] = window; | 1972 | args[1] = window; |
| 1961 | args[2] = object; | 1973 | args[2] = object; |
| 1962 | args[3] = pos; | 1974 | args[3] = pos; |
| 1963 | help = call_function (4, args); | 1975 | help = safe_call (4, args); |
| 1964 | } | 1976 | } |
| 1965 | else | 1977 | else |
| 1966 | help = eval_form (help); | 1978 | help = safe_eval (help); |
| 1967 | 1979 | ||
| 1968 | if (!STRINGP (help)) | 1980 | if (!STRINGP (help)) |
| 1969 | return; | 1981 | return; |