diff options
| author | Richard M. Stallman | 2008-01-25 23:02:36 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2008-01-25 23:02:36 +0000 |
| commit | bbb9fc1f654a0eb81a5dc186e16880a0354ddd71 (patch) | |
| tree | 23fd5eac8cb95679d1e7666bb501be229a917988 /src | |
| parent | 94f9b406a79c27dff71194a30995efac3a9510fd (diff) | |
| download | emacs-bbb9fc1f654a0eb81a5dc186e16880a0354ddd71.tar.gz emacs-bbb9fc1f654a0eb81a5dc186e16880a0354ddd71.zip | |
(redisplay_window): Run Qwindow_text_change_functions and
jump back to beginning. Move some other initializations after that.
(Qwindow_text_change_functions, (Vwindow_text_change_functions): New variables.
(syms_of_xdisp): Init them.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/xdisp.c | 33 |
2 files changed, 42 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 73d2e1d05c7..9a70449ac78 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2008-01-25 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (redisplay_window): Run Qwindow_text_change_functions and | ||
| 4 | jump back to beginning. Move some other initializations after that. | ||
| 5 | (Qwindow_text_change_functions, Vwindow_text_change_functions): | ||
| 6 | New variables. | ||
| 7 | (syms_of_xdisp): Init them. | ||
| 8 | |||
| 9 | * keyboard.c (read_char): Restore echo_message_buffer after redisplay. | ||
| 10 | |||
| 11 | * buffer.c (reset_buffer_local_variables): Implement | ||
| 12 | `permanent-local-hook'. | ||
| 13 | (Qpermanent_local_hook): New variable. | ||
| 14 | (syms_of_buffer): init and staticpro it. | ||
| 15 | |||
| 1 | 2008-01-25 Michael Albinus <michael.albinus@gmx.de> | 16 | 2008-01-25 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 17 | ||
| 3 | * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux. | 18 | * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux. |
diff --git a/src/xdisp.c b/src/xdisp.c index dfa18bfacb7..8c1b2b945fe 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -232,6 +232,7 @@ extern Lisp_Object Qhelp_echo; | |||
| 232 | 232 | ||
| 233 | Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | 233 | Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; |
| 234 | Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; | 234 | Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; |
| 235 | Lisp_Object Qwindow_text_change_functions, Vwindow_text_change_functions; | ||
| 235 | Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; | 236 | Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; |
| 236 | Lisp_Object Qinhibit_point_motion_hooks; | 237 | Lisp_Object Qinhibit_point_motion_hooks; |
| 237 | Lisp_Object QCeval, QCfile, QCdata, QCpropertize; | 238 | Lisp_Object QCeval, QCfile, QCdata, QCpropertize; |
| @@ -12884,8 +12885,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12884 | *w->desired_matrix->method = 0; | 12885 | *w->desired_matrix->method = 0; |
| 12885 | #endif | 12886 | #endif |
| 12886 | 12887 | ||
| 12887 | specbind (Qinhibit_point_motion_hooks, Qt); | 12888 | restart: |
| 12888 | |||
| 12889 | reconsider_clip_changes (w, buffer); | 12889 | reconsider_clip_changes (w, buffer); |
| 12890 | 12890 | ||
| 12891 | /* Has the mode line to be updated? */ | 12891 | /* Has the mode line to be updated? */ |
| @@ -12936,10 +12936,6 @@ redisplay_window (window, just_this_one_p) | |||
| 12936 | /* Really select the buffer, for the sake of buffer-local | 12936 | /* Really select the buffer, for the sake of buffer-local |
| 12937 | variables. */ | 12937 | variables. */ |
| 12938 | set_buffer_internal_1 (XBUFFER (w->buffer)); | 12938 | set_buffer_internal_1 (XBUFFER (w->buffer)); |
| 12939 | SET_TEXT_POS (opoint, PT, PT_BYTE); | ||
| 12940 | |||
| 12941 | beg_unchanged = BEG_UNCHANGED; | ||
| 12942 | end_unchanged = END_UNCHANGED; | ||
| 12943 | 12939 | ||
| 12944 | current_matrix_up_to_date_p | 12940 | current_matrix_up_to_date_p |
| 12945 | = (!NILP (w->window_end_valid) | 12941 | = (!NILP (w->window_end_valid) |
| @@ -12948,6 +12944,23 @@ redisplay_window (window, just_this_one_p) | |||
| 12948 | && XFASTINT (w->last_modified) >= MODIFF | 12944 | && XFASTINT (w->last_modified) >= MODIFF |
| 12949 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); | 12945 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); |
| 12950 | 12946 | ||
| 12947 | /* Run the window-bottom-change-functions | ||
| 12948 | if it is possible that the text on the screen has changed | ||
| 12949 | (either due to modification of the text, or any other reason). */ | ||
| 12950 | if (!current_matrix_up_to_date_p | ||
| 12951 | && !NILP (Vwindow_text_change_functions)) | ||
| 12952 | { | ||
| 12953 | safe_run_hooks (Qwindow_text_change_functions); | ||
| 12954 | goto restart; | ||
| 12955 | } | ||
| 12956 | |||
| 12957 | beg_unchanged = BEG_UNCHANGED; | ||
| 12958 | end_unchanged = END_UNCHANGED; | ||
| 12959 | |||
| 12960 | SET_TEXT_POS (opoint, PT, PT_BYTE); | ||
| 12961 | |||
| 12962 | specbind (Qinhibit_point_motion_hooks, Qt); | ||
| 12963 | |||
| 12951 | buffer_unchanged_p | 12964 | buffer_unchanged_p |
| 12952 | = (!NILP (w->window_end_valid) | 12965 | = (!NILP (w->window_end_valid) |
| 12953 | && !current_buffer->clip_changed | 12966 | && !current_buffer->clip_changed |
| @@ -23962,6 +23975,9 @@ syms_of_xdisp () | |||
| 23962 | staticpro (&Qwindow_scroll_functions); | 23975 | staticpro (&Qwindow_scroll_functions); |
| 23963 | Qwindow_scroll_functions = intern ("window-scroll-functions"); | 23976 | Qwindow_scroll_functions = intern ("window-scroll-functions"); |
| 23964 | 23977 | ||
| 23978 | staticpro (&Qwindow_text_change_functions); | ||
| 23979 | Qwindow_text_change_functions = intern ("window-text-change-functions"); | ||
| 23980 | |||
| 23965 | staticpro (&Qredisplay_end_trigger_functions); | 23981 | staticpro (&Qredisplay_end_trigger_functions); |
| 23966 | Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions"); | 23982 | Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions"); |
| 23967 | 23983 | ||
| @@ -24273,6 +24289,11 @@ and its new display-start position. Note that the value of `window-end' | |||
| 24273 | is not valid when these functions are called. */); | 24289 | is not valid when these functions are called. */); |
| 24274 | Vwindow_scroll_functions = Qnil; | 24290 | Vwindow_scroll_functions = Qnil; |
| 24275 | 24291 | ||
| 24292 | DEFVAR_LISP ("window-text-change-functions", | ||
| 24293 | &Vwindow_text_change_functions, | ||
| 24294 | doc: /* Functions to call in redisplay when text in the window might change. */); | ||
| 24295 | Vwindow_text_change_functions = Qnil; | ||
| 24296 | |||
| 24276 | DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, | 24297 | DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, |
| 24277 | doc: /* Functions called when redisplay of a window reaches the end trigger. | 24298 | doc: /* Functions called when redisplay of a window reaches the end trigger. |
| 24278 | Each function is called with two arguments, the window and the end trigger value. | 24299 | Each function is called with two arguments, the window and the end trigger value. |