1. 28 Aug, 2013 6 commits
    • Jan Djärv's avatar
      * nsterm.m (last_window): New variable. · 5ab473cd
      Jan Djärv authored
      (EV_TRAILER2): New macro.
      (EV_TRAILER): Call EV_TRAILER2.
      (mouseMoved:):  Add support for mouse-autoselect-window
      on nextstep.
      
      Fixes: debbugs:6888
      5ab473cd
    • Andreas Schwab's avatar
      * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P) · 78779650
      Andreas Schwab authored
      (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
      Remove unused macro definitions.
      (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
      (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA): Only
      define if emacs.
      78779650
    • 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
      * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change) · 6bdcbfe1
      Dmitry Antipov authored
      (Fprevious_overlay_change): Fast path for buffer with no overlays.
      6bdcbfe1
    • Paul Eggert's avatar
      * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, · 50b13cde
      Paul Eggert authored
      for portability to hosts where /bin/sh has problems.
      50b13cde
    • 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
  2. 27 Aug, 2013 4 commits
    • Paul Eggert's avatar
      Simplify SELECT_TYPE-related code. · d486344e
      Paul Eggert authored
      Like EMACS_TIME, this portability layer is no longer needed, since
      Emacs has been using fd_set as a portability layer for some time.
      * sysselect.h (FD_SETSIZE): Rename from MAXDESC.  All uses changed.
      (SELECT_TYPE): Remove.  All uses changed to fd_set.
      (fd_set) [!FD_SET]: New typedef.
      d486344e
    • Paul Eggert's avatar
      Simplify EMACS_TIME-related code. · 43aac990
      Paul Eggert authored
      This portability layer is no longer needed, since Emacs has been
      using struct timespec as a portability layer for some time.
      Merge from gnulib, incorporating:
      2013-08-27 timespec: new convenience constants and function
      * src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h:
      Include <time.h> rather than "systime.h"; that's all that's needed now.
      * src/dispnew.c: Include <timespec.h> rather than "systime.h";
      that's all that's needed now.
      * src/systime.h (EMACS_TIME): Remove.  All uses changed to struct timespec.
      (EMACS_TIME_RESOLUTION): Remove.  All uses changed to
      TIMESPEC_RESOLUTION.
      (LOG10_EMACS_TIME_RESOLUTION): Remove.  All uses changed to
      LOG10_TIMESPEC_RESOLUTION.
      (EMACS_SECS, emacs_secs_addr): Remove.  All uses changed to tv_sec.
      (EMACS_NSECS): Remove.  All uses changed to tv_nsec.
      (make_emacs_time): Remove.  All used changed to make_timespec.
      (invalid_timespec): Rename from invalid_emacs_time.  All uses changed.
      (current_timespec): Rename from current_emacs_time.  All uses changed.
      (add_emacs_time): Remove.  All uses changed to timespec_add.
      (sub_emacs_time): Remove.  All uses change dot timespec_sub.
      (EMACS_TIME_SIGN): Remove.  All uses changed to timespec_sign.
      (timespec_valid_p): Rename from EMACS_TIME_VALID_P.  All uses changed.
      (EMACS_TIME_FROM_DOUBLE): Remove.  All uses changed to dtotimespec.
      (EMACS_TIME_TO_DOUBLE): Remove.  All uses changed to timespectod.
      (current_timespec): Rename from current_emacs_time.  All uses changed.
      (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove.  All uses
      changed to timespec_cmp.
      * src/xgselect.c: Include <timespec.h>, since our .h files don't.
      43aac990
    • Dmitry Antipov's avatar
      * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:) · d350e350
      Dmitry Antipov authored
      * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
      Remove the leftovers.
      * gtkutil.c (toplevel): Do not declare Qxft but include
      font.h to do so.
      * image.c (toplevel): Do not declare Vlibrary_cache because
      it's already done in lisp.h.
      d350e350
    • Dmitry Antipov's avatar
      * lisp.h (Mouse_HLInfo): Move from here... · 9fed9729
      Dmitry Antipov authored
      * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
      (reset_mouse_highlight): New function.
      * msdos.c (dos_set_window_size, IT_update_begin)
      (internal_terminal_init):
      * nsterm.m (ns_update_window_end, x_free_frame_resources)
      (ns_initialize_display_info):
      * w32console.c (initialize_w32_display):
      * w32term.c (x_update_window_end, x_free_frame_resources)
      (w32_initialize_display_info):
      * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
      * window.c (Fdelete_other_windows_internal):
      * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
      * termchar.h (toplevel):
      * xterm.h (toplevel): Include dispextern.h.
      9fed9729
  3. 26 Aug, 2013 11 commits
  4. 24 Aug, 2013 4 commits
    • Eli Zaretskii's avatar
      Fix bug #15175 with cursor on boxed characters from display tables. · 11f20add
      Eli Zaretskii authored
       src/xdisp.c (get_next_display_element): Don't apply to characters
       from a display vector the logic of setting it->end_of_box_run_p
       suitable for characters from a buffer.
      11f20add
    • Eli Zaretskii's avatar
      Fix bug #15176 with setting directory times on MS-Windows. · b34454d0
      Eli Zaretskii authored
       src/w32.c (fdutimens): Call 'utime', which is implemented on w32.c
       to handle directories, rather than '_utime' which doesn't.
      b34454d0
    • Jan Djärv's avatar
      * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized · 6e1b469e
      Jan Djärv authored
      or fullscreen.
      
      Fixes: debbugs:14627
      6e1b469e
    • Paul Eggert's avatar
      System-dependent integer overflow fixes. · 9c05bccf
      Paul Eggert authored
      * process.c (Fset_process_window_size): Signal an error if
      the window size is outside the range supported by the lower level.
      * sysdep.c (set_window_size): Return negative on error,
      nonnegative on success, rather than -1, 0, 1 on not in system,
      failure, success.  This is simpler.  Caller changed.
      (serial_configure): Remove unnecessary initialization of local.
      (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
      size fits in unsigned long; this isn't true on some 32-bit hosts.
      Avoid buffer overrun if some future version of /proc/meminfo has a
      variable name longer than 20 bytes.
      (system_process_attributes) [__FreeBSD__]:
      Don't assume hw.availpages fits in 'int'.
      9c05bccf
  5. 23 Aug, 2013 4 commits
    • Paul Eggert's avatar
      Don't let very long directory names overrun the stack. · c365c355
      Paul Eggert authored
      Fix some related minor problems involving "//", vfork.
      * callproc.c (encode_current_directory): New function.
      (call_process): Don't append "/"; not needed.
      * fileio.c (file_name_as_directory_slop): New constant.
      (file_name_as_directory): Allow SRC to be longer than SRCLEN;
      this can save the caller having to alloca.
      (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
      Use SAFE_ALLOCA, not alloca.
      (directory_file_name, Fexpand_file_name): Leave leading "//"
      alone, since it can be special even on POSIX platforms.
      * callproc.c (call_process):
      * process.c (Fformat_network_address):
      * sysdep.c (sys_subshell):
      Use encode_current_directory rather than rolling our own.
      (create_process): No need to encode directory; caller does that now.
      * process.h (encode_current_directory): New decl.
      * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
      Rework to avoid 'goto xyzzy;'.
      c365c355
    • Eli Zaretskii's avatar
      Fix bug #15155 with ignoring face remapping for strings from prefix properties. · 6c6014d4
      Eli Zaretskii authored
       src/xdisp.c (handle_face_prop): If the default face was remapped use
       the remapped face for strings from prefix properties.
      6c6014d4
    • Dmitry Antipov's avatar
      Minor cleanup for redisplay interface and few related functions. · 9997ec56
      Dmitry Antipov authored
      * frame.h (enum text_cursor_kinds): Move from here...
      * dispextern.h (enum text_cursor_kinds): ...to here.
      (toplevel): Drop unnecessary declarations.
      (struct redisplay_interface): Use bool and enum text_cursor_kinds
      in update_window_end_hook and draw_window_cursor functions.
      (display_and_set_cursor, x_update_cursor): Adjust prototypes.
      * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
      * w32term.c (x_update_window_end,w32_draw_window_cursor):
      * xterm.c (x_update_window_end, x_draw_window_cursor):
      * xdisp.c (display_and_set_cursor, update_window_cursor)
      (update_cursor_in_window_tree, x_update_cursor): Use bool and
      enum text_cursor_kinds where appropriate.
      9997ec56
    • Dmitry Antipov's avatar
      Redesign redisplay interface to drop updated_row and updated_area. · 7f780da6
      Dmitry Antipov authored
      * dispextern.h (updated_row, updated_area): Remove declaration.
      (struct redisplay_interface): Pass glyph row and row area parameters
      to write_glyphs, insert_glyphs and clear_end_of_line functions.
      (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
      Adjust prototypes.
      * dispnew.c (updated_row, updated_area): Remove.
      (redraw_overlapped_rows, update_window_line): Adjust user.
      (update_marginal_area, update_text_area): Likewise.  Pass updated row
      as a parameter.  Prefer enum glyph_row_area to int where appropriate.
      * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
      Adjust users.
      7f780da6
  6. 22 Aug, 2013 1 commit
  7. 21 Aug, 2013 3 commits
  8. 20 Aug, 2013 2 commits
  9. 19 Aug, 2013 5 commits
    • Paul Eggert's avatar
      * image.c: Shrink memory needed for animation cache. · bb566cea
      Paul Eggert authored
      (SIGNATURE_DIGESTSIZE): New constant.
      (struct animation_cache): Make 'signature' a fixed size array of bytes.
      (imagemagick_create_cache): Copy the signature.  This saves
      several KB of memory that ImageMagick wastes per signature.
      Don't bother updating the update_time, as the caller does that now.
      (imagemagick_prune_animation_cache): Don't destroy the signature, as
      it's a fixed size struct member now.
      (imagemagick_get_animation_cache): Always destroy the signature,
      as it's now imagemagick_create_cache's responsibility to copy it.
      Avoid duplicate calls to strcmp and to imagemagick_create_cache,
      and use memcmp rather than strcmp.
      eassert that ImageMagick returns a signature of the specified length.
      bb566cea
    • Lars Magne Ingebrigtsen's avatar
    • Lars Magne Ingebrigtsen's avatar
      * image.c (imagemagick_get_animation_cache): Don't segfault on each invocation. · 6da26928
      Lars Magne Ingebrigtsen authored
      Bug introduced by 2013-08-19T07:01:37Z!eggert@cs.ucla.edu, which obviously hadn't even been
      tested once.
      6da26928
    • Paul Eggert's avatar
      * image.c: Fix animation cache signature memory leak. · d0139df5
      Paul Eggert authored
      Fix some other minor performance problems while we're at it.
      (imagemagick_create_cache): Clear just the members that
      need clearing.  Don't set update_time, as caller does that now.
      (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
      Simplify by using pointer-to-pointer instead of a prev pointer.
      (imagemagick_prune_animation_cache): Use make_emacs_time rather
      than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
      (imagemagick_get_animation_cache): Don't xstrdup the image signature;
      it's already a copy.  Free the signature probe unless it's cached.
      d0139df5
    • Paul Eggert's avatar
      * process.c (handle_child_signal): Fix crash; deleted pid. · 22490125
      Paul Eggert authored
      This was introduced by my 2013-08-12 fix for Bug#15035.
      
      Fixes: debbugs:15106
      22490125