Trailing whitespace deleted.
[bpt/emacs.git] / src / xfns.c
index 9612d1c..44a54da 100644 (file)
@@ -288,11 +288,11 @@ check_x_display_info (frame)
      Lisp_Object frame;
 {
   struct x_display_info *dpyinfo = NULL;
-  
+
   if (NILP (frame))
     {
       struct frame *sf = XFRAME (selected_frame);
-      
+
       if (FRAME_X_P (sf) && FRAME_LIVE_P (sf))
        dpyinfo = FRAME_X_DISPLAY_INFO (sf);
       else if (x_display_list != 0)
@@ -336,7 +336,7 @@ x_window_to_frame (dpyinfo, wdesc)
       if (f->output_data.x->hourglass_window == wdesc)
        return f;
 #ifdef USE_X_TOOLKIT
-      if ((f->output_data.x->edit_widget 
+      if ((f->output_data.x->edit_widget
           && XtWindow (f->output_data.x->edit_widget) == wdesc)
          /* A tooltip frame?  */
          || (!f->output_data.x->edit_widget
@@ -380,7 +380,7 @@ x_any_window_to_frame (dpyinfo, wdesc)
       frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
-      
+
       f = XFRAME (frame);
       if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo)
        {
@@ -399,8 +399,8 @@ x_any_window_to_frame (dpyinfo, wdesc)
                       || gwdesc == x->menubar_widget))
                 found = f;
 #else
-             if (wdesc == XtWindow (x->widget) 
-                 || wdesc == XtWindow (x->column_widget) 
+             if (wdesc == XtWindow (x->widget)
+                 || wdesc == XtWindow (x->column_widget)
                  || wdesc == XtWindow (x->edit_widget))
                found = f;
              /* Match if the window is this frame's menubar.  */
@@ -413,7 +413,7 @@ x_any_window_to_frame (dpyinfo, wdesc)
            found = f;
        }
     }
-  
+
   return found;
 }
 
@@ -450,8 +450,8 @@ x_non_menubar_window_to_frame (dpyinfo, wdesc)
                   || gwdesc == x->vbox_widget))
             return f;
 #else
-         if (wdesc == XtWindow (x->widget) 
-             || wdesc == XtWindow (x->column_widget) 
+         if (wdesc == XtWindow (x->widget)
+             || wdesc == XtWindow (x->column_widget)
              || wdesc == XtWindow (x->edit_widget))
            return f;
 #endif
@@ -489,7 +489,7 @@ x_menubar_window_to_frame (dpyinfo, wdesc)
         {
           GtkWidget *gwdesc = xg_win_to_widget (wdesc);
           int found = 0;
-          
+
           BLOCK_INPUT;
           if (gwdesc != 0
               && (gwdesc == x->menubar_widget
@@ -543,7 +543,7 @@ x_top_window_to_frame (dpyinfo, wdesc)
         but it seems logically wrong,
         and it causes trouble for MapNotify events.  */
          /* Match if the window is this frame's menubar.  */
-         if (x->menubar_widget 
+         if (x->menubar_widget
              && wdesc == XtWindow (x->menubar_widget))
            return f;
 #endif
@@ -860,7 +860,7 @@ static struct x_frame_parm_table x_frame_parms[] =
   {"right-fringe",             x_set_fringe_width},
   {"wait-for-wm",              x_set_wait_for_wm},
   {"fullscreen",                x_set_fullscreen},
-  
+
 };
 
 /* Attach the `x-frame-parameter' properties to
@@ -979,7 +979,7 @@ x_set_frame_parameters (f, alist)
      cursor_color) are dependent upon them.  */
   /* Process default font as well, since fringe widths depends on it.  */
   /* Also, process fullscreen, width and height depend upon that */
-  for (p = 0; p < i; p++) 
+  for (p = 0; p < i; p++)
     {
       Lisp_Object prop, val;
 
@@ -994,7 +994,7 @@ x_set_frame_parameters (f, alist)
 
          old_value = get_frame_param (f, prop);
          fullscreen_is_being_set |= EQ (prop, Qfullscreen);
-         
+
          if (NILP (Fequal (val, old_value)))
            {
              store_frame_param (f, prop, val);
@@ -1094,11 +1094,11 @@ x_set_frame_parameters (f, alist)
          position.  Resize of the frame is taken care of in the code after
          this if-statement. */
       int new_left, new_top;
-      
+
       x_fullscreen_adjust (f, &width, &height, &new_top, &new_left);
       x_fullscreen_move (f, new_top, new_left);
     }
-  
+
   /* Don't set these parameters unless they've been explicitly
      specified.  The window might be mapped or resized while we're in
      this function, and we don't want to override that unless the lisp
@@ -1242,12 +1242,12 @@ x_real_positions (f, xptr, yptr)
 
       win = wm_window;
     }
-    
+
   if (! had_errors)
     {
       int ign;
       Window child, rootw;
-          
+
       /* Get the real coordinates for the WM window upper left corner */
       XGetGeometry (FRAME_X_DISPLAY (f), win,
                     &rootw, &real_x, &real_y, &ign, &ign, &ign, &ign);
@@ -1286,23 +1286,23 @@ x_real_positions (f, xptr, yptr)
                                  /* From-window, to-window.  */
                                  FRAME_X_DISPLAY_INFO (f)->root_window,
                                  FRAME_OUTER_WINDOW (f),
-                                     
+
                                  /* From-position, to-position.  */
                                  real_x, real_y, &outer_x, &outer_y,
-                         
+
                                  /* Child of win.  */
                                  &child);
     }
 
       had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
     }
-      
+
   x_uncatch_errors (FRAME_X_DISPLAY (f), count);
-      
+
   UNBLOCK_INPUT;
 
   if (had_errors) return;
-      
+
   f->output_data.x->x_pixels_diff = -win_x;
   f->output_data.x->y_pixels_diff = -win_y;
   f->output_data.x->x_pixels_outer_diff = -outer_x;
@@ -1562,7 +1562,7 @@ x_set_foreground_color (f, arg, oldval)
   if (FRAME_X_WINDOW (f) != 0)
     {
       Display *dpy = FRAME_X_DISPLAY (f);
-      
+
       BLOCK_INPUT;
       XSetForeground (dpy, x->normal_gc, fg);
       XSetBackground (dpy, x->reverse_gc, fg);
@@ -1573,15 +1573,15 @@ x_set_foreground_color (f, arg, oldval)
          x->cursor_pixel = x_copy_color (f, fg);
          XSetBackground (dpy, x->cursor_gc, x->cursor_pixel);
        }
-      
+
       UNBLOCK_INPUT;
-      
+
       update_face_from_frame_parameter (f, Qforeground_color, arg);
-      
+
       if (FRAME_VISIBLE_P (f))
         redraw_frame (f);
     }
-      
+
   unload_color (f, old_fg);
 }
 
@@ -1600,7 +1600,7 @@ x_set_background_color (f, arg, oldval)
   if (FRAME_X_WINDOW (f) != 0)
     {
       Display *dpy = FRAME_X_DISPLAY (f);
-      
+
       BLOCK_INPUT;
       XSetBackground (dpy, x->normal_gc, bg);
       XSetForeground (dpy, x->reverse_gc, bg);
@@ -1689,7 +1689,7 @@ x_set_mouse_color (f, arg, oldval)
   else
     hourglass_cursor = XCreateFontCursor (dpy, XC_watch);
   x_check_errors (dpy, "bad hourglass pointer cursor: %s");
-  
+
   x_check_errors (dpy, "bad nontext pointer cursor: %s");
   if (!NILP (Vx_mode_pointer_shape))
     {
@@ -1730,7 +1730,7 @@ x_set_mouse_color (f, arg, oldval)
     x_query_color (f, &fore_color);
     back_color.pixel = mask_color;
     x_query_color (f, &back_color);
-    
+
     XRecolorCursor (dpy, cursor, &fore_color, &back_color);
     XRecolorCursor (dpy, nontext_cursor, &fore_color, &back_color);
     XRecolorCursor (dpy, mode_cursor, &fore_color, &back_color);
@@ -1761,7 +1761,7 @@ x_set_mouse_color (f, arg, oldval)
       && x->modeline_cursor != 0)
     XFreeCursor (dpy, f->output_data.x->modeline_cursor);
   x->modeline_cursor = mode_cursor;
-  
+
   if (cross_cursor != x->cross_cursor
       && x->cross_cursor != 0)
     XFreeCursor (dpy, x->cross_cursor);
@@ -1795,7 +1795,7 @@ x_set_cursor_color (f, arg, oldval)
     }
   else
     fore_pixel = x->background_pixel;
-  
+
   pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
   pixel_allocated_p = 1;
 
@@ -1807,7 +1807,7 @@ x_set_cursor_color (f, arg, oldval)
          x_free_colors (f, &pixel, 1);
          pixel_allocated_p = 0;
        }
-      
+
       pixel = x->mouse_pixel;
       if (pixel == fore_pixel)
        {
@@ -2015,7 +2015,7 @@ x_set_font (f, arg, oldval)
            ? x_new_fontset (f, SDATA (fontset_name))
            : x_new_font (f, SDATA (arg)));
   UNBLOCK_INPUT;
-  
+
   if (EQ (result, Qnil))
     error ("Font `%s' is not defined", SDATA (arg));
   else if (EQ (result, Qt))
@@ -2031,7 +2031,7 @@ x_set_font (f, arg, oldval)
        }
       else if (!NILP (Fequal (result, oldval)))
        return;
-      
+
       store_frame_param (f, Qfont, result);
       recompute_basic_faces (f);
     }
@@ -2245,7 +2245,7 @@ x_set_tool_bar_lines (f, value, oldval)
 
   return;
 #endif
-  
+
      /* Make sure we redisplay all windows in this frame.  */
   ++windows_or_buffers_changed;
 
