emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/window.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/window.c,v
Date: Mon, 28 Jan 2008 19:05:17 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/01/28 19:05:16

Index: window.c
===================================================================
RCS file: /sources/emacs/emacs/src/window.c,v
retrieving revision 1.600
retrieving revision 1.601
diff -u -b -r1.600 -r1.601
--- window.c    19 Jan 2008 05:11:01 -0000      1.600
+++ window.c    28 Jan 2008 19:05:13 -0000      1.601
@@ -3307,6 +3307,25 @@
 EXFUN (Fset_window_fringes, 4);
 EXFUN (Fset_window_scroll_bars, 4);
 
+void
+run_window_configuration_change_hook (struct frame *f)
+{
+  if (! NILP (Vwindow_configuration_change_hook)
+      && ! NILP (Vrun_hooks))
+    {
+      int count = SPECPDL_INDEX ();
+      if (SELECTED_FRAME () != f)
+       {
+         Lisp_Object frame;
+         XSETFRAME (frame, f);
+         record_unwind_protect (Fselect_frame, Fselected_frame ());
+         Fselect_frame (frame);
+       }
+      call1 (Vrun_hooks, Qwindow_configuration_change_hook);
+      unbind_to (count, Qnil);
+    }
+}
+
 /* Make WINDOW display BUFFER as its contents.  RUN_HOOKS_P non-zero
    means it's allowed to run hooks.  See make_frame for a case where
    it's not allowed.  KEEP_MARGINS_P non-zero means that the current
@@ -3408,10 +3427,7 @@
       if (! NILP (Vwindow_scroll_functions))
        run_hook_with_args_2 (Qwindow_scroll_functions, window,
                              Fmarker_position (w->start));
-
-      if (! NILP (Vwindow_configuration_change_hook)
-         && ! NILP (Vrun_hooks))
-       call1 (Vrun_hooks, Qwindow_configuration_change_hook);
+      run_window_configuration_change_hook (XFRAME (WINDOW_FRAME (w)));
     }
 
   unbind_to (count, Qnil);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]