1. 08 May, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix vertical cursor motion when there's a display string with newline at EOL. · 07525f77
      Eli Zaretskii authored
       src/xdisp.c (row_for_charpos_p): New function, with code of
       cursor_row_p, but accepts an additional argument CHARPOS instead
       of using a hardcoded PT.
       (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
       (row_containing_pos): Call row_for_charpos_p instead of partially
       doing the same.  Fixes cursor positioning under longlines-mode
       when longlines-show-effect includes more than one newline, when
       moving the cursor vertically up.
      07525f77
  2. 06 May, 2013 1 commit
  3. 05 May, 2013 1 commit
  4. 02 Apr, 2013 1 commit
    • Paul Eggert's avatar
      Prefer < to > in range checks such as 0 <= i && i < N. · 7216e43b
      Paul Eggert authored
      This makes it easier to visualize quantities on a number line.
      This patch doesn't apply to all such range checks,
      only to the range checks affected by the 2013-03-24 change.
      This patch reverts most of the 2013-03-24 change.
      * alloc.c (xpalloc, Fgarbage_collect):
      * ccl.c (ccl_driver, resolve_symbol_ccl_program):
      * character.c (string_escape_byte8):
      * charset.c (read_hex):
      * data.c (cons_to_unsigned):
      * dispnew.c (update_frame_1):
      * doc.c (Fsubstitute_command_keys):
      * doprnt.c (doprnt):
      * editfns.c (hi_time, decode_time_components):
      * fileio.c (file_offset):
      * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
      * font.c (font_intern_prop):
      * frame.c (x_set_alpha):
      * gtkutil.c (get_utf8_string):
      * indent.c (check_display_width):
      * keymap.c (Fkey_description):
      * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
      * lread.c (read1):
      * minibuf.c (read_minibuf_noninteractive):
      * process.c (wait_reading_process_output):
      * search.c (Freplace_match):
      * window.c (get_phys_cursor_glyph):
      * xdisp.c (redisplay_internal):
      * xsmfns.c (smc_save_yourself_CB):
      Prefer < to > for range checks.
      * dispnew.c (sit_for): Don't mishandle NaNs.
      This fixes a bug introduced in the 2013-03-24 change.
      * editfns.c (decode_time_components): Don't hoist comparison.
      This fixes another bug introduced in the 2013-03-24 change.
      7216e43b
  5. 31 Mar, 2013 1 commit
  6. 29 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * indent.c (current_column_bol_cache): Remove leftover which is not · 781f4782
      Dmitry Antipov authored
      used in Fmove_to_column any more.
      (current_column, scan_for_column): Adjust users.
      * keyboard.c (last_point_position_buffer, last_point_position_window):
      Remove leftovers which are not used for recording undo any more.
      (command_loop_1, syms_of_keyboard): Adjust users.
      * xdisp.c (last_max_ascent): Remove leftover which is not used in
      redisplay_window any more.
      (move_it_to): Adjust user.
      781f4782
  7. 28 Mar, 2013 2 commits
    • Dmitry Antipov's avatar
      * window.h (struct window): Replace hchild, vchild and buffer slots · e74aeda8
      Dmitry Antipov authored
      with the only contents slot.  This is possible because each valid
      window may have either the child window (in vertical or horizontal
      combination) or buffer to display (for the leaf window).  Using that,
      a lof of operations to traverse and/or change window hierarchies may
      be simplified.  New member horizontal is used to distinguish between
      horizontal and vertical combinations of internal windows.
      (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
      (WINDOW_VERTICAL_COMBINATION_P): New macros.
      (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
      * window.c (wset_hchild, wset_vchild): Remove.  Adjust all users.
      Use contents slot, not buffer, where appropriate.
      (wset_combination): New function.
      (wset_buffer): Add eassert.
      (Fframe_first_window): Simplify the loop reaching first window.
      (Fwindow_buffer): Use WINDOW_LEAF_P.
      (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
      (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
      (unshow_buffer): Convert initial debugging check to eassert.
      (replace_window, recombine_windows, Fdelete_other_windows_internal)
      (make_parent_window, window_resize_check, window_resize_apply)
      (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
      (Fset_window_configuration, delete_all_child_windows, save_window_save):
      Adjust to match struct window changes.
      (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
      (mark_window_cursors_off, count_windows, get_leaf_windows)
      (foreach_window_1): Simplify the loop.
      * alloc.c (mark_object): Do not check for the leaf window because
      internal windows has no glyph matrices anyway.
      * dispnew.c (clear_window_matrices, showing_window_margins_p)
      (allocate_matrices_for_window_redisplay, fake_current_matrices)
      (allocate_matrices_for_frame_redisplay, free_window_matrices)
      (build_frame_matrix_from_window_tree, mirror_make_current)
      (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
      (update_window_tree, set_window_update_flags): Simplify the loop.
      (sync_window_with_frame_matrix_rows): Enforce live window.
      Use contents slot, not buffer, where appropriate.
      * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
      and WINDOW_HORIZONTAL_COMBINATION_P.
      (make_frame_visible_1): Simplify the loop.
      Use contents slot, not buffer, where appropriate.
      * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
      (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
      (expose_window_tree): Likewise.
      Use contents slot, not buffer, where appropriate.
      * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
      to avoid deleted windows.  Use contents slot instead of buffer.
      * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
      * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
      * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
      * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
      e74aeda8
    • Dmitry Antipov's avatar
      * xdisp.c (with_echo_area_buffer_unwind_data): Save window · 5c89ca24
      Dmitry Antipov authored
      start marker...
      (unwind_with_echo_area_buffer): ...to restore it here.  This
      is needed to ensure that...
      (redisplay_window): ...both window markers are valid here,
      which is verified by eassert.
      * editfns.c (save_excursion_save): Do not assume that
      selected_window always displays the buffer.
      5c89ca24
  8. 24 Mar, 2013 2 commits
    • Andreas Schwab's avatar
      Reorder conditions that are written backwards · 908589fd
      Andreas Schwab authored
      * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
      written backwards.
      * blockinput.h (input_blocked_p): Likewise.
      * bytecode.c (exec_byte_code): Likewise.
      * callproc.c (call_process_kill, call_process_cleanup)
      (Fcall_process): Likewise.
      * ccl.c (ccl_driver, resolve_symbol_ccl_program)
      (Fccl_execute_on_string): Likewise.
      * character.c (string_escape_byte8): Likewise.
      * charset.c (read_hex): Likewise.
      * cm.c (calccost): Likewise.
      * data.c (cons_to_unsigned): Likewise.
      * dired.c (directory_files_internal, file_name_completion):
      Likewise.
      * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
      (sit_for): Likewise.
      * doc.c (Fsubstitute_command_keys): Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
      * emacsgtkfixed.c: Likewise.
      * fileio.c (file_offset, Fwrite_region): Likewise.
      * floatfns.c (Fexpt, fmod_float): Likewise.
      * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
      Likewise.
      * font.c (font_intern_prop): Likewise.
      * frame.c (x_set_alpha): Likewise.
      * gtkutil.c (get_utf8_string): Likewise.
      * indent.c (check_display_width): Likewise.
      * intervals.c (create_root_interval, rotate_right, rotate_left)
      (split_interval_right, split_interval_left)
      (adjust_intervals_for_insertion, delete_node)
      (interval_deletion_adjustment, adjust_intervals_for_deletion)
      (merge_interval_right, merge_interval_left, copy_intervals)
      (set_intervals_multibyte_1): Likewise.
      * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
      * keymap.c (Fkey_description): Likewise.
      * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
      * lread.c (openp, read_integer, read1, string_to_number):
      Likewise.
      * menu.c (ensure_menu_items): Likewise.
      * minibuf.c (read_minibuf_noninteractive): Likewise.
      * print.c (printchar, strout): Likewise.
      * process.c (create_process, Faccept_process_output)
      (wait_reading_process_output, read_process_output, send_process)
      (wait_reading_process_output): Likewise.
      * profiler.c (make_log, handle_profiler_signal): Likewise.
      * regex.c (re_exec): Likewise.
      * regex.h: Likewise.
      * search.c (looking_at_1, Freplace_match): Likewise.
      * sysdep.c (get_child_status, procfs_ttyname)
      (procfs_get_total_memory): Likewise.
      * systime.h (EMACS_TIME_VALID_P): Likewise.
      * term.c (dissociate_if_controlling_tty): Likewise.
      * window.c (get_phys_cursor_glyph): Likewise.
      * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
      Likewise.
      * xfns.c (Fx_window_property): Likewise.
      * xmenu.c (set_frame_menubar): Likewise.
      * xselect.c (x_get_window_property, x_handle_dnd_message):
      Likewise.
      * xsmfns.c (smc_save_yourself_CB): Likewise.
      * xterm.c (x_scroll_bar_set_handle): Likewise.
      908589fd
    • Paul Eggert's avatar
      Static checking by GCC 4.8-20130319. · a9ebfa0b
      Paul Eggert authored
      * image.c (gif_load): Assume pass < 3 to pacify GCC.
      * process.c (Fset_process_datagram_address)
      (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
      * xdisp.c (get_char_face_and_encoding):
      (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
      (get_glyph_face_and_encoding): Prepare face before possibly using it.
      (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
      a9ebfa0b
  9. 22 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * frame.h (struct frame): Put menu_bar_window under #ifdef · 5a49b79c
      Dmitry Antipov authored
      because this member is not needed when X toolkit is in use.
      (fset_menu_bar_window):
      * dispnew.c (clear_current_matrices, clear_desired_matrices)
      (free_glyphs, update_frame):
      * xdisp.c (expose_frame): Likewise.
      (display_menu_bar): Likewise.  Remove redundant eassert.
      * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
      toolkit is in use.
      5a49b79c
  10. 20 Mar, 2013 2 commits
    • Dmitry Antipov's avatar
      * window.h (struct window): Convert left_col, top_line, total_lines · 5f24fa51
      Dmitry Antipov authored
      and total_cols from Lisp_Objects to integers.  Adjust comments.
      (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
      Remove.
      (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
      (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
      * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
      Adjust users where appropriate.
      5f24fa51
    • Dmitry Antipov's avatar
      * frame.h (struct frame): Drop resx and resy because the same data is · 42143acd
      Dmitry Antipov authored
      available from window system-specific output context.  Adjust users.
      (default_pixesls_per_inch_x, default_pixesls_per_inch_y): New
      functions to provide defaults when no window system available.
      (FRAME_RES_X, FRAME_RES_Y): New macros.
      (NUMVAL): Moved from xdisp.c.
      * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
      (Ffont_face_attributes, Fopen_font):
      * image.c (gs_load):
      * w32font.c (fill_in_logfont):
      * xdisp.c (calc_pixel_width_or_height):
      * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
      * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
      42143acd
  11. 13 Mar, 2013 1 commit
  12. 10 Mar, 2013 1 commit
    • Eli Zaretskii's avatar
      Use macros from dispextern.h where appropriate. · 138c0ae8
      Eli Zaretskii authored
       src/xdisp.c (display_tool_bar_line, redisplay_tool_bar)
       (redisplay_internal, set_cursor_from_row, try_window)
       (try_window_id, dump_glyph_row, extend_face_to_end_of_line)
       (display_line, notice_overwritten_cursor)
       (mouse_face_from_buffer_pos, note_mouse_highlight): Use
       MATRIX_ROW_DISPLAYS_TEXT_P.
       (note_mouse_highlight): Use MATRIX_ROW_GLYPH_START.
       (mouse_face_from_string_pos, fast_find_string_pos): Use
       MATRIX_ROW_VPOS.
       src/xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
       src/w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
       src/xdisp.c (try_cursor_movement): Use MATRIX_ROW and
       MATRIX_MODE_LINE_ROW.
       src/dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW.
      138c0ae8
  13. 08 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * search.c (find_newline): Accept start and end byte positions · b5426561
      Dmitry Antipov authored
      as arguments and allow -1 if not known.
      (find_newline_no_quit): Likewise for start position.
      * lisp.h (find_newline, find_newline_no_quit): Adjust prototype.
      * bidi.c (bidi_find_paragraph_start): Pass byte position to
      find_newline_no_quit, thus eliminating CHAR_TO_BYTE.
      * editfns.c (Fconstrain_to_field): Break long line.  Adjust
      call to find_newline.
      * indent.c (vmotion): Adjust calls to find_newline_no_quit.
      Use DEC_BOTH to start next search from the previous buffer
      position, where appropriate.
      * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
      (get_visually_first_element, move_it_vertically_backward): Likewise.
      Obtain byte position from the display iterator, where appropriate.
      b5426561
  14. 07 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * bidi.c (bidi_fetch_char): Swap first and second arguments · 36075a19
      Dmitry Antipov authored
      to match other functions accepting character and byte positions.
      Adjust comment.
      (bidi_resolve_explicit_1, bidi_level_of_next_char): Adjust users.
      (bidi_paragraph_init): Likewise.  Use DEC_BOTH which is faster
      when you need just to move to the previous buffer position.
      * xdisp.c (Fcurrent_bidi_paragraph_direction): Use DEC_BOTH.
      36075a19
  15. 06 Mar, 2013 1 commit
    • Eli Zaretskii's avatar
      Rename find_next_newline to find_newline_no_quit. · a611149e
      Eli Zaretskii authored
       src/search.c (find_newline_no_quit): Rename from find_next_newline.
       Add commentary.
       src/lisp.h (find_newline_no_quit): Rename prototype.
       src/xdisp.c (back_to_previous_line_start)
       (forward_to_next_line_start, get_visually_first_element)
       (move_it_vertically_backward): Callers of find_newline_no_quit changed.
       src/indent.c (vmotion): Callers of find_newline_no_quit changed.
       src/bidi.c (bidi_find_paragraph_start): Callers of
       find_newline_no_quit changed.
      a611149e
  16. 05 Mar, 2013 1 commit
  17. 24 Feb, 2013 1 commit
  18. 20 Feb, 2013 1 commit
    • Dmitry Antipov's avatar
      * search.c (find_newline): Return byte position in bytepos. · 2a14a4f1
      Dmitry Antipov authored
      Adjust comment.
      (find_next_newline_no_quit, find_before_next_newline): Add
      bytepos argument.
      * lisp.h (find_newline, find_next_newline_no_quit)
      (find_before_next_newline): Adjust prototypes.
      * bidi.c (bidi_find_paragraph_start):
      * editfns.c (Fconstrain_to_field, Fline_end_position):
      * indent.c (compute_motion, vmotion):
      * xdisp.c (back_to_previous_line_start, forward_to_next_line_start):
      (get_visually_first_element, move_it_vertically_backward):
      Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
      2a14a4f1
  19. 18 Feb, 2013 1 commit
  20. 17 Feb, 2013 1 commit
  21. 15 Feb, 2013 1 commit
    • Dmitry Antipov's avatar
      * composite.c (fill_gstring_header): Remove useless prototype. · 0063fdb1
      Dmitry Antipov authored
      Break long line.
      * lisp.h (message_dolog, compile_pattern): Adjust prototype.
      * print.c (PRINTDECLARE, print_object):
      * search.c (compile_pattern, fast_looking_at, search_buffer):
      (simple_search, boyer_moore, Freplace_match):
      * xdisp.c (c_string_pos, number_of_chars, message_dolog):
      (get_overlay_arrow_glyph_row, display_mode_element):
      (decode_mode_spec_coding, message3):
      * xfaces.c (face_at_string_position): Use bool for booleans.
      Adjust comments.
      0063fdb1
  22. 12 Feb, 2013 2 commits
    • Eli Zaretskii's avatar
      Fix cursor positioning near scroll margin at top of window. · c4131562
      Eli Zaretskii authored
       src/xdisp.c (try_scrolling): Scroll text up more if point is too close
       to ZV and inside the scroll margin.  This makes sure point is moved
       outside the scroll margin in these cases.
      c4131562
    • Eli Zaretskii's avatar
      Minor additional fix in the wake of bugs #13623 and 13626. · 33b49d71
      Eli Zaretskii authored
       src/xdisp.c (redisplay_internal): Don't set w->region_showing to the
       marker's position.
       (display_line): Set w->region_showing to the value of
       it->region_beg_charpos, not to -1.  This fixes redisplay
       optimization when cursor is moved up after M->.
       src/window.h (struct window): region_showing can no longer be negative.
      33b49d71
  23. 11 Feb, 2013 3 commits
    • Paul Eggert's avatar
      Tune by using memchr and memrchr. · a84b7c53
      Paul Eggert authored
      * .bzrignore: Add string.h.
      * admin/merge-gnulib (GNULIB_MODULES): Add memrchr.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib/memrchr.c, lib/string.in.h, m4/memrchr.m4, m4/string_h.m4:
      New files, from gnulib.
      * src/doc.c (Fsnarf_documentation):
      * src/fileio.c (Fsubstitute_in_file_name):
      * src/search.c (find_newline, scan_newline):
      * src/xdisp.c (pos_visible_p, display_count_lines):
      Use memchr and memrchr rather than scanning byte-by-byte.
      * src/search.c (find_newline): Rename from scan_buffer.
      Omit first arg TARGET, as it's always '\n'.  All callers changed.
      a84b7c53
    • Eli Zaretskii's avatar
      Fix previous commit for bug #13675. · f5e1b680
      Eli Zaretskii authored
       src/xdisp.c (move_it_vertically_backward, move_it_by_lines): Don't
       use the limitation on backwards movement when lines are truncated
       in the window.
      f5e1b680
    • Dmitry Antipov's avatar
      * marker.c (set_marker_internal): If desired position is passed · f74de345
      Dmitry Antipov authored
      as a marker, avoid call to buf_charpos_to_bytepos.
      * window.c (Fset_window_point): Omit redundant type checking.
      (Fset_window_start): Likewise.  Format comment.
      (window_scroll_pixel_based): Use set_marker_restricted_both
      with character and byte positions obtained from an iterator.
      (Fset_window_configuration): Use set_marker_restricted_both.
      * xdisp.c (message_dolog): Likewise.
      f74de345
  24. 10 Feb, 2013 1 commit
  25. 09 Feb, 2013 1 commit
    • Eli Zaretskii's avatar
      Remove all references to buffer-file-type and related features. · 8549f9e8
      Eli Zaretskii authored
       src/xdisp.c (decode_mode_spec): Remove handling of %t.
      
       lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference
       buffer-file-type.
       lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix.
       (feedmail-run-the-queue, feedmail-dump-message-to-queue)
       (feedmail-send-it-immediately): Don't bind buffer-file-type, bind
       coding-system-for-write instead.
       lisp/jka-compr.el (jka-compr-write-region): Don't bind
       buffer-file-type.
       lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind
       buffer-file-type.
       lisp/files.el (file-name-buffer-file-type-alist): Remove defvar.
       (insert-file-contents-literally): Remove reference to
       file-name-buffer-file-type-alist.
       lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and
       make-obsolete.
       (find-buffer-file-type-match, find-buffer-file-type): Remove.
       (find-buffer-file-type-coding-system): Remove references to
       find-buffer-file-type-match, find-buffer-file-type, and
       buffer-file-type.
       Don't put find-buffer-file-type-coding-system into
       file-coding-system-alist.
       (find-file-binary, find-file-text): Bind coding-system-for-read
       instead of file-name-buffer-file-type-alist.
       lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type.
      
       doc/emacs/msdog.texi (Text and Binary): Delete the description of
       file-name-buffer-file-type-alist.
      
       doc/lispref/modes.texi (%-Constructs): Remove the description of %t.
       doc/lispref/nonascii.texi (MS-DOS File Types): Delete node.
      
      Fixes: debbugs:12989
      8549f9e8
  26. 08 Feb, 2013 1 commit
  27. 04 Feb, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix bugs #13623 and 13626 caused by changes in 2013-02-01T07:23:18Z!dmantipov@yandex.ru. · 86f7c0fe
      Eli Zaretskii authored
       src/xdisp.c (window_buffer_changed): region_showing can be negative,
       which still means region is being displayed.
       (redisplay_internal): Resurrect code that forced redisplay of the
       whole window when showing region and the mark has changed.  Record
       the new mark position to allow redisplay optimizations.
       (display_line): If it->region_beg_charpos is non-zero, set the
       window's region_showing member to -1.
       src/window.h (struct window) <region_showing>: Declare ptrdiff_t,
       not bitfield of 1 bit.
      86f7c0fe
  28. 01 Feb, 2013 1 commit
    • Dmitry Antipov's avatar
      * window.h (struct window): Convert base_line_number, base_line_pos · 422ff52b
      Dmitry Antipov authored
      and column_number_displayed members from Lisp_Object to ptrdiff_t.
      Convert region_showing member from Lisp_Object to bitfield.
      Remove sequence_number member.  Adjust comments.
      * window.c (sequence_number): Remove.
      (make_window): Initialize column_number_displayed.
      * print.c (print_object): Follow the printed representation of
      frames and print window pointer to distinguish between windows.
      (adjust_window_count): Invalidate base_line_pos.  Adjust comment.
      * xdisp.c (wset_base_line_number, wset_base_line_pos)
      (wset_column_number_displayed, wset_region_showing): Remove.
      (window_buffer_changed, mode_line_update_needed, redisplay_internal)
      (try_scrolling, try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, display_line)
      (display_mode_lines, decode_mode_spec): Adjust users.
      * .gdbinit (pwinx): Do not print sequence_number.
      422ff52b
  29. 25 Jan, 2013 1 commit
  30. 24 Jan, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop async_visible and async_iconified fields of struct frame. · edfa7fa0
      Dmitry Antipov authored
      This is possible because async input is gone; for details, see
      http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
      * frame.h (struct frame): Remove async_visible and async_iconified
      members, convert garbaged to unsigned bitfield.  Adjust comments.
      (FRAME_SAMPLE_VISIBILITY): Remove.  Adjust all users.
      (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
      * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
      Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
      FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
      * w32term.c: Ditto.
      (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
      properly.  Likewise for obscured.
      * xterm.c: Ditto.
      (handle_one_xevent): Save visible state go generate ICONIFY_EVENT
      properly.
      * nsterm.m: Ditto.
      (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
      edfa7fa0
  31. 23 Jan, 2013 1 commit
    • Stefan Monnier's avatar
      * src/xdisp.c (message2, message2_nolog): Remove functions. · b09cca6a
      Stefan Monnier authored
      (message3, message3_nolog): Extract nbytes and multibyteness directly
      from the string.  Change all callers.
      (message3_nolog): Don't set message_enable_multibyte since set_message
      will reset it anyway.
      (message1, message1_nolog): Use message3.
      (vmessage): Use a stack allocated buffer rather than f->message_buf.
      (with_echo_area_buffer): Remove last two arguments.  Update all callers.
      (set_message): Drop all but the second arg, which has to be a string.
      (set_message_1): Simplify now that we know that a1 is NULL and the
      second arg is a string.
      * src/frame.h (struct frame): Remove `message_buf' field.
      Use glyphs_initialized_p instead.
      (FRAME_MESSAGE_BUF): Remove macro.
      * src/w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
      * src/lisp.h (message2, message2_nolog): Remove declarations.
      (message3, message3_nolog): Update declarations.
      * src/keyboard.c (read_char_minibuf_menu_text)
      (read_char_minibuf_menu_width): Remove vars.
      (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
      to correctly handle multibyte strings.
      * src/frame.c (delete_frame): Don't free message_buf any more.
      * src/editfns.c (message_text, message_length): Remove vars.
      (Fmessage_box): Don't copy the Lisp string's bytes any longer.
      * src/fileio.c (auto_save_error): Use message3 instead of message2.
      * src/dispnew.c (adjust_frame_message_buffer): Remove function.
      b09cca6a
  32. 22 Jan, 2013 2 commits
    • Dmitry Antipov's avatar
      * window.h (struct window): Change window_end_valid member from · 9d93ce29
      Dmitry Antipov authored
      Lisp_Object to a bitfield.  Adjust comments.
      (wset_window_end_valid): Remove.
      * window.c (adjust_window_count): Clear window_end_valid.
      (Fwindow_end): Adjust user.  Remove ancient #if 0 code.
      (Fwindow_line_height, set_window_buffer, Frecenter)
      (Fsplit_window_internal, Fdelete_other_windows_internal)
      (Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
      * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
      * xdisp.c (check_window_end, reconsider_clip_changes)
      (redisplay_internal, mark_window_display_accurate_1, redisplay_window)
      (try_window, try_window_reusing_current_matrix, note_mouse_highlight)
      (find_first_unchanged_at_end_row, try_window_id): Likewise.
      9d93ce29
    • Dmitry Antipov's avatar
      * xdisp.c (mark_window_display_accurate): Simplify the loop · 1dcb8ea2
      Dmitry Antipov authored
      assuming that the only one of vchild, hchild or buffer window
      slots is non-nil.  Call mark_window_display_accurate_1 for
      the leaf windows only.
      (mark_window_display_accurate_1): Always assume leaf window.
      Adjust comment.
      1dcb8ea2
  33. 05 Jan, 2013 1 commit
    • Eli Zaretskii's avatar
      Improve display of glyph matrix by dump-glyph-matrix. · b630991b
      Eli Zaretskii authored
       src/xdisp.c (dump_glyph): Align glyph data better.  Use "pD" instead
       of a non-portable "t" to print ptrdiff_t values.  Allow up to 9
       digits for buffer positions, before misalignment starts.  Display
       "0" for integer "object" field.
       (dump_glyph_row): Adapt the header line to changes in dump_glyph.
       Display the newline glyph more unambiguously.
      b630991b