@@ -2263,7 +2263,7 @@ x_set_tool_bar_lines (f, value, oldval)
   FRAME_TOOL_BAR_LINES (f) = nlines;
   x_change_window_heights (root_window, delta);
   adjust_glyphs (f);
-  
+
   /* We also have to make sure that the internal border at the top of
      the frame, below the menu bar or tool bar, is redrawn when the
      tool bar disappears.  This is so because the internal border is
@@ -2309,7 +2309,7 @@ x_set_scroll_bar_foreground (f, value, oldval)
      Lisp_Object value, oldval;
 {
   unsigned long pixel;
-  
+
   if (STRINGP (value))
     pixel = x_decode_color (f, value, BLACK_PIX_DEFAULT (f));
   else
@@ -2317,7 +2317,7 @@ x_set_scroll_bar_foreground (f, value, oldval)
 
   if (f->output_data.x->scroll_bar_foreground_pixel != -1)
     unload_color (f, f->output_data.x->scroll_bar_foreground_pixel);
-  
+
   f->output_data.x->scroll_bar_foreground_pixel = pixel;
   if (FRAME_X_WINDOW (f) && FRAME_VISIBLE_P (f))
     {
@@ -2349,10 +2349,10 @@ x_set_scroll_bar_background (f, value, oldval)
     pixel = x_decode_color (f, value, WHITE_PIX_DEFAULT (f));
   else
     pixel = -1;
-  
+
   if (f->output_data.x->scroll_bar_background_pixel != -1)
     unload_color (f, f->output_data.x->scroll_bar_background_pixel);
-  
+
 #ifdef USE_TOOLKIT_SCROLL_BARS
   /* Scrollbar shadow colors.  */
   if (f->output_data.x->scroll_bar_top_shadow_pixel != -1)
@@ -2375,7 +2375,7 @@ x_set_scroll_bar_background (f, value, oldval)
        (*condemn_scroll_bars_hook) (f);
       if (judge_scroll_bars_hook)
        (*judge_scroll_bars_hook) (f);
-      
+
       update_face_from_frame_parameter (f, Qscroll_bar_background, value);
       redraw_frame (f);
     }
@@ -2470,7 +2470,7 @@ x_set_name (f, name, explicit)
      Lisp_Object name;
      int explicit;
 {
-  /* Make sure that requests from lisp code override requests from 
+  /* Make sure that requests from lisp code override requests from
      Emacs redisplay code.  */
   if (explicit)
     {
@@ -2736,7 +2736,7 @@ x_set_vertical_scroll_bars (f, arg, oldval)
        = (NILP (arg)
           ? vertical_scroll_bar_none
           : EQ (Qright, arg)
-          ? vertical_scroll_bar_right 
+          ? vertical_scroll_bar_right
           : vertical_scroll_bar_left);
 
       /* We set this parameter before creating the X window for the
@@ -2767,7 +2767,7 @@ x_set_scroll_bar_width (f, arg, oldval)
       /* Make the actual width at least 14 pixels and a multiple of a
         character width.  */
       FRAME_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
-      
+
       /* Use all of that space (aside from required margins) for the
         scroll bar.  */
       FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 0;
@@ -3096,7 +3096,7 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type)
              if (!strcmp (SDATA (tem), "on")
                  || !strcmp (SDATA (tem), "true"))
                return Qt;
-             else 
+             else
                return Qnil;
 
            case RES_TYPE_STRING:
@@ -3215,11 +3215,11 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass,
             specified.  */
          tem = Qnil;
        }
-      
+
 #else /* not USE_TOOLKIT_SCROLL_BARS */
-      
+
       tem = Qnil;
-      
+
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
     }
 
@@ -3417,7 +3417,7 @@ x_figure_window_size (f, parms)
     {
       int left, top;
       int width, height;
-      
+
       /* It takes both for some WM:s to place it where we want */
       window_prompting = USPosition | PPosition;
       x_fullscreen_adjust (f, &width, &height, &top, &left);
@@ -3428,7 +3428,7 @@ x_figure_window_size (f, parms)
       f->output_data.x->left_pos = left;
       f->output_data.x->top_pos = top;
     }
-  
+
   return window_prompting;
 }
 
@@ -3551,13 +3551,13 @@ xic_create_xfontset (f, base_fontname)
   char **missing_list;
   int missing_count;
   char *def_string;
-  
+
   xfs = XCreateFontSet (FRAME_X_DISPLAY (f),
                        base_fontname, &missing_list,
                        &missing_count, &def_string);
   if (missing_list)
     XFreeStringList (missing_list);
-  
+
   /* No need to free def_string. */
   return xfs;
 }
@@ -3597,7 +3597,7 @@ create_frame_xic (f)
 
   if (FRAME_XIC (f))
     return;
-  
+
   xim = FRAME_X_XIM (f);
   if (xim)
     {
@@ -3695,7 +3695,7 @@ create_frame_xic (f)
       XFree (preedit_attr);
       XFree (status_attr);
     }
-  
+
   FRAME_XIC (f) = xic;
   FRAME_XIC_STYLE (f) = xic_style;
   FRAME_XIC_FONTSET (f) = xfs;
@@ -3710,7 +3710,7 @@ free_frame_xic (f)
 {
   if (FRAME_XIC (f) == NULL)
     return;
-  
+
   XDestroyIC (FRAME_XIC (f));
   if (FRAME_XIC_FONTSET (f))
     XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f));
@@ -3731,7 +3731,7 @@ xic_set_preeditarea (w, x, y)
   struct frame *f = XFRAME (w->frame);
   XVaNestedList attr;
   XPoint spot;
-      
+
   spot.x = WINDOW_TO_FRAME_PIXEL_X (w, x);
   spot.y = WINDOW_TO_FRAME_PIXEL_Y (w, y) + FONT_BASE (FRAME_FONT (f));
   attr = XVaCreateNestedList (0, XNSpotLocation, &spot, NULL);
@@ -3757,7 +3757,7 @@ xic_set_statusarea (f)
   attr = XVaCreateNestedList (0, XNAreaNeeded, &area, NULL);
   XSetICValues (xic, XNStatusAttributes, attr, NULL);
   XFree (attr);
-  
+
   attr = XVaCreateNestedList (0, XNAreaNeeded, &needed, NULL);
   XGetICValues (xic, XNStatusAttributes, attr, NULL);
   XFree (attr);
@@ -3803,7 +3803,7 @@ xic_set_xfontset (f, base_fontname)
   if (FRAME_XIC_STYLE (f) & XIMStatusArea)
     XSetICValues (FRAME_XIC (f), XNStatusAttributes, attr, NULL);
   XFree (attr);
-  
+
   if (FRAME_XIC_FONTSET (f))
     XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f));
   FRAME_XIC_FONTSET (f) = xfs;
@@ -3839,7 +3839,7 @@ x_window (f, window_prompting, minibuffer_only)
      for the window manager, so GC relocation won't bother it.
 
      Elsewhere we specify the window name for the window manager.  */
-     
+
   {
     char *str = (char *) SDATA (Vx_resource_name);
     f->namebuf = (char *) xmalloc (strlen (str) + 1);
@@ -3876,7 +3876,7 @@ x_window (f, window_prompting, minibuffer_only)
   XtSetValues (pane_widget, al, ac);
   f->output_data.x->column_widget = pane_widget;
 
-  /* mappedWhenManaged to false tells to the paned window to not map/unmap 
+  /* mappedWhenManaged to false tells to the paned window to not map/unmap
      the emacs screen when changing menubar.  This reduces flickering.  */
 
   ac = 0;
@@ -3890,10 +3890,10 @@ x_window (f, window_prompting, minibuffer_only)
   XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
   frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget,
                                 al, ac);
+
   f->output_data.x->edit_widget = frame_widget;
-  XtManageChild (frame_widget); 
+
+  XtManageChild (frame_widget);
 
   /* Do some needed geometry management.  */
   {
@@ -3902,7 +3902,7 @@ x_window (f, window_prompting, minibuffer_only)
     Arg al[2];
     int ac = 0;
     int extra_borders = 0;
-    int menubar_size 
+    int menubar_size
       = (f->output_data.x->menubar_widget
         ? (f->output_data.x->menubar_widget->core.height
            + f->output_data.x->menubar_widget->core.border_width)
@@ -3946,13 +3946,13 @@ x_window (f, window_prompting, minibuffer_only)
 
       if (window_prompting & USPosition)
        sprintf (shell_position, "=%dx%d%c%d%c%d",
-                PIXEL_WIDTH (f) + extra_borders, 
+                PIXEL_WIDTH (f) + extra_borders,
                 PIXEL_HEIGHT (f) + menubar_size + extra_borders,
                 (xneg ? '-' : '+'), left,
                 (yneg ? '-' : '+'), top);
       else
        sprintf (shell_position, "=%dx%d",
-                PIXEL_WIDTH (f) + extra_borders, 
+                PIXEL_WIDTH (f) + extra_borders,
                 PIXEL_HEIGHT (f) + menubar_size + extra_borders);
     }
 
@@ -3970,7 +3970,7 @@ x_window (f, window_prompting, minibuffer_only)
   XtManageChild (pane_widget);
   XtRealizeWidget (shell_widget);
 
-  FRAME_X_WINDOW (f) = XtWindow (frame_widget); 
+  FRAME_X_WINDOW (f) = XtWindow (frame_widget);
 
   validate_x_resource_name ();
 
@@ -4017,7 +4017,7 @@ x_window (f, window_prompting, minibuffer_only)
       attributes.event_mask |= fevent;
     }
 #endif /* HAVE_X_I18N */
-  
+
   attribute_mask = CWEventMask;
   XChangeWindowAttributes (XtDisplay (shell_widget), XtWindow (shell_widget),
                           attribute_mask, &attributes);
@@ -4137,7 +4137,7 @@ x_window (f)
     }
 #endif
 #endif /* HAVE_X_I18N */
