Commit bbb9fc1f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 94f9b406
2008-01-25 Richard Stallman <rms@gnu.org>
* xdisp.c (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.
* keyboard.c (read_char): Restore echo_message_buffer after redisplay.
* buffer.c (reset_buffer_local_variables): Implement
`permanent-local-hook'.
(Qpermanent_local_hook): New variable.
(syms_of_buffer): init and staticpro it.
2008-01-25 Michael Albinus <michael.albinus@gmx.de> 2008-01-25 Michael Albinus <michael.albinus@gmx.de>
* dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux. * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux.
......
...@@ -232,6 +232,7 @@ extern Lisp_Object Qhelp_echo; ...@@ -232,6 +232,7 @@ extern Lisp_Object Qhelp_echo;
   
Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
Lisp_Object Qwindow_text_change_functions, Vwindow_text_change_functions;
Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions;
Lisp_Object Qinhibit_point_motion_hooks; Lisp_Object Qinhibit_point_motion_hooks;
Lisp_Object QCeval, QCfile, QCdata, QCpropertize; Lisp_Object QCeval, QCfile, QCdata, QCpropertize;
...@@ -12884,8 +12885,7 @@ redisplay_window (window, just_this_one_p) ...@@ -12884,8 +12885,7 @@ redisplay_window (window, just_this_one_p)
*w->desired_matrix->method = 0; *w->desired_matrix->method = 0;
#endif #endif
   
specbind (Qinhibit_point_motion_hooks, Qt); restart:
reconsider_clip_changes (w, buffer); reconsider_clip_changes (w, buffer);
   
/* Has the mode line to be updated? */ /* Has the mode line to be updated? */
...@@ -12936,10 +12936,6 @@ redisplay_window (window, just_this_one_p) ...@@ -12936,10 +12936,6 @@ redisplay_window (window, just_this_one_p)
/* Really select the buffer, for the sake of buffer-local /* Really select the buffer, for the sake of buffer-local
variables. */ variables. */
set_buffer_internal_1 (XBUFFER (w->buffer)); set_buffer_internal_1 (XBUFFER (w->buffer));
SET_TEXT_POS (opoint, PT, PT_BYTE);
beg_unchanged = BEG_UNCHANGED;
end_unchanged = END_UNCHANGED;
   
current_matrix_up_to_date_p current_matrix_up_to_date_p
= (!NILP (w->window_end_valid) = (!NILP (w->window_end_valid)
...@@ -12948,6 +12944,23 @@ redisplay_window (window, just_this_one_p) ...@@ -12948,6 +12944,23 @@ redisplay_window (window, just_this_one_p)
&& XFASTINT (w->last_modified) >= MODIFF && XFASTINT (w->last_modified) >= MODIFF
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF);
   
/* Run the window-bottom-change-functions
if it is possible that the text on the screen has changed
(either due to modification of the text, or any other reason). */
if (!current_matrix_up_to_date_p
&& !NILP (Vwindow_text_change_functions))
{
safe_run_hooks (Qwindow_text_change_functions);
goto restart;
}
beg_unchanged = BEG_UNCHANGED;
end_unchanged = END_UNCHANGED;
SET_TEXT_POS (opoint, PT, PT_BYTE);
specbind (Qinhibit_point_motion_hooks, Qt);
buffer_unchanged_p buffer_unchanged_p
= (!NILP (w->window_end_valid) = (!NILP (w->window_end_valid)
&& !current_buffer->clip_changed && !current_buffer->clip_changed
...@@ -23962,6 +23975,9 @@ syms_of_xdisp () ...@@ -23962,6 +23975,9 @@ syms_of_xdisp ()
staticpro (&Qwindow_scroll_functions); staticpro (&Qwindow_scroll_functions);
Qwindow_scroll_functions = intern ("window-scroll-functions"); Qwindow_scroll_functions = intern ("window-scroll-functions");
   
staticpro (&Qwindow_text_change_functions);
Qwindow_text_change_functions = intern ("window-text-change-functions");
staticpro (&Qredisplay_end_trigger_functions); staticpro (&Qredisplay_end_trigger_functions);
Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions"); Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions");
   
...@@ -24273,6 +24289,11 @@ and its new display-start position. Note that the value of `window-end' ...@@ -24273,6 +24289,11 @@ and its new display-start position. Note that the value of `window-end'
is not valid when these functions are called. */); is not valid when these functions are called. */);
Vwindow_scroll_functions = Qnil; Vwindow_scroll_functions = Qnil;
   
DEFVAR_LISP ("window-text-change-functions",
&Vwindow_text_change_functions,
doc: /* Functions to call in redisplay when text in the window might change. */);
Vwindow_text_change_functions = Qnil;
DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions,
doc: /* Functions called when redisplay of a window reaches the end trigger. doc: /* Functions called when redisplay of a window reaches the end trigger.
Each function is called with two arguments, the window and the end trigger value. Each function is called with two arguments, the window and the end trigger value.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment