aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2003-11-13 01:47:41 +0000
committerKenichi Handa2003-11-13 01:47:41 +0000
commitdd429b0302cebff1002c7c8770ece25bdd1f89fd (patch)
treefe24bb9b4b9690abe9453febc35a9d104a3266ce
parentfa091c040c83ac95bece4adf541acaa41850716f (diff)
downloademacs-dd429b0302cebff1002c7c8770ece25bdd1f89fd.tar.gz
emacs-dd429b0302cebff1002c7c8770ece25bdd1f89fd.zip
(select_frame_for_redisplay): New function.
(redisplay_internal): Record also selected_frame for unwind_redisplay. Call select_frame_for_redisplay before redrawing each frame. (unwind_redisplay): Argument changed to a cons.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xdisp.c60
2 files changed, 64 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c2479787636..0ada3fd087c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12003-11-13 Kenichi Handa <handa@m17n.org>
2
3 * xdisp.c (select_frame_for_redisplay): New function.
4 (redisplay_internal): Record also selected_frame for
5 unwind_redisplay. Call select_frame_for_redisplay before
6 redrawing each frame.
7 (unwind_redisplay): Argument changed to a cons.
8
12003-11-12 Luc Teirlinck <teirllm@auburn.edu> 92003-11-12 Luc Teirlinck <teirllm@auburn.edu>
2 10
3 * fns.c (Fstring_to_multibyte): Doc fix. 11 * fns.c (Fstring_to_multibyte): Doc fix.
diff --git a/src/xdisp.c b/src/xdisp.c
index e85589d56d1..e1b13323255 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -814,6 +814,7 @@ static int message_log_check_duplicate P_ ((int, int, int, int));
814static void push_it P_ ((struct it *)); 814static void push_it P_ ((struct it *));
815static void pop_it P_ ((struct it *)); 815static void pop_it P_ ((struct it *));
816static void sync_frame_with_window_matrix_rows P_ ((struct window *)); 816static void sync_frame_with_window_matrix_rows P_ ((struct window *));
817static void select_frame_for_redisplay P_ ((Lisp_Object));
817static void redisplay_internal P_ ((int)); 818static void redisplay_internal P_ ((int));
818static int echo_area_display P_ ((int)); 819static int echo_area_display P_ ((int));
819static void redisplay_windows P_ ((Lisp_Object)); 820static void redisplay_windows P_ ((Lisp_Object));
@@ -9542,6 +9543,44 @@ reconsider_clip_changes (w, b)
9542 } 9543 }
9543} 9544}
9544 9545
9546
9547/* Select FRAME to forward the values of frame-local variables into C
9548 variables so that the redisplay routines can access those values
9549 directly. */
9550
9551static void
9552select_frame_for_redisplay (frame)
9553 Lisp_Object frame;
9554{
9555 Lisp_Object tail, sym, val;
9556 Lisp_Object old = selected_frame;
9557
9558 selected_frame = frame;
9559
9560 for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail))
9561 if (CONSP (XCAR (tail))
9562 && (sym = XCAR (XCAR (tail)),
9563 SYMBOLP (sym))
9564 && (sym = indirect_variable (sym),
9565 val = SYMBOL_VALUE (sym),
9566 (BUFFER_LOCAL_VALUEP (val)
9567 || SOME_BUFFER_LOCAL_VALUEP (val)))
9568 && XBUFFER_LOCAL_VALUE (val)->check_frame)
9569 Fsymbol_value (sym);
9570
9571 for (tail = XFRAME (old)->param_alist; CONSP (tail); tail = XCDR (tail))
9572 if (CONSP (XCAR (tail))
9573 && (sym = XCAR (XCAR (tail)),
9574 SYMBOLP (sym))
9575 && (sym = indirect_variable (sym),
9576 val = SYMBOL_VALUE (sym),
9577 (BUFFER_LOCAL_VALUEP (val)
9578 || SOME_BUFFER_LOCAL_VALUEP (val)))
9579 && XBUFFER_LOCAL_VALUE (val)->check_frame)
9580 Fsymbol_value (sym);
9581}
9582
9583
9545#define STOP_POLLING \ 9584#define STOP_POLLING \
9546do { if (! polling_stopped_here) stop_polling (); \ 9585do { if (! polling_stopped_here) stop_polling (); \
9547 polling_stopped_here = 1; } while (0) 9586 polling_stopped_here = 1; } while (0)
@@ -9607,7 +9646,8 @@ redisplay_internal (preserve_echo_area)
9607 /* Record a function that resets redisplaying_p to its old value 9646 /* Record a function that resets redisplaying_p to its old value
9608 when we leave this function. */ 9647 when we leave this function. */
9609 count = SPECPDL_INDEX (); 9648 count = SPECPDL_INDEX ();
9610 record_unwind_protect (unwind_redisplay, make_number (redisplaying_p)); 9649 record_unwind_protect (unwind_redisplay,
9650 Fcons (make_number (redisplaying_p), selected_frame));
9611 ++redisplaying_p; 9651 ++redisplaying_p;
9612 specbind (Qinhibit_free_realized_faces, Qnil); 9652 specbind (Qinhibit_free_realized_faces, Qnil);
9613 9653
@@ -10021,6 +10061,11 @@ redisplay_internal (preserve_echo_area)
10021 10061
10022 if (FRAME_WINDOW_P (f) || f == sf) 10062 if (FRAME_WINDOW_P (f) || f == sf)
10023 { 10063 {
10064 if (! EQ (frame, selected_frame))
10065 /* Select the frame, for the sake of frame-local
10066 variables. */
10067 select_frame_for_redisplay (frame);
10068
10024#ifdef HAVE_WINDOW_SYSTEM 10069#ifdef HAVE_WINDOW_SYSTEM
10025 if (clear_face_cache_count % 50 == 0 10070 if (clear_face_cache_count % 50 == 0
10026 && FRAME_WINDOW_P (f)) 10071 && FRAME_WINDOW_P (f))
@@ -10273,13 +10318,20 @@ redisplay_preserve_echo_area (from_where)
10273/* Function registered with record_unwind_protect in 10318/* Function registered with record_unwind_protect in
10274 redisplay_internal. Reset redisplaying_p to the value it had 10319 redisplay_internal. Reset redisplaying_p to the value it had
10275 before redisplay_internal was called, and clear 10320 before redisplay_internal was called, and clear
10276 prevent_freeing_realized_faces_p. */ 10321 prevent_freeing_realized_faces_p. It also selects the previously
10322 selected frame. */
10277 10323
10278static Lisp_Object 10324static Lisp_Object
10279unwind_redisplay (old_redisplaying_p) 10325unwind_redisplay (val)
10280 Lisp_Object old_redisplaying_p; 10326 Lisp_Object val;
10281{ 10327{
10328 Lisp_Object old_redisplaying_p, old_frame;
10329
10330 old_redisplaying_p = XCAR (val);
10282 redisplaying_p = XFASTINT (old_redisplaying_p); 10331 redisplaying_p = XFASTINT (old_redisplaying_p);
10332 old_frame = XCDR (val);
10333 if (! EQ (old_frame, selected_frame))
10334 select_frame_for_redisplay (old_frame);
10283 return Qnil; 10335 return Qnil;
10284} 10336}
10285 10337