-  
+
   validate_x_resource_name ();
 
   class_hints.res_name = (char *) SDATA (Vx_resource_name);
@@ -4302,7 +4302,7 @@ x_make_gc (f)
      this must be done on a per-frame basis.  */
   f->output_data.x->border_tile
     = (XCreatePixmapFromBitmapData
-       (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, 
+       (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
        gray_bits, gray_width, gray_height,
        f->output_data.x->foreground_pixel,
        f->output_data.x->background_pixel,
@@ -4321,7 +4321,7 @@ x_free_gcs (f)
   Display *dpy = FRAME_X_DISPLAY (f);
 
   BLOCK_INPUT;
-  
+
   if (f->output_data.x->normal_gc)
     {
       XFreeGC (dpy, f->output_data.x->normal_gc);
@@ -4333,7 +4333,7 @@ x_free_gcs (f)
       XFreeGC (dpy, f->output_data.x->reverse_gc);
       f->output_data.x->reverse_gc = 0;
     }
-  
+
   if (f->output_data.x->cursor_gc)
     {
       XFreeGC (dpy, f->output_data.x->cursor_gc);
@@ -4366,7 +4366,7 @@ unwind_create_frame (frame)
 #if GLYPH_DEBUG
       struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 #endif
-      
+
       x_free_frame_resources (f);
 
       /* Check that reference counts are indeed correct.  */
@@ -4374,7 +4374,7 @@ unwind_create_frame (frame)
       xassert (dpyinfo->image_cache->refcount == image_cache_refcount);
       return Qt;
     }
-  
+
   return Qnil;
 }
 
@@ -4505,7 +4505,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
     f->output_data.x->cursor_foreground_pixel = -1;
     f->output_data.x->border_pixel = -1;
     f->output_data.x->mouse_pixel = -1;
-    
+
     black = build_string ("black");
     GCPRO1 (black);
     f->output_data.x->foreground_pixel
@@ -4568,7 +4568,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
        else
          font = x_new_font (f, SDATA (font));
       }
-    
+
     /* Try out a font which we hope has bold and italic variations.  */
     if (!STRINGP (font))
       font = x_new_font (f, "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1");
@@ -4599,7 +4599,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
 
   x_default_parameter (f, parms, Qborder_width, make_number (2),
                       "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
-  
+
   /* This defaults to 1 in order to match xterm.  We recognize either
      internalBorderWidth or internalBorder (which is what xterm calls
      it).  */
@@ -4654,7 +4654,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
      end up in init_iterator with a null face cache, which should not
      happen.  */
   init_frame_faces (f);
-  
+
   x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1),
                       "menuBar", "MenuBar", RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qtool_bar_lines, make_number (1),
@@ -4680,7 +4680,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
   if (FRAME_TOOL_BAR_LINES (f))
     {
       int margin, relief, bar_height;
-      
+
       relief = (tool_bar_button_relief >= 0
                ? tool_bar_button_relief
                : DEFAULT_TOOL_BAR_BUTTON_RELIEF);
@@ -4694,7 +4694,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
        margin = XFASTINT (XCDR (Vtool_bar_button_margin));
       else
        margin = 0;
-         
+
       bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief;
       f->height += (bar_height + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f);
     }
@@ -4728,7 +4728,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
 #else
   x_window (f);
 #endif
-  
+
   x_icon (f, parms);
   x_make_gc (f);
 
@@ -4756,7 +4756,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
      f->height.  */
   width = f->width;
   height = f->height;
-  
+
   f->height = 0;
   SET_FRAME_WIDTH (f, 0);
   change_frame_size (f, height, width, 1, 0, 0);
@@ -4819,7 +4819,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
   /* Make sure windows on this frame appear in calls to next-window
      and similar functions.  */
   Vwindow_list = Qnil;
-  
+
   return unbind_to (count, frame);
 }
 
@@ -4867,7 +4867,7 @@ FRAME nil means use the selected frame.  */)
                  RevertToParent, CurrentTime);
   x_uncatch_errors (dpy, count);
   UNBLOCK_INPUT;
-  
+
   return Qnil;
 }
 
@@ -5184,7 +5184,7 @@ If omitted or nil, that stands for the selected frame's display.  */)
       error ("Display has an unknown visual class");
       result = Qnil;
     }
-  
+
   return result;
 }
 
@@ -5339,14 +5339,14 @@ select_visual (dpyinfo)
          || !XMatchVisualInfo (dpy, XScreenNumberOfScreen (screen),
                                dpyinfo->n_planes, class, &vinfo))
        fatal ("Invalid visual specification `%s'", SDATA (value));
-      
+
       dpyinfo->visual = vinfo.visual;
     }
   else
     {
       int n_visuals;
       XVisualInfo *vinfo, vinfo_template;
-      
+
       dpyinfo->visual = DefaultVisualOfScreen (screen);
 
 #ifdef HAVE_X11R4
@@ -5640,7 +5640,7 @@ valid_image_p (object)
      Lisp_Object object;
 {
   int valid_p = 0;
-  
+
   if (CONSP (object) && EQ (XCAR (object), Qimage))
     {
       Lisp_Object tem;
@@ -5656,7 +5656,7 @@ valid_image_p (object)
                if (type)
                  valid_p = type->valid_p (object);
              }
-           
+
            break;
          }
     }
@@ -5775,7 +5775,7 @@ parse_image_spec (spec, keywords, nkeywords, type)
         was found more than once, it's an error.  */
       keywords[i].value = value;
       ++keywords[i].count;
-      
+
       if (keywords[i].count > 1)
        return 0;
 
@@ -5819,7 +5819,7 @@ parse_image_spec (spec, keywords, nkeywords, type)
                   && XINT (value) <= 100)
            break;
          return 0;
-             
+
        case IMAGE_NON_NEGATIVE_INTEGER_VALUE:
          if (!INTEGERP (value) || XINT (value) < 0)
            return 0;
@@ -5830,7 +5830,7 @@ parse_image_spec (spec, keywords, nkeywords, type)
 
        case IMAGE_FUNCTION_VALUE:
          value = indirect_function (value);
-         if (SUBRP (value) 
+         if (SUBRP (value)
              || COMPILEDP (value)
              || (CONSP (value) && EQ (XCAR (value), Qlambda)))
            break;
@@ -5879,7 +5879,7 @@ image_spec_value (spec, key, found)
      int *found;
 {
   Lisp_Object tail;
-  
+
   xassert (valid_image_p (spec));
 
   for (tail = XCDR (spec);
@@ -5893,12 +5893,12 @@ image_spec_value (spec, key, found)
          return XCAR (XCDR (tail));
        }
     }
-  
+
   if (found)
     *found = 0;
   return Qnil;
 }
-     
+
 
 DEFUN ("image-size", Fimage_size, Simage_size, 1, 3, 0,
        doc: /* Return the size of image SPEC as pair (WIDTH . HEIGHT).
@@ -5919,7 +5919,7 @@ or omitted means use the selected frame.  */)
       struct image *img = IMAGE_FROM_ID (f, id);
       int width = img->width + 2 * img->hmargin;
       int height = img->height + 2 * img->vmargin;
-  
+
       if (NILP (pixels))
        size = Fcons (make_float ((double) width / CANON_X_UNIT (f)),
                      make_float ((double) height / CANON_Y_UNIT (f)));
@@ -5976,7 +5976,7 @@ make_image (spec, hash)
      unsigned hash;
 {
   struct image *img = (struct image *) xmalloc (sizeof *img);
-  
+
   xassert (valid_image_p (spec));
   bzero (img, sizeof *img);
   img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL));
@@ -6037,7 +6037,7 @@ prepare_image_for_display (f, img)
   if (img->pixmap == None && !img->load_failed_p)
     img->load_failed_p = img->type->load (f, img) == 0;
 }
-     
+
 
 /* Value is the number of pixels for the ascent of image IMG when
    drawn in face FACE.  */
@@ -6089,7 +6089,7 @@ four_corners_best (ximg, width, height)
   for (i = best_count = 0; i < 4; ++i)
     {
       int j, n;
-         
+
       for (j = n = 0; j < 4; ++j)
        if (corners[i] == corners[j])
          ++n;
@@ -6205,7 +6205,7 @@ x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
       img->mask = None;
       img->background_transparent_valid = 0;
     }
