1. 14 Nov, 2013 1 commit
  2. 08 Nov, 2013 1 commit
    • Eli Zaretskii's avatar
      Switch cache-long-scans to t by default. · 080db47f
      Eli Zaretskii authored
       src/xdisp.c (message_dolog): Make sure the *Messages* buffer has its
       cache-long-scans disabled, since we don't want to call
       prepare_to_modify_buffer (in insert_1_both) for each message we
       display.
       src/buffer.h (bset_cache_long_scans): New INLINE function, moved
       from buffer.c.  Improve commentary to the buffer field setter
       functions.
       src/buffer.c (bset_cache_long_scans): Static function deleted.
       Improve commentary to the buffer field setter functions.
       (init_buffer_once): Default for cache-long-scans changed to t.
       (Bug#15797)
      080db47f
  3. 06 Nov, 2013 3 commits
  4. 05 Nov, 2013 2 commits
    • Stefan Monnier's avatar
      * src/xdisp.c (prepare_menu_bars): Mark static. · 9e6e9826
      Stefan Monnier authored
      * src/lisp.h (prepare_menu_bars): Don't declare.
      * src/xselect.c (x_handle_selection_clear):
      * src/callproc.c (call_process): Remove redundant call to prepare_menu_bars.
      9e6e9826
    • Xue Fuqiao's avatar
      Doc fix. · 29aa2b71
      Xue Fuqiao authored
      * doc/lispref/display.texi (Glyphs): Add an index for glyph code.
      
      * src/xdisp.c (syms_of_xdisp): Mention the active display table in doc
      string of glyphless-char-display.
      29aa2b71
  5. 04 Nov, 2013 2 commits
    • Eli Zaretskii's avatar
      Fix bug #15260 with building and installing Emacs in non-ASCII directories. · d0065ff1
      Eli Zaretskii authored
       src/xdisp.c (message3_nolog, message_with_string): Encode the string
       before writing it to the terminal in a non-interactive session.
       src/lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
       sure we concatenate them into a unibyte string.
       src/fileio.c (make_temp_name): Encode PREFIX, and decode the
       resulting temporary name before returning it to the caller.
       (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
       is a unibyte string, convert NAME to a unibyte string to ensure
       that the result is also a unibyte string.
       src/emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
       create unibyte strings from default paths and directory/file
       names.
       src/coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
       string.
       src/callproc.c (init_callproc): Use build_unibyte_string to make
       sure we create unibyte strings from default paths and
       directory/file names.
       src/buffer.c (init_buffer): Don't store default-directory of
       *scratch* in multibyte form.  The original problem which led to
       that is described in
       http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
       but it was solved long ago.
      
       lisp/startup.el (normal-top-level): Move setting eol-mnemonic-unix,
       eol-mnemonic-mac, eol-mnemonic-dos, and also setup of the locale
       environment and decoding all of the default-directory's to here
       from command-line.
       (command-line): Decode also argv[0].
       lisp/loadup.el: Error out if default-directory is a multibyte string
       when we are dumping.
       lisp/Makefile.in (emacs): Don't set LC_ALL=C.
      
       leim/Makefile.in (RUN_EMACS): Don't set LC_ALL=C.
      
       configure.ac: Don't disallow builds in non-ASCII directories.
      d0065ff1
    • Paul Eggert's avatar
      Port to stricter C99 platforms. · 91f2d272
      Paul Eggert authored
      Especially, C99 prohibits nesting a struct X inside struct Y if
      struct X has a flexible array member.
      Also, merge from gnulib, incorporating:
      2013-11-03 intprops: port to Oracle Studio c99
      * lib/intprops.h: Update from gnulib.
      * src/alloc.c (struct sdata): New type.
      (sdata): Implement in terms of struct sdata.
      Remove u member; all uses replaced by next_vector, set_next_vector.
      (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
      (SDATA_DATA_OFFSET): Now a constant, not a macro.
      (struct sblock): Rename first_data member to data, which is now
      a flexible array member.  All uses changed.
      (next_vector, set_next_vector, large_vector_vec): New functions.
      (vector_alignment): New constant.
      (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
      (struct large-vector): Now merely a NEXT member, since the old approach
      ran afoul of stricter C99.  All uses changed to use
      large_vector_vec or large_vector_offset.
      (large_vector_offset): New constant.
      * src/dispnew.c: Include tparam.h, for tgetent.
      Do not include term.h; no longer needed.
      * src/gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
      * src/lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
      (struct Lisp_Vector): Use a flexible array member for contents,
      instead of a union with a member that is an array of size 1.
      All uses changed.
      (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
      fact that the struct no longer contains a union.
      (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
      (struct Lisp_Save_Value, struct Lisp_Free):
      Use unsigned, not int, for spacers, to avoid c99 warning.
      (union specbinding): Use unsigned, not bool, for bitfield, as
      bool is not portable to pre-C99 hosts.
      91f2d272
  6. 29 Oct, 2013 1 commit
    • Stefan Monnier's avatar
      Add pre-redisplay-function and rectangular region · 3472b6c6
      Stefan Monnier authored
      * lisp/rect.el: Use lexical-binding.  Add new rectangular region support.
      (rectangle-mark): New command.
      (rectangle--region): New var.
      (deactivate-mark-hook): Reset rectangle--region.
      (rectangle--extract-region, rectangle--insert-for-yank)
      (rectangle--highlight-for-redisplay)
      (rectangle--unhighlight-for-redisplay): New functions.
      (region-extract-function, redisplay-unhighlight-region-function)
      (redisplay-highlight-region-function): Use them to handle
      rectangular region.
      * lisp/simple.el (region-extract-function): New var.
      (delete-backward-char, delete-forward-char, deactivate-mark): Use it.
      (kill-new, kill-append): Remove obsolete `yank-handler' argument.
      (kill-region): Replace obsolete `yank-handler' arg with `region'.
      (copy-region-as-kill, kill-ring-save): Add `region' argument.
      (redisplay-unhighlight-region-function)
      (redisplay-highlight-region-function): New vars.
      (redisplay--update-region-highlight): New function.
      (pre-redisplay-function): Use it.
      (exchange-point-and-mark): Don't deactivate the mark before
      reactivate-it anyway.
      * lisp/comint.el (comint-kill-region): Remove yank-handler argument.
      * lisp/delsel.el (delete-backward-char, backward-delete-char-untabify)
      (delete-char): Remove property, since it's now part of their
      default behavior.
      (self-insert-iso): Remove property since this command doesn't exist.
      
      * src/xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
      (syms_of_xdisp): Declare pre-redisplay-function.
      (markpos_of_region): Remove function.
      (init_iterator, compute_stop_pos, handle_face_prop)
      (face_before_or_after_it_pos, reseat_to_string)
      (get_next_display_element, window_buffer_changed)
      (redisplay_internal, try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, display_line)
      (note_mode_line_or_margin_highlight, note_mouse_highlight)
      (display_string, mouse_face_from_buffer_pos): Remove region handling.
      * src/window.h (struct window): Remove field `region_showing'.
      * src/dispextern.h (struct it): Remove region_beg/end_charpos.
      (face_at_buffer_position, face_for_overlay_string)
      (face_at_string_position): Update prototypes.
      * src/xfaces.c (face_at_buffer_position, face_for_overlay_string)
      (face_at_string_position): Remove `region_beg' and `region_end' args.
      * src/fontset.c (Finternal_char_font):
      * src/font.c (font_at, font_range): Adjust calls accordingly.
      * src/insdel.c (Qregion_extract_function): New var.
      (syms_of_insdel): Initialize it.
      (prepare_to_modify_buffer_1): Use it.
      3472b6c6
  7. 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
  8. 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
  9. 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
  10. 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
  11. 08 Oct, 2013 2 commits
  12. 07 Oct, 2013 1 commit
  13. 04 Oct, 2013 1 commit
  14. 03 Oct, 2013 1 commit
  15. 29 Sep, 2013 1 commit
  16. 28 Sep, 2013 1 commit
  17. 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
  18. 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
  19. 22 Sep, 2013 1 commit
  20. 18 Sep, 2013 3 commits
  21. 17 Sep, 2013 3 commits
  22. 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
  23. 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
  24. 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