]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge remote-tracking branch 'origin/master' into pdumper
authorDaniel Colascione <dancol@dancol.org>
Mon, 14 Jan 2019 10:41:18 +0000 (02:41 -0800)
committerDaniel Colascione <dancol@dancol.org>
Mon, 14 Jan 2019 10:41:18 +0000 (02:41 -0800)
1  2 
src/alloc.c
src/editfns.c
src/fns.c
src/frame.c
src/image.c
src/window.c
src/xterm.c

diff --cc src/alloc.c
Simple merge
diff --cc src/editfns.c
Simple merge
diff --cc src/fns.c
Simple merge
diff --cc src/frame.c
index a5563cc93130e8cd212f53bd3801217306dbe9e9,6d93abd09bfa72df0ce97ea83044416144792fbf..aa1a15ff006a3b4a2ef2f77d058611d19cae1232
@@@ -53,12 -53,13 +53,14 @@@ along with GNU Emacs.  If not, see <htt
  #ifdef USE_X_TOOLKIT
  #include "widget.h"
  #endif
 +#include "pdumper.h"
  
  /* The currently selected frame.  */
  Lisp_Object selected_frame;
  
+ /* The selected frame the last time window change functions were run.  */
+ Lisp_Object old_selected_frame;
  /* A frame which is not just a mini-buffer, or NULL if there are no such
     frames.  This is usually the most recent such frame that was selected.  */
  
diff --cc src/image.c
Simple merge
diff --cc src/window.c
index aaa488c5568dce0cb84033a6f06dfabacc03c2b7,0fc4f622995a84e0531c99f4910f762d299f326c..7eb532f78cf07085e69d50282b3e15e1e162c47c
@@@ -7583,57 -7879,11 +7883,57 @@@ static void init_window_once_for_pdumpe
  void
  init_window_once (void)
  {
 +  minibuf_window = Qnil;
 +  staticpro (&minibuf_window);
 +
 +  selected_window = Qnil;
 +  staticpro (&selected_window);
 +
 +  Vwindow_list = Qnil;
 +  staticpro (&Vwindow_list);
 +
 +  minibuf_selected_window = Qnil;
 +  staticpro (&minibuf_selected_window);
 +
 +  pdumper_do_now_and_after_load (init_window_once_for_pdumper);
 +}
 +
 +static void init_window_once_for_pdumper (void)
 +{
 +  window_scroll_pixel_based_preserve_x = -1;
 +  window_scroll_pixel_based_preserve_y = -1;
 +  window_scroll_preserve_hpos = -1;
 +  window_scroll_preserve_vpos = -1;
 +  PDUMPER_IGNORE (sequence_number);
 +
 +  PDUMPER_RESET_LV (minibuf_window, Qnil);
 +  PDUMPER_RESET_LV (selected_window, Qnil);
 +  PDUMPER_RESET_LV (Vwindow_list, Qnil);
 +  PDUMPER_RESET_LV (minibuf_selected_window, Qnil);
 +
 +  /* Hack: if mode_line_in_non_selected_windows is true (which it may
 +     be, if we're restoring from a dump) the guts of
 +     make_initial_frame will try to access selected_window, which is
 +     invalid at this point, and lose.  For the purposes of creating
 +     the initial frame and window, this variable must be false.  */
 +  bool old_mode_line_in_non_selected_windows;
 +
 +  /* Snapshot dumped_with_pdumper to suppress compiler warning.  */
 +  bool saved_dumped_with_pdumper = dumped_with_pdumper_p ();
 +  if (saved_dumped_with_pdumper)
 +    {
 +      old_mode_line_in_non_selected_windows
 +        = mode_line_in_non_selected_windows;
 +      mode_line_in_non_selected_windows = false;
 +    }
    struct frame *f = make_initial_frame ();
 +  if (saved_dumped_with_pdumper)
 +    mode_line_in_non_selected_windows =
 +      old_mode_line_in_non_selected_windows;
    XSETFRAME (selected_frame, f);
-   Vterminal_frame = selected_frame;
+   old_selected_frame = Vterminal_frame = selected_frame;
    minibuf_window = f->minibuffer_window;
-   selected_window = f->selected_window;
+   old_selected_window = selected_window = f->selected_window;
  }
  
  void
diff --cc src/xterm.c
Simple merge