1. 28 Oct, 2013 1 commit
    • Dmitry Antipov's avatar
      * dispextern.h (struct face): Use bitfields for 'underline_type' · 5d3311e5
      Dmitry Antipov authored
      and 'box' members.  Remove set-but-unused members 'pixmap_w' and
      'pixmap_h'.  If not HAVE_WINDOW_SYSTEM, also remove dummy
      'stipple' member.  Move 'lface' member up to help...
      * xfaces.c (make_realized_face): ...this function to find and
      clear just the members that need clearing.
      (load_face_colors, realize_x_face):
      * xdisp.c (extend_face_to_end_of_line): Adjust user.
      5d3311e5
  2. 17 Oct, 2013 1 commit
    • Paul Eggert's avatar
      Make some functions static in non-Microsoft builds. · 3d798ba7
      Paul Eggert authored
      On my platform (Fedora 19 x86-64), this shrinks the
      Emacs executable (text+data) by 0.25%.
      * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
      (load_color) [!MSDOS]:
      * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
      * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
      * lisp.h (check_existing):
      * process.h (conv_sockaddr_to_lisp, network_interface_list)
      (network_interface_info) [!WINDOWSNT]:
      * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
      Remove extern decls.
      * fileio.c (check_existing):
      * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
      * process.c (conv_sockaddr_to_lisp, network_interface_list)
      (network_interface_info) [!WINDOWSNT]:
      * term.c (encode_terminal_code) [!WINDOWSNT]:
      * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
      * xfaces.c (load_color) [!MSDOS]:
      Now static.
      * fileio.c (check_existing, check_executable, check_writable):
      * process.c (network_interface_list, network_interface_info):
      Move earlier, so that we don't need forward decls.
      * gnutls.c (fn_gnutls_transport_set_errno)
      (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
      Remove; unused.
      * w32.c (init_environment): Use faccessat rather than
      check_existing, partly for consistency with the rest of the code
      in this file, partly so that check_existing can be static.
      3d798ba7
  3. 11 Oct, 2013 3 commits
    • Eli Zaretskii's avatar
      Support frame dimension changes while TTY menus are displayed. · abe02020
      Eli Zaretskii authored
       src/xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
       have different dimensions.
       src/dispnew.c (fill_up_frame_row_with_spaces): Now has external
       visibility.
       src/dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
      
      Fixes: debbugs:15575
      abe02020
    • Eli Zaretskii's avatar
      Fix bug #15575 with crashes in TTY menus. · 48621e69
      Eli Zaretskii authored
       src/xdisp.c (display_tty_menu_item): Make sure we never write beyond
       the end of the frame's glyph matrix.
       src/term.c (tty_menu_display): Don't move cursor while overwriting
       frame's glyphs with menu items.  Limit the number of items
       displayed to what can be shown on the available screen lines,
       excluding the echo area.
       (tty_menu_activate): Limit the Y coordinate allowed by
       read_menu_input to the last screen line used for menu display.
      48621e69
    • Dmitry Antipov's avatar
      33ac0265
  4. 10 Oct, 2013 1 commit
    • Eli Zaretskii's avatar
      Attempt to fix crashes per bug #15575. · 00036e1d
      Eli Zaretskii authored
       src/xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
       FROM and TO are identical.  Copy only the glyphs of TEXT_AREA.
       src/term.c (save_and_enable_current_matrix): Don't allocate and
       don't save margin areas.
       (restore_desired_matrix): Don't restore margin areas.
       (free_saved_screen): Don't free margin areas.
      00036e1d
  5. 08 Oct, 2013 2 commits
  6. 07 Oct, 2013 1 commit
  7. 04 Oct, 2013 1 commit
  8. 03 Oct, 2013 1 commit
  9. 29 Sep, 2013 1 commit
  10. 28 Sep, 2013 1 commit
  11. 24 Sep, 2013 2 commits
    • Dmitry Antipov's avatar
      Use union for the payload of struct Lisp_Vector. · d6d9cbc1
      Dmitry Antipov authored
      This helps to avoid a few glitches dictated by C's aliasing rules.
      * lisp.h (struct Lisp_Vector): Use union for next and
      contents member.  Adjust comment.  Change related users.
      * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
      Related users changed.
      * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
      * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
      * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
      * xfaces.c, xfont.c, xmenu.c: Related users changed.
      d6d9cbc1
    • Paul Eggert's avatar
      Some minor cleanups of recently-added bool vector code. · 7be68de5
      Paul Eggert authored
      * conf_post.h (assume): Always return void.  Use lint version
      only if GCC and MSC versions don't apply.
      * conf_post.h (assume):
      * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
      Depend on _MSC_VER, not __MSC_VER, for consistency with
      the rest of Emacs.
      * data.c (bool_vector_spare_mask, popcount_size_t_generic)
      (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
      (bool_vector_binop_driver, count_trailing_zero_bits)
      (size_t_to_host_endian): Now static, not static inline;
      the latter isn't needed with modern compilers and doesn't
      work with older compilers anyway.
      7be68de5
  12. 23 Sep, 2013 3 commits
    • Dmitry Antipov's avatar
      * xdisp.c (noninteractive_need_newline, message_log_need_newline) · e08813d0
      Dmitry Antipov authored
      (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
      (display_last_displayed_message_p, message_buf_print)
      (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
      Use bool for boolean.
      * dispextern.h (help_echo_showing_p, hourglass_shown_p):
      * lisp.h (noninteractive_need_newline): Adjust declaration.
      e08813d0
    • Eli Zaretskii's avatar
      Fix last commit. · b519df23
      Eli Zaretskii authored
       src/xdisp.c (note_mouse_highlight): Adapt calculation of last argument to
       mouse_face_from_string_pos to the previous change.
      
      Fixes: debbugs:15437
      b519df23
    • Eli Zaretskii's avatar
      Fix bug #15437 with mouse highlight on overlay strings. · f03eddbf
      Eli Zaretskii authored
       src/xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
       computing the end column of mouse-highlight that comes from
       display or overlay strings.
      f03eddbf
  13. 22 Sep, 2013 1 commit
  14. 18 Sep, 2013 3 commits
  15. 17 Sep, 2013 3 commits
  16. 13 Sep, 2013 1 commit
    • Dmitry Antipov's avatar
      Unify FRAME_window_system_DISPLAY_INFO macros between all ports. · aad3612f
      Dmitry Antipov authored
      All of them are replaced with FRAME_DISPLAY_INFO, defined in
      each port to reference the port-specific window system data.
      * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
      (FRAME_DISPLAY_INFO): Define.
      * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
      (FRAME_DISPLAY_INFO): Define.  Adjust users.
      * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
      (FRAME_DISPLAY_INFO): Define.  Adjust users.
      * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
      * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
      * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
      * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
      * xselect.c, xterm.c: All related users changed.
      aad3612f
  17. 11 Sep, 2013 2 commits
    • Paul Eggert's avatar
      * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out, · f5dacaae
      Paul Eggert authored
      avoiding a GCC warning.
      f5dacaae
    • Dmitry Antipov's avatar
      Ifdef away frame tool bar code when it is not really used. · 742516e0
      Dmitry Antipov authored
      * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
      Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
      and minimize_tool_bar_window_p under the above.
      (fset_current_tool_bar_string, fset_desired_tool_bar_string)
      (fset_tool_bar_window): Likewise.
      * dispnew.c (clear_current_matrices, clear_desired_matrices)
      (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
      (change_frame_size_1):
      * window.c (window_from_coordinates, Frecenter): Adjust users.
      * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
      code is not really used.
      * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
      (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
      (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
      [!USE_GTK && !HAVE_NS]: Define as such.
      (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
      (note_mouse_highlight, expose_frame):
      * xfns.c (x_set_tool_bar_lines):
      * xterm.c (handle_one_xevent): Adjust users.
      742516e0
  18. 09 Sep, 2013 2 commits
    • Dmitry Antipov's avatar
      Review and drop old frame resize hack. · 0750a308
      Dmitry Antipov authored
      * frame.h (struct frame): Remove force_flush_display_p.
      * dispnew.c (update_frame): Adjust user and don't call
      flush_frame here.  The comment has said that there was an issues
      with redisplaying fringes, but I don't see any differences with
      and without this hack.  Hopefully we can continue without it.
      * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
      current frame matrices twice if resized_p is set.
      0750a308
    • Dmitry Antipov's avatar
      Cleanup frame flushing. · fd462129
      Dmitry Antipov authored
      * dispextern.h (struct redisplay_interface): Drop
      flush_display_optional because flush_display is enough
      for X and flushing via RIF is just a no-op for others.
      * frame.h (flush_frame): New function.
      * dispnew.c (update_frame):
      * minibuf.c (read_minibuf):
      * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
      Use it.
      * keyboard.c (detect_input_pending_run_timers): Do not flush
      all frames but selected one in redisplay_preserve_echo_area.
      * nsterm.m (ns_flush): Remove no-op.
      (ns_redisplay_interface): Adjust user.
      * w32term.h (x_flush): Remove no-op.
      (w32_redisplay_interface): Adjust user.
      * xterm.c (x_flush): Simplify because we do not flush all
      frames at once any more.  Adjust comment.
      (x_redisplay_interface): Adjust user.
      fd462129
  19. 06 Sep, 2013 3 commits
    • Dmitry Antipov's avatar
      * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id) · 77394d40
      Dmitry Antipov authored
      (last_glyphless_glyph_merged_face_id): Remove declarations.
      * dispextern.h (merge_glyphless_glyph_face): Add prototype.
      * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
      (last_glyphless_glyph_merged_face_id): Now static.
      (merge_escape_glyph_face): New function, refactored from...
      (get_next_display_element): ...here.
      (merge_glyphless_glyph_face): New function, refactored from...
      (produce_glyphless_glyph): ...here...
      * term.c (produce_glyphless_glyph): ...and here.
      77394d40
    • Dmitry Antipov's avatar
      Attempt to make redisplay more selective when changing cursor type. · 7f6c6450
      Dmitry Antipov authored
      * frame.h (struct frame): New bitfield cursor_type_changed.
      * xdisp.c (cursor_type_changed): Remove.
      (try_cursor_movement, redisplay_window, try_window_id)
      (set_frame_cursor_types, try_window_reusing_current_matrix):
      Adjust to use per-frame bitfield.
      (redisplay_internal): Look for cursor type change on each visible
      frame and consider all frames if cursor type has been changed on
      the frame other than selected.  If cursor type has been changed on
      selected frame only, do not use fast update.
      7f6c6450
    • Dmitry Antipov's avatar
      Attempt to make redisplay more selective when changing fonts. · bd0443bb
      Dmitry Antipov authored
      * frame.h (struct frame): New bitfield fonts_changed.
      * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
      (adjust_frame_glyphs): Add prototype.
      * dispnew.c (fonts_changed_p): Remove.
      (adjust_glyphs): Remove becase we do not
      adjust matrices on all frames at once any more.
      (adjust_frame_glyphs): Block and unblock input here.
      (adjust_glyph_matrix): Use fonts_changed.
      (change_frame_size_1): Use adjust_frame_glyphs.
      * font.c (font_open_entity): Use fonts_changed.
      * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
      * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
      * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
      (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
      (shrink_mini_window, Fresize_mini_window_internal)
      (window_scroll_pixel_based, Fset_window_configuration)
      (apply_window_adjustment, Fset_window_vscroll):
      * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
      Use adjust_frame_glyphs.
      * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
      (try_window_reusing_current_matrix, try_window_id, display_line)
      (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
      (redisplay_internal): Consider fonts_changed and adjust frame
      matrices for each frame only if the frame is visible.  If font
      has been changed on some frame during full redisplay, retry
      only visible frames where the font has been actually changed.
      bd0443bb
  20. 05 Sep, 2013 4 commits
    • Dmitry Antipov's avatar
      Cache current header and mode line height for each window. · b9695828
      Dmitry Antipov authored
      * window.h (struct window): New fields mode_line_height
      and header_line_height.
      * window.c (make_window): Initialize them.
      * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
      (CURRENT_HEADER_LINE_HEIGHT): Use them.  Adjust comment.
      (current_mode_line_height, current_header_line_height):
      Remove declaration.
      * xdisp.c (current_mode_line_height, current_header_line_height):
      Remove.
      (pos_visible_p, init_xdisp): Adjust user.
      (redisplay_window): Invalidate mode_line_height and
      header_line_height if current and desired matrices do not agree.
      b9695828
    • Dmitry Antipov's avatar
      * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER. · 66738305
      Dmitry Antipov authored
      * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
      66738305
    • Eli Zaretskii's avatar
      Fixed C compilation problems. · e7873136
      Eli Zaretskii authored
      e7873136
    • Dmitry Antipov's avatar
      Make --without-x compatible with --enable-gcc-warnings. · 257b3b03
      Dmitry Antipov authored
      * configure.ac: If both --without-x and --enable-gcc-warnings are
      specified, use -Wno-unused-variable, -Wno-unused-but-set-variable
      and -Wno-unused-but-set-parameter.
      * src/font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
      * src/font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
      members under HAVE_WINDOW_SYSTEM.
      * src/keyboard.c (make_lispy_focus_out): Likewise.
      (record_menu_key): Move under HAVE_MENUS.
      * src/xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
      THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
      (syms_of_xdisp): Adjust user.
      (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
      (start_hourglass, cancel_hourglass):
      * src/xfaces.c (toplevel): Likewise with PT_PER_INCH,
      clear_font_table_count, CLEAR_FONT_TABLE_COUNT
      and CLEAR_FONT_TABLE_NFONTS.
      (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
      Declare only if HAVE_WINDOW_SYSTEM.
      (lface_same_font_attributes_p, clear_face_gcs): Define only
      if HAVE_WINDOW_SYSTEM.
      257b3b03
  21. 01 Sep, 2013 1 commit
  22. 28 Aug, 2013 2 commits
    • Dmitry Antipov's avatar
      Prefer enum glyph_row_area to int where appropriate. · c3c4768d
      Dmitry Antipov authored
      * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
      Fix comment.
      (window_box, window_box_width, window_box_left, window_box_left_offset)
      (window_box_right, window_box_right_offset): Adjust prototypes.
      * xdisp.c (window_box, window_box_width, window_box_left)
      (window_box_left_offset, window_box_right, window_box_right_offset):
      Use enum glyph_row_area.  Adjust users and tweak comment where needed.
      (window_box_edges): Likewise.  Lost 2nd arg since it is always ANY_AREA.
      * nsterm.m (ns_clip_to_row):
      * w32term.c (w32_clip_to_row):
      * xterm.c (x_clip_to_row): Likewise.
      c3c4768d
    • Dmitry Antipov's avatar
      Redesign redisplay interface to drop global output_cursor. · f60e429a
      Dmitry Antipov authored
      * dispextern.h (struct redisplay_interface): Remove cursor_to member.
      (toplevel): Remove declaration of output_cursor.
      (set_output_cursor, x_cursor_to): Remove prototype.
      * window.h (struct window): New member output_cursor.
      (output_cursor_to): New function to replace RIF member.
      * dispnew.c (redraw_overlapped_rows, update_marginal_area)
      (update_text_area, set_window_cursor_after_update): Use it.
      * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
      (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
      * nsterm.m (ns_update_window_begin, ns_update_window_end):
      * w32term.c (x_update_window_begin, x_update_window_end):
      * xterm.c (x_update_window_begin, x_update_window_end):
      Adjust to use per-window output cursor.
      f60e429a