-      
+
   if (colors_p && img->ncolors)
     {
       x_free_colors (f, img->colors, img->ncolors);
@@ -6280,7 +6280,7 @@ make_image_cache ()
 {
   struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c);
   int size;
-  
+
   bzero (c, sizeof *c);
   c->size = 50;
   c->images = (struct image **) xmalloc (c->size * sizeof *c->images);
@@ -6305,7 +6305,7 @@ free_image_cache (f)
 
       /* Cache should not be referenced by any frame when freed.  */
       xassert (c->refcount == 0);
-      
+
       for (i = 0; i < c->used; ++i)
        free_image (f, c->images[i]);
       xfree (c->images);
@@ -6342,7 +6342,7 @@ clear_image_cache (f, force_p)
       /* Block input so that we won't be interrupted by a SIGIO
         while being in an inconsistent state.  */
       BLOCK_INPUT;
-      
+
       for (i = nfreed = 0; i < c->used; ++i)
        {
          struct image *img = c->images[i];
@@ -6361,7 +6361,7 @@ clear_image_cache (f, force_p)
       if (nfreed)
        {
          Lisp_Object tail, frame;
-         
+
          FOR_EACH_FRAME (tail, frame)
            {
              struct frame *f = XFRAME (frame);
@@ -6389,7 +6389,7 @@ FRAME t means clear the image caches of all frames.  */)
   if (EQ (frame, Qt))
     {
       Lisp_Object tail;
-      
+
       FOR_EACH_FRAME (tail, frame)
        if (FRAME_X_P (XFRAME (frame)))
          clear_image_cache (XFRAME (frame), 1);
@@ -6416,7 +6416,7 @@ postprocess_image (f, img)
       Lisp_Object mask;
 
       spec = img->spec;
-      
+
       /* `:heuristic-mask t'
         `:mask heuristic'
         means build a mask heuristically.
@@ -6426,16 +6426,16 @@ postprocess_image (f, img)
         image.
         `:mask nil'
         means remove a mask, if any.  */
-             
+
       mask = image_spec_value (spec, QCheuristic_mask, NULL);
       if (!NILP (mask))
        x_build_heuristic_mask (f, img, mask);
       else
        {
          int found_p;
-                   
+
          mask = image_spec_value (spec, QCmask, &found_p);
-                 
+
          if (EQ (mask, Qheuristic))
            x_build_heuristic_mask (f, img, Qt);
          else if (CONSP (mask)
@@ -6452,8 +6452,8 @@ postprocess_image (f, img)
              img->mask = None;
            }
        }
-         
+
+
       /* Should we apply an image transformation algorithm?  */
       conversion = image_spec_value (spec, QCconversion, NULL);
       if (EQ (conversion, Qdisabled))
@@ -6495,7 +6495,7 @@ lookup_image (f, spec)
      specification.  */
   xassert (FRAME_WINDOW_P (f));
   xassert (valid_image_p (spec));
-  
+
   GCPRO1 (spec);
 
   /* Look up SPEC in the hash table of the image cache.  */
@@ -6510,7 +6510,7 @@ lookup_image (f, spec)
   if (img == NULL)
     {
       extern Lisp_Object Qpostscript;
-      
+
       BLOCK_INPUT;
       img = make_image (spec, hash);
       cache_image (f, img);
@@ -6542,7 +6542,7 @@ lookup_image (f, spec)
            img->ascent = XFASTINT (ascent);
          else if (EQ (ascent, Qcenter))
            img->ascent = CENTERED_IMAGE_ASCENT;
-         
+
          margin = image_spec_value (spec, QCmargin, NULL);
          if (INTEGERP (margin) && XINT (margin) >= 0)
            img->vmargin = img->hmargin = XFASTINT (margin);
@@ -6554,7 +6554,7 @@ lookup_image (f, spec)
              if (XINT (XCDR (margin)) > 0)
                img->vmargin = XFASTINT (XCDR (margin));
            }
-         
+
          relief = image_spec_value (spec, QCrelief, NULL);
          if (INTEGERP (relief))
            {
@@ -6588,9 +6588,9 @@ lookup_image (f, spec)
   /* We're using IMG, so set its timestamp to `now'.  */
   EMACS_GET_TIME (now);
   img->timestamp = EMACS_SECS (now);
-  
+
   UNGCPRO;
-  
+
   /* Value is the image id.  */
   return img->id;
 }
@@ -6742,7 +6742,7 @@ x_put_x_image (f, ximg, pixmap, width, height)
      int width, height;
 {
   GC gc;
-  
+
   xassert (interrupt_input_blocked);
   gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL);
   XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0, width, height);
@@ -6777,7 +6777,7 @@ x_find_image_file (file)
 
   /* Try to find FILE in data-directory, then x-bitmap-file-path.  */
   fd = openp (search_path, file, Qnil, &file_found, Qnil);
-  
+
   if (fd == -1)
     file_found = Qnil;
   else
@@ -6819,7 +6819,7 @@ slurp_file (file, size)
          buf = NULL;
        }
     }
-  
+
   return buf;
 }
 
@@ -6898,7 +6898,7 @@ enum xbm_token
   XBM_TK_NUMBER
 };
 
-  
+
 /* Return non-zero if OBJECT is a valid XBM-type image specification.
    A valid specification is a list starting with the symbol `image'
    The rest of the list is a property list which must contain an
@@ -6933,7 +6933,7 @@ xbm_image_p (object)
      Lisp_Object object;
 {
   struct image_keyword kw[XBM_LAST];
-  
+
   bcopy (xbm_format, kw, sizeof kw);
   if (!parse_image_spec (object, kw, XBM_LAST, Qxbm))
     return 0;
@@ -6965,13 +6965,13 @@ xbm_image_p (object)
       data = kw[XBM_DATA].value;
       width = XFASTINT (kw[XBM_WIDTH].value);
       height = XFASTINT (kw[XBM_HEIGHT].value);
-      
+
       /* Check type of data, and width and height against contents of
         data.  */
       if (VECTORP (data))
        {
          int i;
-         
+
          /* Number of elements of the vector must be >= height.  */
          if (XVECTOR (data)->size < height)
            return 0;
@@ -7031,7 +7031,7 @@ xbm_scan (s, end, sval, ival)
   int c;
 
  loop:
-  
+
   /* Skip white space.  */
   while (*s < end && (c = *(*s)++, isspace (c)))
     ;
@@ -7041,7 +7041,7 @@ xbm_scan (s, end, sval, ival)
   else if (isdigit (c))
     {
       int value = 0, digit;
-      
+
       if (c == '0' && *s < end)
        {
          c = *(*s)++;
@@ -7139,7 +7139,7 @@ xbm_read_bitmap_data (contents, end, width, height, data)
      if (LA1 != (TOKEN))       \
        goto failure;           \
      else                      \
-       match ()        
+       match ()
 
 #define expect_ident(IDENT)                                    \
      if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \
@@ -7182,7 +7182,7 @@ xbm_read_bitmap_data (contents, end, width, height, data)
     {
       if (strcmp (buffer, "unsigned") == 0)
        {
-         match (); 
+         match ();
          expect_ident ("char");
        }
       else if (strcmp (buffer, "short") == 0)
@@ -7197,7 +7197,7 @@ xbm_read_bitmap_data (contents, end, width, height, data)
       else
        goto failure;
     }
-  else 
+  else
     goto failure;
 
   expect (XBM_TK_IDENT);
@@ -7220,7 +7220,7 @@ xbm_read_bitmap_data (contents, end, width, height, data)
          *p++ = val;
          if (!padding_p || ((i + 2) % bytes_per_line))
            *p++ = value >> 8;
-         
+
          if (LA1 == ',' || LA1 == '}')
            match ();
          else
@@ -7233,9 +7233,9 @@ xbm_read_bitmap_data (contents, end, width, height, data)
        {
          int val = value;
          expect (XBM_TK_NUMBER);
-         
+
          *p++ = val;
-         
+
          if (LA1 == ',' || LA1 == '}')
            match ();
          else
@@ -7247,7 +7247,7 @@ xbm_read_bitmap_data (contents, end, width, height, data)
   return 1;
 
  failure:
-  
+
   if (data && *data)
     {
       xfree (*data);
@@ -7274,7 +7274,7 @@ xbm_load_image (f, img, contents, end)
   int rc;
   unsigned char *data;
   int success_p = 0;
-  
+
   rc = xbm_read_bitmap_data (contents, end, &img->width, &img->height, &data);
   if (rc)
     {
@@ -7282,7 +7282,7 @@ xbm_load_image (f, img, contents, end)
       unsigned long foreground = FRAME_FOREGROUND_PIXEL (f);
       unsigned long background = FRAME_BACKGROUND_PIXEL (f);
       Lisp_Object value;
-      
+
       xassert (img->width > 0 && img->height > 0);
 
       /* Get foreground and background colors, maybe allocate colors.  */
@@ -7335,7 +7335,7 @@ xbm_file_p (data)
                                   &w, &h, NULL));
 }
 
-    
+
 /* Fill image IMG which is used on frame F with pixmap data.  Value is
    non-zero if successful.  */
 
@@ -7357,7 +7357,7 @@ xbm_load (f, img)
       char *contents;
       int size;
       struct gcpro gcpro1;
-      
+
       file = x_find_image_file (file_name);
       GCPRO1 (file);
       if (!STRINGP (file))
@@ -7427,7 +7427,7 @@ xbm_load (f, img)
              int i;
              char *p;
              int nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR;
-         
+
              p = bits = (char *) alloca (nbytes * img->height);
              for (i = 0; i < img->height; ++i, p += nbytes)
                {
@@ -7465,14 +7465,14 @@ xbm_load (f, img)
 
   return success_p;
 }
-  
+
 
 \f
 /***********************************************************************
                              XPM images
  ***********************************************************************/
 
-#if HAVE_XPM 
+#if HAVE_XPM
 
 static int xpm_image_p P_ ((Lisp_Object object));
 static int xpm_load P_ ((struct frame *f, struct image *img));
@@ -7589,7 +7589,7 @@ xpm_init_color_cache (f, attrs)
     {
       int i;
       XColor color;
-      
+
       for (i = 0; i < attrs->numsymbols; ++i)
        if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
                         attrs->colorsymbols[i].value, &color))
@@ -7632,7 +7632,7 @@ xpm_color_bucket (color_name)
 {
   unsigned h = 0;
   char *s;
-  
+
   for (s = color_name; *s; ++s)
     h = (h << 2) ^ *s;
   return h %= XPM_COLOR_CACHE_BUCKETS;
@@ -7652,10 +7652,10 @@ xpm_cache_color (f, color_name, color, bucket)
 {
   size_t nbytes;
   struct xpm_cached_color *p;
-  
+
   if (bucket < 0)
     bucket = xpm_color_bucket (color_name);
-      
+
   nbytes = sizeof *p + strlen (color_name);
   p = (struct xpm_cached_color *) xmalloc (nbytes);
   strcpy (p->name, color_name);
@@ -7693,7 +7693,7 @@ xpm_lookup_color (f, color_name, color)
                                       color->blue);
       p = xpm_cache_color (f, color_name, color, h);
     }
-  
+
   return p != NULL;
 }
 
@@ -7820,7 +7820,7 @@ xpm_load (f, img)
       Lisp_Object tail;
       XpmColorSymbol *xpm_syms;
       int i, size;
-      
+
       attrs.valuemask |= XpmColorSymbols;
 
       /* Count number of symbols.  */
@@ -7853,7 +7853,7 @@ xpm_load (f, img)
 #ifdef ALLOC_XPM_COLORS
   xpm_init_color_cache (f, &attrs);
 #endif
-  
+
   specified_file = image_spec_value (img->spec, QCfile, NULL);
   if (STRINGP (specified_file))
     {
@@ -7863,7 +7863,7 @@ xpm_load (f, img)
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
          return 0;
        }
-      
+
       rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                                SDATA (file), &img->pixmap, &img->mask,
                                &attrs);
