From: Dmitry Antipov Date: Tue, 4 Dec 2012 15:15:30 +0000 (+0400) Subject: * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/350f51adaca06e0b52800faf88ec5341c723bef7 * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 1a91eb0f1a..37c8647d65 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2012-12-04 Dmitry Antipov + + * 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 Don't let call-process be a zombie factory (Bug#12980). diff --git a/src/frame.h b/src/frame.h index 5ebfc2f7ec..e8241fea88 100644 --- a/src/frame.h +++ b/src/frame.h @@ -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. */ diff --git a/src/lisp.h b/src/lisp.h index 6bf54ed721..172a32e92a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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; /* Data type checking. */ diff --git a/src/nsterm.m b/src/nsterm.m index 25eb7ebc49..55a106b7e0 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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); diff --git a/src/term.c b/src/term.c index 481a342398..241875de52 100644 --- a/src/term.c +++ b/src/term.c @@ -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 diff --git a/src/termchar.h b/src/termchar.h index 5c57593c04..8bffd3e546 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -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. */ diff --git a/src/w32term.c b/src/w32term.c index 84f99c090c..e26777543f 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -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); diff --git a/src/xdisp.c b/src/xdisp.c index 5f6d69dea3..9464e87b36 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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: diff --git a/src/xterm.c b/src/xterm.c index bbcff8c752..8acd1d7843 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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);