* lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 4 Dec 2012 15:15:30 +0000 (19:15 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 4 Dec 2012 15:15:30 +0000 (19:15 +0400)
member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
and mouse_face_hidden members to a bitfields.
* frame.h (struct frame): Remove set-but-not-used space_width member.
(FRAME_SPACE_WIDTH): Remove.
* nsterm.m, w32term.c, xterm.c: Adjust users.
* termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
members to a bitfields.

src/ChangeLog
src/frame.h
src/lisp.h
src/nsterm.m
src/term.c
src/termchar.h
src/w32term.c
src/xdisp.c
src/xterm.c

index 1a91eb0..37c8647 100644 (file)
@@ -1,3 +1,16 @@
+2012-12-04  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
+       member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
+       and mouse_face_hidden members to a bitfields.
+       * frame.h (struct frame): Remove set-but-not-used space_width member.
+       (FRAME_SPACE_WIDTH): Remove.
+       * nsterm.m, w32term.c, xterm.c: Adjust users.
+       * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
+       member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
+       costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
+       members to a bitfields.
+
 2012-12-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        Don't let call-process be a zombie factory (Bug#12980).
index 5ebfc2f..e8241fe 100644 (file)
@@ -301,9 +301,6 @@ struct frame
   /* Canonical X unit.  Width of default font, in pixels.  */
   int column_width;
 
-  /* Width of space glyph of default font, in pixels.  */
-  int space_width;
-
   /* Canonical Y unit.  Height of a line, in pixels.  */
   int line_height;
 
@@ -1000,11 +997,6 @@ extern Lisp_Object selected_frame;
 
 #define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
 
-/* Space glyph width of the default font of frame F.  */
-
-#define FRAME_SPACE_WIDTH(F) ((F)->space_width)
-
-
 /* Pixel width of areas used to display truncation marks, continuation
    marks, overlay arrows.  This is 0 for terminal frames.  */
 
index 6bf54ed..172a32e 100644 (file)
@@ -1644,7 +1644,6 @@ typedef struct {
   int mouse_face_beg_x, mouse_face_beg_y;
   int mouse_face_end_row, mouse_face_end_col;
   int mouse_face_end_x, mouse_face_end_y;
-  int mouse_face_past_end;
   Lisp_Object mouse_face_window;
   int mouse_face_face_id;
   Lisp_Object mouse_face_overlay;
@@ -1654,13 +1653,15 @@ typedef struct {
   struct frame *mouse_face_mouse_frame;
   int mouse_face_mouse_x, mouse_face_mouse_y;
 
+  /* Nonzero if part of the text currently shown in
+     its mouse-face is beyond the window end.  */
+  unsigned mouse_face_past_end : 1;
+
   /* Nonzero means defer mouse-motion highlighting.  */
-  int mouse_face_defer;
+  unsigned mouse_face_defer : 1;
 
   /* Nonzero means that the mouse highlight should not be shown.  */
-  int mouse_face_hidden;
-
-  int mouse_face_image_state;
+  unsigned mouse_face_hidden : 1;
 } Mouse_HLInfo;
 \f
 /* Data type checking.  */
index 25eb7eb..55a106b 100644 (file)
@@ -6954,7 +6954,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
 
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = font->average_width;
-  FRAME_SPACE_WIDTH (f) = font->space_width;
   FRAME_LINE_HEIGHT (f) = font->height;
 
   compute_fringe_widths (f, 1);
index 481a342..241875d 100644 (file)
@@ -3362,10 +3362,6 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
     = tty->TS_delete_mode && tty->TS_insert_mode
     && !strcmp (tty->TS_delete_mode, tty->TS_insert_mode);
 
-  tty->se_is_so = (tty->TS_standout_mode
-              && tty->TS_end_standout_mode
-              && !strcmp (tty->TS_standout_mode, tty->TS_end_standout_mode));
-
   UseTabs (tty) = tabs_safe_p (fileno (tty->input)) && TabWidth (tty) == 8;
 
   terminal->scroll_region_ok
index 5c57593..8bffd3e 100644 (file)
@@ -50,8 +50,7 @@ struct tty_display_info
 
   struct emacs_tty *old_tty;    /* The initial tty mode bits */
 
-  int term_initted;             /* 1 if we have been through init_sys_modes. */
-
+  unsigned term_initted : 1;    /* 1 if we have been through init_sys_modes. */
 
   int reference_count;          /* Number of frames that are on this display. */
 
@@ -164,17 +163,12 @@ struct tty_display_info
 
   int RPov;                     /* # chars to start a TS_repeat */
 
-  int delete_in_insert_mode;    /* delete mode == insert mode */
-
-  int se_is_so;                 /* 1 if same string both enters and leaves
-                                   standout mode */
-
-  int costs_set;                /* Nonzero if costs have been calculated. */
-
-  int insert_mode;              /* Nonzero when in insert mode.  */
-  int standout_mode;            /* Nonzero when in standout mode.  */
+  unsigned delete_in_insert_mode : 1;    /* delete mode == insert mode */
 
+  unsigned costs_set : 1;       /* Nonzero if costs have been calculated. */
 
+  unsigned insert_mode : 1;     /* Nonzero when in insert mode.  */
+  unsigned standout_mode : 1;   /* Nonzero when in standout mode.  */
 
   /* 1 if should obey 0200 bit in input chars as "Meta", 2 if should
      keep 0200 bit in input chars.  0 to ignore the 0200 bit.  */
@@ -192,11 +186,11 @@ struct tty_display_info
 
   /* Flag used in tty_show/hide_cursor.  */
 
-  int cursor_hidden;
+  unsigned cursor_hidden : 1;
 
   /* Nonzero means use ^S/^Q for flow control.  */
-  int flow_control;
 
+  unsigned flow_control : 1;
 };
 
 /* A chain of structures for all tty devices currently in use. */
index 84f99c0..e267775 100644 (file)
@@ -5348,7 +5348,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
   FRAME_FONT (f) = font;
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = font->average_width;
-  FRAME_SPACE_WIDTH (f) = font->space_width;
   FRAME_LINE_HEIGHT (f) = font->height;
 
   compute_fringe_widths (f, 1);
index 5f6d69d..9464e87 100644 (file)
@@ -12265,7 +12265,6 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
     {
       /* Show item in pressed state.  */
       show_mouse_face (hlinfo, DRAW_IMAGE_SUNKEN);
-      hlinfo->mouse_face_image_state = DRAW_IMAGE_SUNKEN;
       last_tool_bar_item = prop_idx;
     }
   else
@@ -12276,7 +12275,6 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
 
       /* Show item in released state.  */
       show_mouse_face (hlinfo, DRAW_IMAGE_RAISED);
-      hlinfo->mouse_face_image_state = DRAW_IMAGE_RAISED;
 
       key = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_KEY);
 
@@ -12345,7 +12343,6 @@ note_tool_bar_highlight (struct frame *f, int x, int y)
       && last_tool_bar_item != prop_idx)
     return;
 
-  hlinfo->mouse_face_image_state = DRAW_NORMAL_TEXT;
   draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
 
   /* If tool-bar item is not enabled, don't highlight it.  */
@@ -12374,7 +12371,6 @@ note_tool_bar_highlight (struct frame *f, int x, int y)
 
       /* Display it as active.  */
       show_mouse_face (hlinfo, draw);
-      hlinfo->mouse_face_image_state = draw;
     }
 
  set_help_echo:
index bbcff8c..8acd1d7 100644 (file)
@@ -7902,7 +7902,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
   FRAME_FONT (f) = font;
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = font->average_width;
-  FRAME_SPACE_WIDTH (f) = font->space_width;
   FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font);
 
   compute_fringe_widths (f, 1);