@@ -7910,19 +7910,19 @@ xpm_load (f, img)
        case XpmOpenFailed:
          image_error ("Error opening XPM file (%s)", img->spec, Qnil);
          break;
-         
+
        case XpmFileInvalid:
          image_error ("Invalid XPM file (%s)", img->spec, Qnil);
          break;
-         
+
        case XpmNoMemory:
          image_error ("Out of memory (%s)", img->spec, Qnil);
          break;
-         
+
        case XpmColorFailed:
          image_error ("Color allocation error (%s)", img->spec, Qnil);
          break;
-         
+
        default:
          image_error ("Unknown error (%s)", img->spec, Qnil);
          break;
@@ -8028,14 +8028,14 @@ lookup_rgb_color (f, r, g, b)
       color.red = r;
       color.green = g;
       color.blue = b;
-      
+
       cmap = FRAME_X_COLORMAP (f);
       rc = x_alloc_nearest_color (f, cmap, &color);
 
       if (rc)
        {
          ++ct_colors_allocated;
-      
+
          p = (struct ct_color *) xmalloc (sizeof *p);
          p->r = r;
          p->g = g;
@@ -8081,7 +8081,7 @@ lookup_pixel_color (f, pixel)
       if (rc)
        {
          ++ct_colors_allocated;
-      
+
          p = (struct ct_color *) xmalloc (sizeof *p);
          p->r = color.red;
          p->g = color.green;
@@ -8093,7 +8093,7 @@ lookup_pixel_color (f, pixel)
       else
        return FRAME_FOREGROUND_PIXEL (f);
     }
-  
+
   return p->pixel;
 }
 
@@ -8119,7 +8119,7 @@ colors_in_color_table (n)
       colors = (unsigned long *) xmalloc (ct_colors_allocated
                                          * sizeof *colors);
       *n = ct_colors_allocated;
-      
+
       for (i = j = 0; i < CT_SIZE; ++i)
        for (p = ct_table[i]; p; p = p->next)
          colors[j++] = p->pixel;
@@ -8194,7 +8194,7 @@ x_to_xcolors (f, img, rgb_p)
   for (y = 0; y < img->height; ++y)
     {
       XColor *row = p;
-      
+
       for (x = 0; x < img->width; ++x, ++p)
        p->pixel = XGetPixel (ximg, x, y);
 
@@ -8221,9 +8221,9 @@ x_from_xcolors (f, img, colors)
   XImage *oimg;
   Pixmap pixmap;
   XColor *p;
-  
+
   init_color_table ();
-  
+
   x_create_x_image_and_pixmap (f, img->width, img->height, 0,
                               &oimg, &pixmap);
   p = colors;
@@ -8250,7 +8250,7 @@ x_from_xcolors (f, img, colors)
 
    MATRIX is a nine-element array specifying the transformation
    matrix.  See emboss_matrix for an example.
-   
+
    COLOR_ADJUST is a color adjustment added to each pixel of the
    outgoing image.  */
 
@@ -8278,7 +8278,7 @@ x_detect_edges (f, img, matrix, color_adjust)
       p = COLOR (new, img->width - 1, y);
       p->red = p->green = p->blue = 0xffff/2;
     }
-  
+
   for (x = 1; x < img->width - 1; ++x)
     {
       p = COLOR (new, x, 0);
@@ -8290,7 +8290,7 @@ x_detect_edges (f, img, matrix, color_adjust)
   for (y = 1; y < img->height - 1; ++y)
     {
       p = COLOR (new, 1, y);
-      
+
       for (x = 1; x < img->width - 1; ++x, ++p)
        {
          int r, g, b, y1, x1;
@@ -8363,7 +8363,7 @@ x_edge_detection (f, img, matrix, color_adjust)
 {
   int i = 0;
   int trans[9];
-  
+
   if (CONSP (matrix))
     {
       for (i = 0;
@@ -8483,7 +8483,7 @@ x_build_heuristic_mask (f, img, how)
   /* Determine the background color of ximg.  If HOW is `(R G B)'
      take that as color.  Otherwise, use the image's background color. */
   use_img_background = 1;
-  
+
   if (CONSP (how))
     {
       int rgb[3], i;
@@ -8502,7 +8502,7 @@ x_build_heuristic_mask (f, img, how)
          use_img_background = 0;
        }
     }
-  
+
   if (use_img_background)
     bg = four_corners_best (ximg, img->width, img->height);
 
@@ -8519,7 +8519,7 @@ x_build_heuristic_mask (f, img, how)
   x_put_x_image (f, mask_img, img->mask, img->width, img->height);
   x_destroy_x_image (mask_img);
   XDestroyImage (ximg);
-  
+
   return 1;
 }
 
@@ -8592,9 +8592,9 @@ pbm_image_p (object)
      Lisp_Object object;
 {
   struct image_keyword fmt[PBM_LAST];
-  
+
   bcopy (pbm_format, fmt, sizeof fmt);
-  
+
   if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm))
     return 0;
 
@@ -8643,7 +8643,7 @@ pbm_scan_number (s, end)
 
 /* Load PBM image IMG for use on frame F.  */
 
-static int 
+static int
 pbm_load (f, img)
      struct frame *f;
      struct image *img;
@@ -8706,7 +8706,7 @@ pbm_load (f, img)
     case '1':
       raw_p = 0, type = PBM_MONO;
       break;
-      
+
     case '2':
       raw_p = 0, type = PBM_GRAY;
       break;
@@ -8718,11 +8718,11 @@ pbm_load (f, img)
     case '4':
       raw_p = 1, type = PBM_MONO;
       break;
-      
+
     case '5':
       raw_p = 1, type = PBM_GRAY;
       break;
-      
+
     case '6':
       raw_p = 1, type = PBM_COLOR;
       break;
@@ -8743,7 +8743,7 @@ pbm_load (f, img)
       if (raw_p && max_color_idx > 255)
        max_color_idx = 255;
     }
-  
+
   if (width < 0
       || height < 0
       || (type != PBM_MONO && max_color_idx < 0))
@@ -8752,7 +8752,7 @@ pbm_load (f, img)
   if (!x_create_x_image_and_pixmap (f, width, height, 0,
                                    &ximg, &img->pixmap))
     goto error;
-  
+
   /* Initialize the color hash table.  */
   init_color_table ();
 
@@ -8766,7 +8766,7 @@ pbm_load (f, img)
       /* Parse the image specification.  */
       bcopy (pbm_format, fmt, sizeof fmt);
       parse_image_spec (img->spec, fmt, PBM_LAST, Qpbm);
-      
+
       /* Get foreground and background colors, maybe allocate colors.  */
       if (fmt[PBM_FOREGROUND].count
          && STRINGP (fmt[PBM_FOREGROUND].value))
@@ -8778,7 +8778,7 @@ pbm_load (f, img)
          img->background = bg;
          img->background_valid = 1;
        }
-      
+
       for (y = 0; y < height; ++y)
        for (x = 0; x < width; ++x)
          {
@@ -8801,7 +8801,7 @@ pbm_load (f, img)
        for (x = 0; x < width; ++x)
          {
            int r, g, b;
-           
+
            if (type == PBM_GRAY)
              r = g = b = raw_p ? *p++ : pbm_scan_number (&p, end);
            else if (raw_p)
@@ -8816,7 +8816,7 @@ pbm_load (f, img)
                g = pbm_scan_number (&p, end);
                b = pbm_scan_number (&p, end);
              }
-           
+
            if (r < 0 || g < 0 || b < 0)
              {
                xfree (ximg->data);
@@ -8826,7 +8826,7 @@ pbm_load (f, img)
                             img->spec, Qnil);
                goto error;
              }
-           
+
            /* RGB values are now in the range 0..max_color_idx.
               Scale this to the range 0..0xffff supported by X.  */
            r = (double) r * 65535 / max_color_idx;
@@ -8835,7 +8835,7 @@ pbm_load (f, img)
            XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b));
          }
     }
-  
+
   /* Store in IMG->colors the colors allocated for the image, and
      free the color table.  */
   img->colors = colors_in_color_table (&img->ncolors);
@@ -8844,11 +8844,11 @@ pbm_load (f, img)
   /* Maybe fill in the background field while we have ximg handy. */
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     IMAGE_BACKGROUND (img, f, ximg);
-  
+
   /* Put the image into a pixmap.  */
   x_put_x_image (f, ximg, img->pixmap, width, height);
   x_destroy_x_image (ximg);
-      
+
   img->width = width;
   img->height = height;
 
@@ -8930,7 +8930,7 @@ png_image_p (object)
 {
   struct image_keyword fmt[PNG_LAST];
   bcopy (png_format, fmt, sizeof fmt);
-  
+
   if (!parse_image_spec (object, fmt, PNG_LAST, Qpng))
     return 0;
 
@@ -8987,7 +8987,7 @@ png_read_from_memory (png_ptr, data, length)
 
   if (length > tbr->len - tbr->index)
     png_error (png_ptr, "Read error");
-  
+
   bcopy (tbr->bytes + tbr->index, data, length);
   tbr->index = tbr->index + length;
 }
@@ -9129,14 +9129,14 @@ png_load (f, img)
   png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
                &interlace_type, NULL, NULL);
 
-  /* If image contains simply transparency data, we prefer to 
+  /* If image contains simply transparency data, we prefer to
      construct a clipping mask.  */
   if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS))
     transparent_p = 1;
   else
     transparent_p = 0;
 
