1. 16 Nov, 2010 1 commit
    • Chong Yidong's avatar
      Cleanup of window coordinate positioning code. · 77cd1a62
      Chong Yidong authored
      Now, text area click input events measure Y from the top of the text
      area, excluding the header line if any.
      
      * src/dispnew.c (buffer_posn_from_coords): Assume that X counts from
      the start of the text area.
      
      * src/keyboard.c (make_lispy_position): For text area clicks, record Y
      pixel position relative to the text area, excluding header line.
      Also change X and Y to Lisp_Objects, not pointers; don't return
      coordinate values via pointers.  Pass ON_TEXT_AREA coordinate to
      buffer_posn_from_coords counting from the start of the text area.
      (Fposn_at_x_y, make_lispy_event): Callers changed.
      
      * src/w32term.c (w32_read_socket):
      * src/msdos.c (dos_rawgetc):
      * src/xterm.c (handle_one_xevent): Likewise.
      
      * src/window.c (coordinates_in_window): Change X and Y to ints rather
      than pointers; don't return coordinates via pointers.
      (struct check_window_data): Change X and Y from pointers to ints.
      (window_from_coordinates): Remove args WX and WY; don't return
      coordinates via pointers.
      (Fcoordinates_in_window_p, window_from_coordinates):
      (check_window_containing, Fwindow_at): Callers changed.
      (window_relative_x_coord): New function.
      
      * src/window.h (window_from_coordinates, window_relative_x_coord):
      Update prototypes.
      
      * src/xdisp.c (remember_mouse_glyph): Change window_from_coordinates
      call.  Use window_relative_x_coord.
      (note_mouse_highlight): Change window_from_coordinates call.
      77cd1a62
  2. 13 Nov, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix and document display of glyphless characters. · 0eb025fb
      Eli Zaretskii authored
       src/xdisp.c (set_cursor_from_row): Fix cursor positioning on
       zero-width characters.
       (syms_of_xdisp) <glyphless-char-display>: Doc fix.
       src/.gdbinit (pgx): Adapt to latest changes in `struct glyph'.
       src/w32term.c (x_draw_glyphless_glyph_string_foreground): Draw the
       box before drawing the glyphs inside it.
       src/dispextern.h (enum glyphless_display_method): Rename
       GLYPHLESS_DISPLAY_HEXA_CODE to GLYPHLESS_DISPLAY_HEX_CODE.  All
       users changed.
       src/term.c (append_glyphless_glyph, produce_glyphless_glyph): Fix
       comments.
       (produce_glyphless_glyph): Enclose "U+nnnn" and "empty box"
       whitespace in "[]", to simulate a box.  Don't use uninitialized
       variable `width'.
       lisp/international/characters.el (glyphless-char-display-control):
       Renamed from glyphless-char-control; all users changed.  Doc fix.
       Signal an error if display method is not one of the recognized
       symbols.
       doc/emacs/rmail.texi (Rmail Coding): Characters with no fonts are not
       necessarily displayed as empty boxes.
       doc/emacs/mule.texi (Language Environments, Fontsets): Characters with no
       fonts are not necessarily displayed as empty boxes.
       doc/emacs/display.texi (Text Display): Document display of glyphless
       characters.
       doc/lispref/display.texi (Usual Display): Characters with no fonts are not
       necessarily displayed as empty boxes.
       etc/NEWS: Document display of glyphless characters.
      0eb025fb
  3. 07 Nov, 2010 1 commit
  4. 06 Nov, 2010 1 commit
  5. 05 Nov, 2010 3 commits
    • Eli Zaretskii's avatar
      Cleanup -Wall warnings. · 0a567226
      Eli Zaretskii authored
       xdisp.c (get_window_cursor_type): Move inside a HAVE_WINDOW_SYSTEM-only
       part.  Remove "#ifdef HAVE_WINDOW_SYSTEM" from body of function.
       (null_glyph_slice): Move declaration into HAVE_WINDOW_SYSTEM-only part.
      0a567226
    • Eli Zaretskii's avatar
      Fix unified mouse highlight after compiling on Unix. · 8e5ba371
      Eli Zaretskii authored
       xdisp.c (x_consider_frame_title, tool_bar_lines_needed): Move
       prototypes to HAVE_WINDOW_SYSTEM-only part.
       frame.h (MOUSE_HL_INFO): Fix definition to work both for
       TTY-only and GUI builds.
      8e5ba371
    • Eli Zaretskii's avatar
      Cleanup fallout from redesigning mouse highlight. · 28118eb6
      Eli Zaretskii authored
       dispextern.h (tty_draw_row_with_mouse_face): Add prototype.
       xdisp.c (draw_row_with_mouse_face): Don't #ifdef away on MSDOS.
       Call tty_draw_row_with_mouse_face on MSDOS as well.
       msdos.c (tty_draw_row_with_mouse_face): Renamed from
       draw_row_with_mouse_face.  Make the argument list identical to the
       GPM implementation.
       msdos.h (Display_Info): Restore typedef.
      28118eb6
  6. 04 Nov, 2010 1 commit
  7. 01 Nov, 2010 2 commits
    • Eli Zaretskii's avatar
      Finish coding mouse highlight redesigned for portability. · bbf534ce
      Eli Zaretskii authored
      Not compiled yet.
      
       nsterm.m (ns_update_window_begin, ns_update_window_end)
       (ns_update_end, x_destroy_window, ns_frame_up_to_date)
       (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
       (ns_dumpglyphs_image, ns_dumpglyphs_stretch)
       (ns_initialize_display_info, keyDown, mouseMoved, mouseExited):
       Replace Display_Info with Mouse_HLInfo everywhere where
       mouse_face_* members were accessed for mouse highlight purposes.
       xterm.c (x_update_window_begin, x_update_window_end)
       (x_update_end, XTframe_up_to_date, x_set_mouse_face_gc)
       (handle_one_xevent, x_free_frame_resources, x_term_init): Replace
       Display_Info with Mouse_HLInfo everywhere where mouse_face_*
       members were accessed for mouse highlight purposes.
       w32term.c (x_update_window_begin, x_update_window_end)
       (x_update_end, w32_read_socket, x_free_frame_resources)
       (w32_initialize_display_info): Replace Display_Info with
       Mouse_HLInfo everywhere where mouse_face_* members were accessed
       for mouse highlight purposes.
       xdisp.c (show_mouse_face, note_mode_line_or_margin_highlight)
       (note_mouse_highlight) [HAVE_WINDOW_SYSTEM]: Don't run GUI code
       unless the frame is on a window-system.
      bbf534ce
    • Kenichi Handa's avatar
      Handle glyphless characters on tty. · b18fad6d
      Kenichi Handa authored
      b18fad6d
  8. 31 Oct, 2010 1 commit
    • Eli Zaretskii's avatar
      Start redesigning portable mouse highlight. Not compiled. · 7ea692f6
      Eli Zaretskii authored
       xdisp.c (get_tool_bar_item, handle_tool_bar_click)
       (note_tool_bar_highlight, draw_glyphs, erase_phys_cursor)
       (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
       (note_mode_line_or_margin_highlight, note_mouse_highlight)
       (x_clear_window_mouse_face, cancel_mouse_face, expose_frame):
       Replace Display_Info with Mouse_HLInfo everywhere where
       mouse_face_* members were accessed for mouse highlight purposes.
       frame.h (MOUSE_HL_INFO): New macro.
       lisp.h (Mouse_HLInfo): New data type.
       xterm.h (struct x_display_info):
       w32term.h (struct w32_display_info):
       nsterm.h (struct ns_display_info):
       termchar.h (struct tty_display_info): Use it instead of
       mouse_face_* members.
       dispextern.h (DPYINFO_DEFINED): Remove definition.
       (FRAME_X_DISPLAY_INFO): Remove definition.
       (show_mouse_face, clear_mouse_face): Update type of 1st argument.
      7ea692f6
  9. 30 Oct, 2010 1 commit
    • Eli Zaretskii's avatar
      Unify mouse highlight code of MSDOS and GUI sessions. · d009ae66
      Eli Zaretskii authored
       xdisp.c (coords_in_mouse_face_p): Move prototype out of the
       HAVE_WINDOW_SYSTEM conditional.
       (x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
       HAVE_WINDOW_SYSTEM block.
       (try_window_id) [HAVE_GPM || MSDOS]: Call
       x_clear_window_mouse_face.
       (draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
       systems.
       (show_mouse_face): Call it, instead of calling draw_glyphs directly.
       (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
       (cursor_in_mouse_face_p, rows_from_pos_range)
       (mouse_face_from_buffer_pos, mouse_face_from_string_pos)
       (note_mode_line_or_margin_highlight, note_mouse_highlight)
       (x_clear_window_mouse_face, cancel_mouse_face): Move out of the
       HAVE_WINDOW_SYSTEM block.  Ifdef away window-system specific
       fragments.
       (note_mouse_highlight): Call popup_activated for MSDOS as well.
       Clear mouse highlight if pointer is over glyphs whose OBJECT is an
       integer.
       (mouse_face_from_buffer_pos): Add parentheses around && within ||.
       xmenu.c (popup_activated): Don't define on MSDOS.
       dispnew.c (mirror_make_current): Set Y coordinate of the
       mode-line and header-line rows.
       termchar.h (struct tty_display_info): Define mouse_face_*
       members not only for MSDOS.  Delete stray whitespace.
       <mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
       struct members.
       dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
       (DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
       (DPYINFO_DEFINED) [HAVE_NS]: Define.
       (Display_Info) [!DPYINFO_DEFINED]: Define here.
       (FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
       (FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
       (frame_to_window_pixel_xy, note_mouse_highlight)
       (x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
       (show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
       HAVE_WINDOW_SYSTEM conditional.
       (draw_row_with_mouse_face): Declare prototype.
       msdos.h (Display_Info): Don't define here.
       msdos.c (show_mouse_face, clear_mouse_face)
       (fast_find_position, IT_note_mode_line_highlight)
       (IT_note_mouse_highlight): Functions deleted.
       (IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
       instead of IT_note_mouse_highlight.
       (draw_row_with_mouse_face, popup_activated): New functions.
      d009ae66
  10. 29 Oct, 2010 1 commit
  11. 23 Oct, 2010 6 commits
  12. 16 Oct, 2010 3 commits
  13. 09 Oct, 2010 1 commit
    • Eli Zaretskii's avatar
      Finished work on mouse_face_from_buffer_pos for bidi-reordered rows. · 2f3f89b3
      Eli Zaretskii authored
      Need lots of testing, including bug#1220.
      Next task: get rid of fast_find_position, call mouse_face_from_buffer_pos
      instead.
      
       xdisp.c (rows_from_pos_range): New function.
       (mouse_face_from_buffer_pos): Use it instead of calling
       row_containing_pos for START_CHARPOS and END_CHARPOS.
       (note_mouse_highlight): When bidi reordering is turned on in a
       buffer, call next-single-property-change and
       previous-single-property-change with last argument nil.
      2f3f89b3
  14. 02 Oct, 2010 3 commits
    • Eli Zaretskii's avatar
      Fix beg_col calculation when painting from window start. · e1291a36
      Eli Zaretskii authored
       xdisp.c (mouse_face_from_buffer_pos): Don't compute beg_col
       if already decided to paint from beginning of window.
      e1291a36
    • Eli Zaretskii's avatar
      Fix mouse highlight in bidi-reordered continued lines. · 1f382a02
      Eli Zaretskii authored
       xdisp.c (row_containing_pos): Don't return too early when CHARPOS is in a
       bidi-reordered continued line.  Return immediately when the first
       hit is found in a line that is not continued, or when an exact
       match for CHARPOS is found.
       (mouse_face_from_buffer_pos): Rewrite to not assume that
       START_CHARPOS is always in mouse_face_beg_row.  If necessary, swap
       mouse_face_beg_row and mouse_face_end_row so that the former is
       always above the latter or identical to it.
      
       Continued lines that begin or end outside of the visible region 
       still don't work.
      1f382a02
    • Eli Zaretskii's avatar
      Fix minor bugs in mouse highlight. · 12d54c2e
      Eli Zaretskii authored
       xdisp.c (coords_in_mouse_face_p): Fix the conditions for when
       mouse_face_beg_row and mouse_face_end_row are equal.
       (note_mouse_highlight): Clear mouse highlight when mouse pointer
       is in a R2L row on the stretch glyph that stands for no text
       beyond the line end.
      12d54c2e
  15. 01 Oct, 2010 1 commit
  16. 29 Sep, 2010 3 commits
    • Eli Zaretskii's avatar
      Fix bug #7128. · af7ef32d
      Eli Zaretskii authored
       xdisp.c (reseat_1): Initialize bidi_it.paragraph_dir to NEUTRAL_DIR.
       (handle_invisible_prop, iterate_out_of_display_property)
       (next_element_from_buffer): If bidi_it.first_elt is set, call
       bidi_paragraph_init with NO_DEFAULT_P argument non-zero.
      af7ef32d
    • Eli Zaretskii's avatar
    • Eli Zaretskii's avatar
      Fix int/EMACS_INT use in xdisp.c and print.c. · d585695f
      Eli Zaretskii authored
       print.c (print_object): Fix format string and argument types for
       printing a Lisp_Misc_Marker.
       xdisp.c (pos_visible_p, c_string_pos, number_of_chars)
       (load_overlay_strings, get_overlay_strings_1)
       (get_overlay_strings, forward_to_next_line_start)
       (back_to_previous_visible_line_start, reseat, reseat_to_string)
       (get_next_display_element, next_element_from_string)
       (next_element_from_c_string, next_element_from_buffer)
       (move_it_vertically_backward, move_it_by_lines, add_to_log)
       (message_dolog, message_log_check_duplicate, message2_nolog)
       (message3, message3_nolog, vmessage, set_message, set_message_1)
       (hscroll_window_tree, text_outside_line_unchanged_p)
       (set_cursor_from_row, set_vertical_scroll_bar, redisplay_window)
       (find_last_unchanged_at_beg_row)
       (find_first_unchanged_at_end_row, row_containing_pos)
       (trailing_whitespace_p, display_mode_element, decode_mode_spec)
       (display_count_lines, x_produce_glyphs, note_mouse_highlight): Use
       EMACS_INT for buffer and string positions.
       dispextern.h (struct it) <string_nchars>: Declare EMACS_INT.
       (row_containing_pos): Adjust prototype.
       lisp.h (pos_visible_p, message2, message2_nolog, message3)
       (message2_nolog, set_message): Adjust prototypes.
      d585695f
  17. 27 Sep, 2010 1 commit
  18. 25 Sep, 2010 2 commits
    • Lars Magne Ingebrigtsen's avatar
    • Eli Zaretskii's avatar
      Fix int/EMACS_INT use in keyboard.c. · 41118bd3
      Eli Zaretskii authored
       keyboard.c <last_point_position, last_non_minibuf_size>: Declare EMACS_INT.
       (echo_truncate, adjust_point_for_property, read_char)
       (gen_help_event, make_lispy_event, modify_event_symbol)
       (Fexecute_extended_command, stuff_buffered_input): Use EMACS_INT
       for buffer positions and string length.
       keyboard.h (gen_help_event): Adjust prototype.
       termhooks.h <struct input_event>: Make `code' member EMACS_INT.
       commands.h <last_point_position>: Declare EMACS_INT.
       xdisp.c <help_echo_pos>: Define as EMACS_INT.
       (truncate_echo_area): Accept EMACS_INT argument.
       dispextern.h <help_echo_pos>: Declare EMACS_INT.
       lisp.h (truncate_echo_area): Adjust prototype.
       composite.c (composition_adjust_point): Return EMACS_INT.
       composite.h (composition_adjust_point): Adjust prototype.
      41118bd3
  19. 24 Sep, 2010 2 commits
    • Eli Zaretskii's avatar
      Fix int/EMACS_INT use in ccl.c, cmds.c, data.c, dispnew.c. · ace1712c
      Eli Zaretskii authored
       keyboard.c (make_lispy_position): Use EMACS_INT for buffer
       positions.
       xdisp.c (redisplay_internal, try_window_id)
       (set_cursor_from_row, find_first_unchanged_at_end_row): Use
       EMACS_INT for buffer positions.
       dispextern.h (set_cursor_from_row, mode_line_string)
       (marginal_area_string): Adjust prototypes.
       dispnew.c (increment_matrix_positions)
       (increment_row_positions, copy_glyph_row_contents)
       (mode_line_string, marginal_area_string): Use EMACS_INT for buffer
       positions.
       dispextern.h (mode_line_string, marginal_area_string)
       (increment_matrix_positions, increment_row_positions): Adjust
       prototypes.
       data.c (Faref, Faset): Use EMACS_INT for string length and
       positions.
       cmds.c (internal_self_insert): Use EMACS_INT for the count of
       characters to insert.
       ccl.c (Fccl_execute_on_string): Use EMACS_INT for string
       position and size.
      ace1712c
    • Lars Magne Ingebrigtsen's avatar
  20. 23 Sep, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix more uses of int instead of EMACS_INT. · 579c18d0
      Eli Zaretskii authored
       xdisp.c (check_point_in_composition, reconsider_clip_changes):
       Use EMACS_INT for buffer position variables and arguments.
       composite.c (get_composition_id, find_composition)
       (run_composition_function, compose_text)
       (composition_gstring_width, autocmp_chars)
       (composition_update_it, Ffind_composition_internal): Use EMACS_INT
       for buffer positions and string length variables and arguments.
       composite.h (get_composition_id, find_composition, compose_text)
       (composition_gstring_width): Adjust prototypes.
       editfns.c (Fformat): Use EMACS_INT for string size variables.
       xdisp.c (store_mode_line_noprop, display_mode_element): Use
       EMACS_INT for string positions.
       intervals.c (get_property_and_range): Use EMACS_INT for buffer
       position arguments.
       intervals.h (get_property_and_range): Adjust prototype.
       character.c (parse_str_as_multibyte, str_as_multibyte)
       (parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
       (string_count_byte8, string_escape_byte8, c_string_width)
       (strwidth, lisp_string_width, multibyte_chars_in_text): Use
       EMACS_INT for string length variables and arguments.
       (string_escape_byte8): Protect against too long strings.
       character.h (parse_str_as_multibyte, str_as_multibyte)
       (parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
       (c_string_width, strwidth, lisp_string_width): Adjust
       prototypes.
       lisp.h (check_point_in_composition): Adjust prototype.
      579c18d0
  21. 22 Sep, 2010 1 commit
  22. 18 Sep, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix bug #7038 with cursor motion in paragraphs w/o strong characters. · bea4f10c
      Eli Zaretskii authored
       xdisp.c (Fcurrent_bidi_paragraph_direction): Call
       bidi_paragraph_init with NO_DEFAULT_P non-zero.
       bidi.c (bidi_paragraph_init): Accept an additional argument
       NO_DEFAULT_P; all callers changed.  If NO_DEFAULT_P is non-zero,
       search back until a paragraph with a strong directional character
       is found, and use that to determine paragraph's base direction.
       dispextern.h (bidi_paragraph_init): Update prototype.
      bea4f10c
  23. 31 Aug, 2010 1 commit
  24. 28 Aug, 2010 1 commit
    • Eli Zaretskii's avatar
      Clean up mouse highlight in R2L lines. · 1b5a721b
      Eli Zaretskii authored
       xdisp.c (coords_in_mouse_face_p): New function, bidi-aware.
       (cursor_in_mouse_face_p, note_mouse_highlight, erase_phys_cursor):
       Call it instead of comparing with mouse-face members of dpyinfo.
       (note_mode_line_or_margin_highlight): Fix confusingly swapped
       usage of hpos and vpos.
      1b5a721b