(scan_lists): Follow coding convention.
[bpt/emacs.git] / src / dispnew.c
index 7a80a8a..a4219ea 100644 (file)
@@ -1,7 +1,7 @@
 /* Updating of data structures for redisplay.
    Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
                  1997, 1998, 1999, 2000, 2001, 2002, 2003,
-                 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+                 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -36,7 +36,7 @@ Boston, MA 02110-1301, USA.  */
 #include "dispextern.h"
 #include "cm.h"
 #include "buffer.h"
-#include "charset.h"
+#include "character.h"
 #include "keyboard.h"
 #include "frame.h"
 #include "termhooks.h"
@@ -1993,7 +1993,7 @@ required_matrix_height (w)
   if (FRAME_WINDOW_P (f))
     {
       int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f);
-      int window_pixel_height = window_box_height (w) + abs (w->vscroll);
+      int window_pixel_height = window_box_height (w) + eabs (w->vscroll);
       return (((window_pixel_height + ch_height - 1)
               / ch_height) * w->nrows_scale_factor
              /* One partially visible line at the top and
@@ -6386,9 +6386,7 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe)
 
   record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
 
-  /* This isn't quite a no-op: it runs window-configuration-change-hook.  */
-  Fset_window_buffer (FRAME_SELECTED_WINDOW (f),
-                     XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer, Qt);
+  run_window_configuration_change_hook (f);
 
   unbind_to (count, Qnil);
 }
@@ -6893,8 +6891,12 @@ init_display ()
       exit (1);
     }
 
+#ifdef WINDOWSNT
+  terminal_type = "w32console";
+#else
   /* Look at the TERM variable.  */
   terminal_type = (char *) getenv ("TERM");
+#endif
   if (!terminal_type)
     {
 #ifdef VMS
@@ -6956,7 +6958,6 @@ For types not defined in VMS, use  define emacs_term \"TYPE\".\n\
       (*initial_terminal->delete_terminal_hook) (initial_terminal);
 
     /* Update frame parameters to reflect the new type. */
-    Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
     Fmodify_frame_parameters
       (selected_frame, Fcons (Fcons (Qtty_type,
                                      Ftty_type (selected_frame)), Qnil));
@@ -7106,9 +7107,14 @@ It is up to you to set this variable if your terminal can do that.  */);
 The value is a symbol--for instance, `x' for X windows.
 The value is nil if Emacs is using a text-only terminal.  */);
 
+  DEFVAR_KBOARD ("window-system", Vwindow_system,
+                doc: /* Name of window system through which the selected frame is displayed.
+The value is a symbol--for instance, `x' for X windows.
+The value is nil if the selected frame is on a text-only-terminal.  */);
+
   DEFVAR_LISP ("window-system-version", &Vwindow_system_version,
               doc: /* The version number of the window system in use.
-For X windows, this is 10 or 11.  */);
+For X windows, this is 11.  */);
 
   DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area,
               doc: /* Non-nil means put cursor in minibuffer, at end of any message there.  */);