-  /* This function is easier to write if we only have to handle 
+  /* This function is easier to write if we only have to handle
      one data format: RGB or RGBA with 8 bits per channel.  Let's
      transform other formats into that format.  */
 
@@ -9149,7 +9149,7 @@ png_load (f, img)
   png_set_expand (png_ptr);
 
   /* Convert grayscale images to RGB.  */
-  if (color_type == PNG_COLOR_TYPE_GRAY 
+  if (color_type == PNG_COLOR_TYPE_GRAY
       || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
     png_set_gray_to_rgb (png_ptr);
 
@@ -9198,14 +9198,14 @@ png_load (f, img)
            }
        }
       else if (png_get_bKGD (png_ptr, info_ptr, &image_bg))
-       /* Image contains a background color with which to 
+       /* Image contains a background color with which to
           combine the image.  */
        png_set_background (png_ptr, image_bg,
                            PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
       else
        {
          /* Image does not contain a background color with which
-            to combine the image data via an alpha channel.  Use 
+            to combine the image data via an alpha channel.  Use
             the frame's background instead.  */
          XColor color;
          Colormap cmap;
@@ -9253,12 +9253,12 @@ png_load (f, img)
       fclose (fp);
       fp = NULL;
     }
-  
+
   /* Create the X image and pixmap.  */
   if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg,
                                    &img->pixmap))
     goto error;
-  
+
   /* Create an image and pixmap serving as mask if the PNG image
      contains an alpha channel.  */
   if (channels == 4
@@ -9289,16 +9289,16 @@ png_load (f, img)
          XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b));
 
          /* An alpha channel, aka mask channel, associates variable
-            transparency with an image.  Where other image formats 
-            support binary transparency---fully transparent or fully 
+            transparency with an image.  Where other image formats
+            support binary transparency---fully transparent or fully
             opaque---PNG allows up to 254 levels of partial transparency.
             The PNG library implements partial transparency by combining
             the image with a specified background color.
 
             I'm not sure how to handle this here nicely: because the
             background on which the image is displayed may change, for
-            real alpha channel support, it would be necessary to create 
-            a new image for each possible background.  
+            real alpha channel support, it would be necessary to create
+            a new image for each possible background.
 
             What I'm doing now is that a mask is created if we have
             boolean transparency information.  Otherwise I'm using
@@ -9444,9 +9444,9 @@ jpeg_image_p (object)
      Lisp_Object object;
 {
   struct image_keyword fmt[JPEG_LAST];
-  
+
   bcopy (jpeg_format, fmt, sizeof fmt);
-  
+
   if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg))
     return 0;
 
@@ -9517,7 +9517,7 @@ our_skip_input_data (cinfo, num_bytes)
     {
       if (num_bytes > src->bytes_in_buffer)
        ERREXIT (cinfo, JERR_INPUT_EOF);
-      
+
       src->bytes_in_buffer -= num_bytes;
       src->next_input_byte += num_bytes;
     }
@@ -9555,7 +9555,7 @@ jpeg_memory_src (cinfo, data, len)
       src = (struct jpeg_source_mgr *) cinfo->src;
       src->next_input_byte = data;
     }
-  
+
   src = (struct jpeg_source_mgr *) cinfo->src;
   src->init_source = our_init_source;
   src->fill_input_buffer = our_fill_input_buffer;
@@ -9570,7 +9570,7 @@ jpeg_memory_src (cinfo, data, len)
 /* Load image IMG for use on frame F.  Patterned after example.c
    from the JPEG lib.  */
 
-static int 
+static int
 jpeg_load (f, img)
      struct frame *f;
      struct image *img;
@@ -9603,7 +9603,7 @@ jpeg_load (f, img)
          UNGCPRO;
          return 0;
        }
-  
+
       fp = fopen (SDATA (file), "r");
       if (fp == NULL)
        {
@@ -9617,7 +9617,7 @@ jpeg_load (f, img)
      error is detected.  This function will perform a longjmp.  */
   cinfo.err = jpeg_std_error (&mgr.pub);
   mgr.pub.error_exit = my_error_exit;
-  
+
   if ((rc = setjmp (mgr.setjmp_buffer)) != 0)
     {
       if (rc == 1)
@@ -9628,7 +9628,7 @@ jpeg_load (f, img)
          image_error ("Error reading JPEG image `%s': %s", img->spec,
                       build_string (buffer));
        }
-         
+
       /* Close the input file and destroy the JPEG object.  */
       if (fp)
        fclose ((FILE *) fp);
@@ -9639,7 +9639,7 @@ jpeg_load (f, img)
 
       /* Free pixmap and colors.  */
       x_clear_image (f, img);
-      
+
       UNGCPRO;
       return 0;
     }
@@ -9689,7 +9689,7 @@ jpeg_load (f, img)
     init_color_table ();
     colors = (unsigned long *) alloca (cinfo.actual_number_of_colors
                                       * sizeof *colors);
-  
+
     for (i = 0; i < cinfo.actual_number_of_colors; ++i)
       {
        /* Multiply RGB values with 255 because X expects RGB values
@@ -9725,7 +9725,7 @@ jpeg_load (f, img)
   /* Maybe fill in the background field while we have ximg handy. */
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     IMAGE_BACKGROUND (img, f, ximg);
-  
+
   /* Put the image into the pixmap.  */
   x_put_x_image (f, ximg, img->pixmap, width, height);
   x_destroy_x_image (ximg);
@@ -9806,10 +9806,10 @@ tiff_image_p (object)
 {
   struct image_keyword fmt[TIFF_LAST];
   bcopy (tiff_format, fmt, sizeof fmt);
-  
+
   if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff))
     return 0;
-  
+
   /* Must specify either the :data or :file keyword.  */
   return fmt[TIFF_FILE].count + fmt[TIFF_DATA].count == 1;
 }
@@ -9873,22 +9873,22 @@ tiff_seek_in_memory (data, off, whence)
     case SEEK_SET:             /* Go from beginning of source.  */
       idx = off;
       break;
-      
+
     case SEEK_END:             /* Go from end of source.  */
       idx = src->len + off;
       break;
-      
+
     case SEEK_CUR:             /* Go from current position.  */
       idx = src->index + off;
       break;
-      
+
     default:                   /* Invalid `whence'.   */
       return -1;
     }
-  
+
   if (idx > src->len || idx < 0)
     return -1;
-  
+
   src->index = idx;
   return src->index;
 }
@@ -9939,7 +9939,7 @@ tiff_error_handler (title, format, ap)
 {
   char buf[512];
   int len;
-  
+
   len = sprintf (buf, "TIFF error: %s ", title);
   vsprintf (buf + len, format, ap);
   add_to_log (buf, Qnil, Qnil);
@@ -9953,7 +9953,7 @@ tiff_warning_handler (title, format, ap)
 {
   char buf[512];
   int len;
-  
+
   len = sprintf (buf, "TIFF warning: %s ", title);
   vsprintf (buf + len, format, ap);
   add_to_log (buf, Qnil, Qnil);
@@ -9996,7 +9996,7 @@ tiff_load (f, img)
          UNGCPRO;
          return 0;
        }
-         
+
       /* Try to open the image file.  */
       tiff = TIFFOpen (SDATA (file), "r");
       if (tiff == NULL)
@@ -10035,7 +10035,7 @@ tiff_load (f, img)
   TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width);
   TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height);
   buf = (uint32 *) xmalloc (width * height * sizeof *buf);
-  
+
   rc = TIFFReadRGBAImage (tiff, width, height, buf, 0);
   TIFFClose (tiff);
   if (!rc)
@@ -10061,21 +10061,21 @@ tiff_load (f, img)
   for (y = 0; y < height; ++y)
     {
       uint32 *row = buf + y * width;
-      
+
       for (x = 0; x < width; ++x)
        {
          uint32 abgr = row[x];
          int r = TIFFGetR (abgr) << 8;
          int g = TIFFGetG (abgr) << 8;
          int b = TIFFGetB (abgr) << 8;
-         XPutPixel (ximg, x, height - 1 - y, lookup_rgb_color (f, r, g, b)); 
+         XPutPixel (ximg, x, height - 1 - y, lookup_rgb_color (f, r, g, b));
        }
     }
 
   /* Remember the colors allocated for the image.  Free the color table.  */
   img->colors = colors_in_color_table (&img->ncolors);
   free_color_table ();
-      
+
   img->width = width;
   img->height = height;
 
@@ -10167,10 +10167,10 @@ gif_image_p (object)
 {
   struct image_keyword fmt[GIF_LAST];
   bcopy (gif_format, fmt, sizeof fmt);
-  
+
   if (!parse_image_spec (object, fmt, GIF_LAST, Qgif))
     return 0;
-  
+
   /* Must specify either the :data or :file keyword.  */
   return fmt[GIF_FILE].count + fmt[GIF_DATA].count == 1;
 }
@@ -10245,7 +10245,7 @@ gif_load (f, img)
          UNGCPRO;
          return 0;
        }
-  
+
       /* Open the GIF file.  */
       gif = DGifOpenFileName (SDATA (file));
       if (gif == NULL)
@@ -10303,14 +10303,14 @@ gif_load (f, img)
       UNGCPRO;
       return 0;
     }
-  
+
   /* Allocate colors.  */
   gif_color_map = gif->SavedImages[ino].ImageDesc.ColorMap;
   if (!gif_color_map)
     gif_color_map = gif->SColorMap;
   init_color_table ();
   bzero (pixel_colors, sizeof pixel_colors);
