]> code.delx.au - gnu-emacs/commitdiff
'temacs -nw' should not call missing functions
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Jan 2015 21:20:36 +0000 (13:20 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Jan 2015 21:21:03 +0000 (13:21 -0800)
Without this patch, "temacs -nw" fails with the diagnostic
"emacs: Symbol's function definition is void: frame-windows-min-size"
and messes up the tty's state.
* lib-src/make-docfile.c (write_globals):
Declare Fframe_windows_min_size with ATTRIBUTE_CONST, too.  Sort.
* src/frame.c (Fframe_windows_min_size): New placeholder function.
(syms_of_frame): Define it.
* src/window.c (Fwindow__sanitize_window_sizes): New placeholder.
(syms_of_window): Define it.

lib-src/ChangeLog
lib-src/make-docfile.c
src/ChangeLog
src/frame.c
src/window.c

index 5d17324fdce92e84545a65d78930518b66cc5dcb..acbbd3a02df9aa809e0a1f216bdb3f0649c5f692 100644 (file)
@@ -1,5 +1,9 @@
 2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
 
+       'temacs -nw' should not call missing functions
+       * make-docfile.c (write_globals):
+       Declare Fframe_windows_min_size with ATTRIBUTE_CONST, too.  Sort.
+
        Less 'make' chatter for lib-src
        * Makefile.in (blessmail): Less 'make' chatter here.
 
index 78becac6c8af5d7d1ac3b4afc3de06954bde98f4..f74b3d516d12af34795b502018979cdd79bf1338 100644 (file)
@@ -658,9 +658,10 @@ write_globals (void)
          /* It would be nice to have a cleaner way to deal with these
             special hacks, too.  */
          if (strcmp (globals[i].name, "Fbyteorder") == 0
-             || strcmp (globals[i].name, "Ftool_bar_height") == 0
+             || strcmp (globals[i].name, "Fframe_windows_min_size") == 0
+             || strcmp (globals[i].name, "Fidentity") == 0
              || strcmp (globals[i].name, "Fmax_char") == 0
-             || strcmp (globals[i].name, "Fidentity") == 0)
+             || strcmp (globals[i].name, "Ftool_bar_height") == 0)
            fputs (" ATTRIBUTE_CONST", stdout);
 
          puts (";");
index 592a7f1e3bf567ff038cba243f2cae40a29c1ac8..8cf269680dee276e63812bf26eee769855f7cc26 100644 (file)
@@ -1,5 +1,14 @@
 2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
 
+       'temacs -nw' should not call missing functions
+       Without this patch, "temacs -nw" fails with the diagnostic
+       "emacs: Symbol's function definition is void: frame-windows-min-size"
+       and messes up the tty's state.
+       * frame.c (Fframe_windows_min_size): New placeholder function.
+       (syms_of_frame): Define it.
+       * window.c (Fwindow__sanitize_window_sizes): New placeholder.
+       (syms_of_window): Define it.
+
        Less 'make' chatter for lisp dir
        * Makefile.in (%.elc): Adjust to compile-onefile change in
        ../lisp/Makefile.in.
index 5a0d142afbbd220d69e0db1d1345a14ecfa3ed54..9394ae481f5110536f7f3cf27cf9d3838b378c04 100644 (file)
@@ -334,10 +334,22 @@ predicates which report frame's specific UI-related capabilities.  */)
     return type;
 }
 
+/* Placeholder used by temacs -nw before window.el is loaded.  */
+DEFUN ("frame-windows-min-size", Fframe_windows_min_size,
+       Sframe_windows_min_size, 4, 4, 0,
+       doc: /* */)
+     (Lisp_Object frame, Lisp_Object horizontal,
+      Lisp_Object ignore, Lisp_Object pixelwise)
+{
+  return make_number (0);
+}
+
 static int
-frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise)
+frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
+                       Lisp_Object ignore, Lisp_Object pixelwise)
 {
-  return XINT (call4 (Qframe_windows_min_size, frame, horizontal, ignore, pixelwise));
+  return XINT (call4 (Qframe_windows_min_size, frame, horizontal,
+                     ignore, pixelwise));
 }
 
 
@@ -5081,6 +5093,7 @@ even if this option is non-nil.  */);
   defsubr (&Sframep);
   defsubr (&Sframe_live_p);
   defsubr (&Swindow_system);
+  defsubr (&Sframe_windows_min_size);
   defsubr (&Smake_terminal_frame);
   defsubr (&Shandle_switch_frame);
   defsubr (&Sselect_frame);
index 938f1a3268f830191edaa8307ffa45ac720ebba4..45dfb9ea1c21e300339c0bcd3267ce1612b5c851 100644 (file)
@@ -3014,6 +3014,14 @@ resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizonta
   return call5 (Qwindow_resize_root_window, window, delta, horizontal, ignore, pixelwise);
 }
 
+/* Placeholder used by temacs -nw before window.el is loaded.  */
+DEFUN ("window--sanitize-window-sizes", Fwindow__sanitize_window_sizes,
+       Swindow__sanitize_window_sizes, 2, 2, 0,
+       doc: /* */)
+     (Lisp_Object frame, Lisp_Object horizontal)
+{
+  return Qnil;
+}
 
 Lisp_Object
 sanitize_window_sizes (Lisp_Object frame, Lisp_Object horizontal)
@@ -7563,6 +7571,7 @@ displayed after a scrolling operation to be somewhat inaccurate.  */);
   defsubr (&Sset_window_display_table);
   defsubr (&Snext_window);
   defsubr (&Sprevious_window);
+  defsubr (&Swindow__sanitize_window_sizes);
   defsubr (&Sget_buffer_window);
   defsubr (&Sdelete_other_windows_internal);
   defsubr (&Sdelete_window_internal);