-  
+
   for (i = 0; i < gif_color_map->ColorCount; ++i)
     {
       int r = gif_color_map->Colors[i].Red << 8;
@@ -10323,7 +10323,7 @@ gif_load (f, img)
   free_color_table ();
 
   /* Clear the part of the screen image that are not covered by
-     the image from the GIF file.  Full animated GIF support 
+     the image from the GIF file.  Full animated GIF support
      requires more than can be done here (see the gif89 spec,
      disposal methods).  Let's simply assume that the part
      not covered by a sub-image is in the frame's background color.  */
@@ -10352,7 +10352,7 @@ gif_load (f, img)
      `raster' here because RasterBits below is a char *, and invites
      problems with bytes >= 0x80.  */
   raster = (unsigned char *) gif->SavedImages[ino].RasterBits;
-  
+
   if (gif->SavedImages[ino].ImageDesc.Interlace)
     {
       static int interlace_start[] = {0, 4, 2, 1};
@@ -10370,14 +10370,14 @@ gif_load (f, img)
              while (row >= image_height)
                row = interlace_start[++pass];
            }
-         
+
          for (x = 0; x < image_width; x++)
            {
              int i = raster[(y * image_width) + x];
              XPutPixel (ximg, x + image_left, row + image_top,
                         pixel_colors[i]);
            }
-         
+
          row += interlace_increment[pass];
        }
     }
@@ -10390,17 +10390,17 @@ gif_load (f, img)
            XPutPixel (ximg, x + image_left, y + image_top, pixel_colors[i]);
          }
     }
-  
+
   DGifCloseFile (gif);
 
   /* Maybe fill in the background field while we have ximg handy. */
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     IMAGE_BACKGROUND (img, f, ximg);
-  
+
   /* Put the image into the pixmap, then free the X image and its buffer.  */
   x_put_x_image (f, ximg, img->pixmap, width, height);
   x_destroy_x_image (ximg);
-      
+
   UNGCPRO;
   return 1;
 }
@@ -10500,9 +10500,9 @@ gs_image_p (object)
   struct image_keyword fmt[GS_LAST];
   Lisp_Object tem;
   int i;
-  
+
   bcopy (gs_format, fmt, sizeof fmt);
-  
+
   if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript))
     return 0;
 
@@ -10568,7 +10568,7 @@ gs_load (f, img)
       image_error ("Unable to create pixmap for `%s'", img->spec, Qnil);
       return 0;
     }
-    
+
   /* Call the loader to fill the pixmap.  It returns a process object
      if successful.  We do not record_unwind_protect here because
      other places in redisplay like calling window scroll functions
@@ -10579,12 +10579,12 @@ gs_load (f, img)
           (unsigned long) FRAME_X_WINDOW (f),
           (unsigned long) img->pixmap);
   window_and_pixmap_id = build_string (buffer);
-  
+
   sprintf (buffer, "%lu %lu",
           FRAME_FOREGROUND_PIXEL (f),
           FRAME_BACKGROUND_PIXEL (f));
   pixel_colors = build_string (buffer);
-  
+
   XSETFRAME (frame, f);
   loader = image_spec_value (img->spec, QCloader, NULL);
   if (NILP (loader))
@@ -10622,7 +10622,7 @@ x_kill_gs_process (pixmap, f)
      instance, give up.  */
   if (i == c->used)
     return;
-  
+
   /* Kill the GS process.  We should have found PIXMAP in the image
      cache and its image should contain a process object.  */
   img = c->images[i];
@@ -10646,10 +10646,10 @@ x_kill_gs_process (pixmap, f)
       if (ximg)
        {
          int x, y;
-         
+
          /* Initialize the color table.  */
          init_color_table ();
-      
+
          /* For each pixel of the image, look its color up in the
             color table.  After having done so, the color table will
             contain an entry for each color used by the image.  */
@@ -10678,7 +10678,7 @@ x_kill_gs_process (pixmap, f)
       else
        image_error ("Cannot get X image of `%s'; colors will not be freed",
                     img->spec, Qnil);
-      
+
       UNBLOCK_INPUT;
     }
 
@@ -10781,8 +10781,8 @@ value.  */)
       rc = XGetWindowProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                               prop_atom, 0, bytes_remaining,
                               False, XA_STRING,
-                              &actual_type, &actual_format, 
-                              &actual_size, &bytes_remaining, 
+                              &actual_type, &actual_format,
+                              &actual_size, &bytes_remaining,
                               (unsigned char **) &tmp_data);
       if (rc == Success && tmp_data)
        prop_value = make_string (tmp_data, size);
@@ -10831,7 +10831,7 @@ start_hourglass ()
 {
   EMACS_TIME delay;
   int secs, usecs = 0;
-  
+
   cancel_hourglass ();
 
   if (INTEGERP (Vhourglass_delay)
@@ -10847,7 +10847,7 @@ start_hourglass ()
     }
   else
     secs = DEFAULT_HOURGLASS_DELAY;
-  
+
   EMACS_SET_SECS_USECS (delay, secs, usecs);
   hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
                                     show_hourglass, NULL);
@@ -10865,7 +10865,7 @@ cancel_hourglass ()
       cancel_atimer (hourglass_atimer);
       hourglass_atimer = NULL;
     }
-  
+
   if (hourglass_shown_p)
     hide_hourglass ();
 }
@@ -10891,17 +10891,17 @@ show_hourglass (timer)
   if (!hourglass_shown_p)
     {
       Lisp_Object rest, frame;
-  
+
       BLOCK_INPUT;
-  
+
       FOR_EACH_FRAME (rest, frame)
        {
          struct frame *f = XFRAME (frame);
-         
+
          if (FRAME_LIVE_P (f) && FRAME_X_P (f) && FRAME_X_DISPLAY (f))
            {
              Display *dpy = FRAME_X_DISPLAY (f);
-             
+
 #ifdef USE_X_TOOLKIT
              if (f->output_data.x->widget)
 #else
@@ -10909,14 +10909,14 @@ show_hourglass (timer)
 #endif
                {
                  f->output_data.x->hourglass_p = 1;
-       
+
                  if (!f->output_data.x->hourglass_window)
                    {
                      unsigned long mask = CWCursor;
                      XSetWindowAttributes attrs;
-           
+
                      attrs.cursor = f->output_data.x->hourglass_cursor;
-           
+
                      f->output_data.x->hourglass_window
                        = XCreateWindow (dpy, FRAME_OUTER_WINDOW (f),
                                         0, 0, 32000, 32000, 0, 0,
@@ -10924,7 +10924,7 @@ show_hourglass (timer)
                                         CopyFromParent,
                                         mask, &attrs);
                    }
-       
+
                  XMapRaised (dpy, f->output_data.x->hourglass_window);
                  XFlush (dpy);
                }
@@ -10951,7 +10951,7 @@ hide_hourglass ()
       FOR_EACH_FRAME (rest, frame)
        {
          struct frame *f = XFRAME (frame);
-      
+
          if (FRAME_X_P (f)
              /* Watch out for newly created frames.  */
              && f->output_data.x->hourglass_window)
@@ -10980,7 +10980,7 @@ static Lisp_Object x_create_tip_frame P_ ((struct x_display_info *,
                                           Lisp_Object, Lisp_Object));
 static void compute_tip_xy P_ ((struct frame *, Lisp_Object, Lisp_Object,
                                Lisp_Object, int, int, int *, int *));
-     
+
 /* The frame of a currently visible tooltip.  */
 
 Lisp_Object tip_frame;
@@ -11013,7 +11013,7 @@ unwind_create_tip_frame (frame)
       tip_window = None;
       tip_frame = Qnil;
     }
-  
+
   return deleted;
 }
 
@@ -11077,7 +11077,7 @@ x_create_tip_frame (dpyinfo, parms, text)
   Ferase_buffer ();
   Finsert (1, &text);
   set_buffer_internal_1 (old_buffer);
-  
+
   FRAME_CAN_HAVE_SCROLL_BARS (f) = 0;
   record_unwind_protect (unwind_create_tip_frame, frame);
 
@@ -11113,7 +11113,7 @@ x_create_tip_frame (dpyinfo, parms, text)
   {
     Lisp_Object black;
     struct gcpro gcpro1;
-    
+
     black = build_string ("black");
     GCPRO1 (black);
     f->output_data.x->foreground_pixel
@@ -11163,7 +11163,7 @@ x_create_tip_frame (dpyinfo, parms, text)
        else
          font = x_new_font (f, SDATA (font));
       }
-    
+
     /* Try out a font which we hope has bold and italic variations.  */
     if (!STRINGP (font))
       font = x_new_font (f, "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1");
@@ -11188,7 +11188,7 @@ x_create_tip_frame (dpyinfo, parms, text)
 
   x_default_parameter (f, parms, Qborder_width, make_number (2),
                       "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
-  
+
   /* This defaults to 2 in order to match xterm.  We recognize either
      internalBorderWidth or internalBorder (which is what xterm calls
      it).  */
@@ -11226,7 +11226,7 @@ x_create_tip_frame (dpyinfo, parms, text)
      end up in init_iterator with a null face cache, which should not
      happen.  */
   init_frame_faces (f);
-  
+
   f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
   window_prompting = x_figure_window_size (f, parms);
 
@@ -11249,12 +11249,12 @@ x_create_tip_frame (dpyinfo, parms, text)
   {
     XSetWindowAttributes attrs;
     unsigned long mask;
-    
+
     BLOCK_INPUT;
     mask = CWBackPixel | CWOverrideRedirect | CWEventMask;
     if (DoesSaveUnders (dpyinfo->screen))
       mask |= CWSaveUnder;
-    
+
     /* Window managers look at the override-redirect flag to determine
        whether or net to give windows a decoration (Xlib spec, chapter
        3.2.8).  */
@@ -11293,12 +11293,12 @@ x_create_tip_frame (dpyinfo, parms, text)
   f->height = 0;
   SET_FRAME_WIDTH (f, 0);
   change_frame_size (f, height, width, 1, 0, 0);
-  
+
   /* Add `tooltip' frame parameter's default value. */
   if (NILP (Fframe_parameter (frame, intern ("tooltip"))))
     Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt),
                                            Qnil));
-  
+
   /* Set up faces after all frame parameters are known.  This call
      also merges in face attributes specified for new frames.
 
@@ -11313,12 +11313,12 @@ x_create_tip_frame (dpyinfo, parms, text)
     /* Set tip_frame here, so that */
     tip_frame = frame;
     call1 (Qface_set_after_frame_default, frame);
-    
+
     if (!EQ (bg, Fframe_parameter (frame, Qbackground_color)))
       Fmodify_frame_parameters (frame, Fcons (Fcons (Qbackground_color, bg),
                                              Qnil));
   }
-  
+
   f->no_split = 1;
 
   UNGCPRO;
@@ -11361,11 +11361,11 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
   int win_x, win_y;
   Window root, child;
   unsigned pmask;
-  
+
   /* User-specified position?  */
   left = Fcdr (Fassq (Qleft, parms));
   top  = Fcdr (Fassq (Qtop, parms));
-  
+
   /* Move the tooltip window where the mouse pointer is.  Resize and
      show it.  */
   if (!INTEGERP (left) || !INTEGERP (top))
@@ -11434,7 +11434,7 @@ Text larger than the specified size is clipped.  */)
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
   int old_windows_or_buffers_changed = windows_or_buffers_changed;
   int count = SPECPDL_INDEX ();
-  
+
   specbind (Qinhibit_redisplay, Qt);
 
   GCPRO4 (string, parms, frame, timeout);
@@ -11445,12 +11445,12 @@ Text larger than the specified size is clipped.  */)
     timeout = make_number (5);
   else
     CHECK_NATNUM (timeout);
-  
+
   if (NILP (dx))
     dx = make_number (5);
   else
     CHECK_NUMBER (dx);
-  
+
   if (NILP (dy))
     dy = make_number (-10);
   else
@@ -11470,7 +11470,7 @@ Text larger than the specified size is clipped.  */)
          && !NILP (Fequal (last_parms, parms)))
        {
          struct frame *f = XFRAME (tip_frame);
-         
+
          /* Only DX and DY have changed.  */
          if (!NILP (tip_timer))
            {
@@ -11517,7 +11517,7 @@ Text larger than the specified size is clipped.  */)
   /* Set up the frame's root window.  */
   w = XWINDOW (FRAME_ROOT_WINDOW (f));
   w->left = w->top = make_number (0);
-  
+
   if (CONSP (Vx_max_tooltip_size)
       && INTEGERP (XCAR (Vx_max_tooltip_size))
       && XINT (XCAR (Vx_max_tooltip_size)) > 0
@@ -11532,7 +11532,7 @@ Text larger than the specified size is clipped.  */)
       w->width = make_number (80);
       w->height = make_number (40);
     }
-  
+
   f->window_width = XINT (w->width);
   adjust_glyphs (f);
   w->pseudo_window_p = 1;
@@ -11570,7 +11570,7 @@ Text larger than the specified size is clipped.  */)
        }
       else
        row_width = row->pixel_width;
-      
+
       height += row->height;
       width = max (width, row_width);
     }
@@ -11589,7 +11589,7 @@ Text larger than the specified size is clipped.  */)
                     root_x, root_y, width, height);
   XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
   UNBLOCK_INPUT;
-  
+
   /* Draw into the window.  */
   w->must_be_updated_p = 1;
   update_single_window (w, 1);
@@ -11620,16 +11620,16 @@ Value is t if tooltip was open, nil otherwise.  */)
   /* Return quickly if nothing to do.  */
   if (NILP (tip_timer) && NILP (tip_frame))
     return Qnil;
-  
+
   frame = tip_frame;
   timer = tip_timer;
   GCPRO2 (frame, timer);
   tip_frame = tip_timer = deleted = Qnil;
-  
+
   count = SPECPDL_INDEX ();
   specbind (Qinhibit_redisplay, Qt);
   specbind (Qinhibit_quit, Qt);
-  
+
   if (!NILP (timer))
     call1 (Qcancel_timer, timer);
 
@@ -11732,7 +11732,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.  */)
   dir = Fexpand_file_name (dir, Qnil);
   dir_xmstring = XmStringCreateLocalized (SDATA (dir));
   pattern_xmstring = XmStringCreateLocalized ("*");
-    
+
   XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac;
   XtSetArg (al[ac], XmNdirectory, dir_xmstring); ++ac;
   XtSetArg (al[ac], XmNpattern, pattern_xmstring); ++ac;
@@ -11755,7 +11755,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.  */)
   help = XmFileSelectionBoxGetChild (dialog, XmDIALOG_HELP_BUTTON);
   XtSetSensitive (help, False);
 
-  /* Mark OK button as default.  */ 
+  /* Mark OK button as default.  */
   XtVaSetValues (XmFileSelectionBoxGetChild (dialog, XmDIALOG_OK_BUTTON),
                 XmNshowAsDefault, True, NULL);
 
@@ -11815,7 +11815,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.  */)
     {
       XmString text;
       String data;
-      
+
       XtVaGetValues (dialog, XmNtextString, &text, NULL);
       XmStringGetLtoR (text, XmFONTLIST_DEFAULT_TAG, &data);
       XmStringFree (text);
@@ -11834,7 +11834,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.  */)
   /* Make "Cancel" equivalent to C-g.  */
   if (NILP (file))
     Fsignal (Qquit, Qnil);
-  
+
   return unbind_to (count, file);
 }
 
@@ -11858,7 +11858,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.")
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
   char *cdef_file;
   char *cprompt;
-  
+
   GCPRO5 (prompt, dir, default_filename, mustmatch, file);
   CHECK_STRING (prompt);
   CHECK_STRING (dir);
@@ -11874,7 +11874,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.")
     cdef_file = SDATA (dir);
 
   fn = xg_get_file_name (f, SDATA (prompt), cdef_file, ! NILP (mustmatch));
-  
+
   if (fn)
     {
       file = build_string (fn);
@@ -11887,7 +11887,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.")
   /* Make "Cancel" equivalent to C-g.  */
   if (NILP (file))
     Fsignal (Qquit, Qnil);
-  
+
   return unbind_to (count, file);
 }
 
@@ -11938,7 +11938,7 @@ usual X keysyms.  */)
       UNBLOCK_INPUT;
       return Qnil;
     }
-  
+
   have_keys = Qnil;
   kb = XkbGetMap (dpy, XkbAllMapComponentsMask, XkbUseCoreKbd);
   if (kb)
@@ -11965,7 +11965,7 @@ usual X keysyms.  */)
        }
 
       XkbFreeClientMap (kb, 0, True);
-  
+
       if (delete_keycode
          && backspace_keycode
          && XKeysymToKeycode (dpy, XK_Delete) == delete_keycode
@@ -12095,7 +12095,7 @@ syms_of_xfns ()
   staticpro (&QCcolor_adjustment);
   QCmask = intern (":mask");
   staticpro (&QCmask);
+
   Qface_set_after_frame_default = intern ("face-set-after-frame-default");
   staticpro (&Qface_set_after_frame_default);
 
@@ -12163,7 +12163,7 @@ or when you set the mouse color.  */);
   DEFVAR_BOOL ("display-hourglass", &display_hourglass_p,
     doc: /* Non-zero means Emacs displays an hourglass pointer on window systems.  */);
   display_hourglass_p = 1;
-  
+
   DEFVAR_LISP ("hourglass-delay", &Vhourglass_delay,
     doc: /* *Seconds to wait before displaying an hourglass pointer.
 Value must be an integer or float.  */);
@@ -12199,7 +12199,7 @@ or when you set the mouse color.  */);
     doc: /* Maximum size for tooltips.  Value is a pair (COLUMNS . ROWS).
 Text larger than this is clipped.  */);
   Vx_max_tooltip_size = Fcons (make_number (80), make_number (40));
-  
+
   DEFVAR_LISP ("x-no-window-manager", &Vx_no_window_manager,
     doc: /* Non-nil if no X window manager is in use.
 Emacs doesn't try to figure this out; this is always nil
@@ -12268,7 +12268,7 @@ meaning don't clear the cache.  */);
   defsubr (&Sx_synchronize);
   defsubr (&Sx_focus_frame);
   defsubr (&Sx_backspace_delete_keys_p);
-  
+
   /* Setting callback functions for fontset handler.  */
   get_font_info_func = x_get_font_info;
 
@@ -12276,7 +12276,7 @@ meaning don't clear the cache.  */);
         And the pointer assigned has the wrong type, anyway.  */
   list_fonts_func = x_list_fonts;
 #endif
-  
+
   load_font_func = x_load_font;
   find_ccl_program_func = x_find_ccl_program;
   query_font_func = x_query_font;
@@ -12317,16 +12317,16 @@ meaning don't clear the cache.  */);
   Qxpm = intern ("xpm");
   staticpro (&Qxpm);
 #endif
-  
+
 #if HAVE_JPEG
   Qjpeg = intern ("jpeg");
   staticpro (&Qjpeg);
-#endif 
+#endif
 
 #if HAVE_TIFF
   Qtiff = intern ("tiff");
   staticpro (&Qtiff);
-#endif 
+#endif
 
 #if HAVE_GIF
   Qgif = intern ("gif");
@@ -12366,27 +12366,27 @@ init_xfns ()
 {
   image_types = NULL;
   Vimage_types = Qnil;
-  
+
   define_image_type (&xbm_type);
   define_image_type (&gs_type);
   define_image_type (&pbm_type);
-  
+
 #if HAVE_XPM
   define_image_type (&xpm_type);
 #endif
-  
+
 #if HAVE_JPEG
   define_image_type (&jpeg_type);
 #endif
-  
+
 #if HAVE_TIFF
   define_image_type (&tiff_type);
 #endif
-  
+
 #if HAVE_GIF
   define_image_type (&gif_type);
 #endif
-  
+
 #if HAVE_PNG
   define_image_type (&png_type);
 #endif