1. 18 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * window.c (window_resize_check, window_resize_apply) · 748fa866
      Dmitry Antipov authored
      (window_from_coordinates, recombine_windows, set_window_buffer)
      (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
      (Fsplit_window_internal, Fdelete_window_internal)
      (freeze_window_starts): Use bool for booleans.
      * window.h (window_frame_coordinates, resize_frame_windows)
      (freeze_window_starts, set_window_buffer): Adjust prototypes.
      748fa866
  2. 17 Mar, 2013 2 commits
  3. 16 Mar, 2013 3 commits
  4. 15 Mar, 2013 5 commits
  5. 14 Mar, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix bug #13953 with spontaneous frame resizes on MS-Windows. · a5cc4dde
      Eli Zaretskii authored
       src/w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
       and incorrect code.  Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
       and WM_ACTIVATEAPP.
       (w32fullscreen_hook): If the frame is visible, reset
       f->want_fullscreen flag after changing the frame size.  If the
       frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
      a5cc4dde
  6. 13 Mar, 2013 7 commits
    • Daniel Colascione's avatar
      * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds · 3fc5e44a
      Daniel Colascione authored
      too so that these builds can use Cygwin's file conversion
      functions.  (We've been building and linking cygw32.o all along
      and just not using it.)
      3fc5e44a
    • Paul Eggert's avatar
      File synchronization fixes. · 47d7532e
      Paul Eggert authored
      * admin/CPP-DEFINES (BSD_SYSTEM, HAVE_FSYNC): Remove.
      * admin/merge-gnulib (GNULIB_MODULES): Add fsync, fdatasync.
      * configure.ac (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
      (fsync): Remove check; now done by gnulib.
      * lib/fdatasync.c, lib/fsync.c, m4/fdatasync.m4, m4/fsync.m4:
      New files, from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib-src/Makefile.in (LIB_FDATASYNC): New macro.
      (emacsclient${EXEEXT}): Use it.
      * lib-src/emacsclient.c (main): Use fdatasync, not fsync, since we don't
      care about metadata.  Keep trying if interrupted.
      * lib-src/movemail.c (main, popmail): Don't worry about BSD_SYSTEM, since
      fsync is available everywhere (or there is a substitute).  Don't
      report an error if fsync returns EINVAL.
      * nt/inc/ms-w32.h (fdatasync): New macro, suggested by Eli Zaretskii.
      * src/Makefile.in (LIB_FDATASYNC): New macro.
      (LIBES): Use it.
      * src/conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
      * src/fileio.c (Fwrite_region, write_region_inhibit_fsync):
      Don't worry about HAVE_FSYNC, since a substitute fsync is
      available if the system lacks one.
      (Fwrite_regin): Retry fsync if interrupted.
      
      Fixes: debbugs:13944
      47d7532e
    • Eli Zaretskii's avatar
      Fix bug #13937 with creating a maximized frame on MS-Windows. · c7ffccaf
      Eli Zaretskii authored
       src/w32term.c (w32_read_socket): If we Emacs frame is being
       activated, call w32fullscreen_hook, to make sure the new frame
       dimensions are in effect.
      c7ffccaf
    • Dmitry Antipov's avatar
      * window.c (Fscroll_other_window): Use SET_PT_BOTH because both · ffcd945e
      Dmitry Antipov authored
      character and byte positions can be obtained from marker.
      ffcd945e
    • Dmitry Antipov's avatar
      * xdisp.c (init_iterator): Simplify because both character and byte · 8a7debc1
      Dmitry Antipov authored
      positions are either specified or -1.  Add eassert.  Adjust comment.
      8a7debc1
    • Paul Eggert's avatar
      Static checking by Sun C 5.12. · d9df6f40
      Paul Eggert authored
      * lib-src/etags.c (analyse_regex): Omit unreachable code.
      * src/alloc.c (buffer_memory_full) [REL_ALLOC]:
      * src/bytecode.c (exec_byte_code):
      * src/dispnew.c (init_display):
      * src/eval.c (error):
      * src/fileio.c (Fsubstitute_in_file_name):
      * src/keyboard.c (Fevent_convert_list):
      * src/keymap.c (Fsingle_key_description):
      * src/term.c (maybe_fatal, fatal):
      * src/xfns.c (Fx_display_backing_store, Fx_display_visual_class):
      * src/xsmfns.c (Fhandle_save_session):
      Omit unreachable code.
      * src/keymap.c (map_keymap_char_table_item): Cast void * to
      a function pointer type; the C Standard requires this.
      d9df6f40
    • Paul Eggert's avatar
      * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out. · 7fd8c501
      Paul Eggert authored
      Include <sys/param.h> unconditionally, as that works elsewhere and
      is simpler here.  Include <sys/sysctl.h> if DARWIN_OS ||
      __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
      and FreeBSD now.
      7fd8c501
  7. 11 Mar, 2013 3 commits
  8. 10 Mar, 2013 5 commits
    • Daniel Colascione's avatar
      2013-03-10 Daniel Colascione <dancol@dancol.org> · 819e2da9
      Daniel Colascione authored
      	* w32term.h (GUISTR, GUI_ENCODE_FILE, GUI_ENCODE_SYSTEM, GUI_FN)
      	(GUI_SDATA, guichar_t): Macros to abstract out differences between
      	NTGUI_UNICODE and !NTGUI_UNICODE builds, some moved out of
      	w32fns.c.
      
      	* w32term.c (construct_drag_n_drop): Use the above macros to make
      	drag-and-drop work for non-ASCII filenames in cygw32 builds.
      
      	* w32fns.c (x_set_name, x_set_title): Use the above macros to
      	properly display non-ASCII frame titles in cygw32 builds.
      
      	* w32fns.c (Fw32_shell_execute): Use the above macros to properly
      	call ShellExecute in cygw32 builds.
      
      	* w32fn.c (Fx_file_dialog): Use the above macros to simplify the
      	common file dialog code.
      
      	* w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
      	can just use du like other systems.
      
      	* coding.c (from_unicode_buffer): Declare.
      	* coding.c (from_unicode_buffer): Implement.
      819e2da9
    • Stefan Monnier's avatar
      * src/lread.c: Minor cleanup. · d2e24f92
      Stefan Monnier authored
      (FROM_FILE_P): New macro.
      (skip_dyn_bytes, unreadchar, read1): Use it.
      (read_list): Consolidate duplicated code.
      d2e24f92
    • Stefan Monnier's avatar
    • 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
    • Kenichi Handa's avatar
      c230dd7d
  9. 09 Mar, 2013 1 commit
    • Stefan Monnier's avatar
      Separate mouse-1-click-follows-link from mouse-drag-region. · 27a98a62
      Stefan Monnier authored
      * lisp/mouse.el (mouse--down-1-maybe-follows-link): New function.
      (key-translation-map): Use it to implement mouse-1-click-follows-link.
      (mouse-drag-line, mouse-drag-track): Remove mouse-1-click-follows-link code.
      (mouse--remap-link-click-p): Remove.
      * src/keyboard.c (access_keymap_keyremap): Accept nil return value from
      functions to mean "no change".
      * src/keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN)
      (POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come
      from Elisp via unread-command-events.
      27a98a62
  10. 08 Mar, 2013 3 commits
    • Paul Eggert's avatar
      region-cache.c, scroll.c, search.c: Use bool for booleans. · 457882c2
      Paul Eggert authored
      * lisp.h (compile_pattern):
      * scroll.c (do_scrolling, do_direct_scrolling):
      * search.c (struct regexp_cache, compile_pattern_1)
      (compile_pattern, string_match_1, search_command)
      (trivial_regexp_p, search_buffer, Freplace_match, match_limit)
      (search_regs_saved, Fregexp_quote):
      Use bool for boolean.
      * region-cache.c (region_cache_forward, region_cache_backward):
      Fix comments to match code: these functions return int, not boolean.
      457882c2
    • 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
    • Paul Eggert's avatar
      print.c, process.c: Use bool for booleans. · 0bce5d9e
      Paul Eggert authored
      * lisp.h (wait_reading_process_output):
      * print.c (print_output_debug_flag, PRINTDECLARE, printchar)
      (strout, debug_output_compilation_hack, float_to_string, print)
      (print_object):
      * process.c (kbd_is_on_hold, inhibit_sentinels, process_output_skip)
      (decode_status, status_message, create_process, create_pty)
      (Fmake_network_process, Fnetwork_interface_info)
      (wait_reading_process_output, read_process_output)
      (write_queue_push, write_queue_pop, process_send_signal)
      (handle_child_signal, keyboard_bit_set, kbd_on_hold_p):
      * process.h (struct Lisp_Process, inhibit_sentinels, kbd_on_hold_p):
      Use bool for booleans.
      * process.c (Fnetwork_interface_list): Remove unused local.
      (connect_counter): Now EMACS_INT, not int.
      0bce5d9e
  11. 07 Mar, 2013 4 commits
    • 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
    • Eli Zaretskii's avatar
    • Dmitry Antipov's avatar
      Avoid character to byte conversions in motion subroutines. · c54aa166
      Dmitry Antipov authored
      * indent.h (compute_motion, vmotion): Add byte position argument.
      * indent.c (compute_motion): Use it and avoid CHAR_TO_BYTE.
      Add eassert.
      (Fcompute_motion): Break long line.  Adjust call to compute_motion.
      Use list5 for return value.
      (vmotion): Use byte position argument and avoid call to CHAR_TO_BYTE.
      Adjust comments, style and calls to compute_motion.
      (Fvertical_motion): Adjust call to vmotion.
      * window.c (Fdelete_other_windows_internal): Record window start
      byte position and adjust call to vmotion.
      (window_scroll_line_based): Likewise with call to compute_motion.
      Use SET_PT_BOTH.
      (Frecenter): Adjust calls to vmotion.
      c54aa166
    • Dmitry Antipov's avatar
      * lisp.h (list2i, list3i): New functions. · 3de717bd
      Dmitry Antipov authored
      (list4i): Move from window.c and make LISP_INLINE.
      * editfns.c (make_lisp_time):
      * fns.c (Flocale_info):
      * keyboard.c (parse_modifiers):
      * xterm.c (x_ewmh_activate_frame): Use list2i.
      * instel.c (signal_after_change):
      * nsfns.m (Fx_server_version, Fxw_color_values):
      * w32fns.c (Fxw_color_values, Fx_server_version):
      * xfns.c (Fxw_color_values, Fx_server_version): Use list3i.
      * fileio.c (Fvisited_file_modtime):
      * nsfns.m (Fns_display_usable_bounds):
      * w32.c (ltime): Use list4i.
      3de717bd
  12. 06 Mar, 2013 4 commits
    • 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
    • Eli Zaretskii's avatar
      Fix bug #13879 with raw-text encoding of msdos.c. · d26e478e
      Eli Zaretskii authored
       src/msdos.c: Change encoding to cp850.  (Bug#13879)
       (fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
      d26e478e
    • Dmitry Antipov's avatar
      Coding system support cleanup and minor refactoring. · 1af1a51a
      Dmitry Antipov authored
      * coding.h (enum coding_result_code): Remove
      CODING_RESULT_INCONSISTENT_EOL and CODING_RESULT_INSUFFICIENT_MEM.
      (toplevel): Remove unused CODING_MODE_INHIBIT_INCONSISTENT_EOL.
      (CODING_MODE_LAST_BLOCK, CODING_MODE_SELECTIVE_DISPLAY)
      (CODING_MODE_DIRECTION, CODING_MODE_FIXED_DESTINATION)
      (CODING_MODE_SAFE_ENCODING): Rearrange bit values.
      (decode_coding_region, encode_coding_region, decode_coding_string):
      Remove unused compatibility macros.
      * coding.c (Qinconsistent_eol, Qinsufficient_memory): Remove.
      (record_conversion_result): Adjust user.
      (syms_of_coding): Likewise.
      (ALLOC_CONVERSION_WORK_AREA): Use SAFE_ALLOCA.
      (decode_coding, encode_coding): Add USE_SAFE_ALLOCA and SAFE_FREE.
      (decode_coding_object): Simplify since xrealloc never returns NULL.
      Add eassert.
      1af1a51a
    • Paul Eggert's avatar
      Fix a build failure on OpenBSD 4.x and MirBSD. · 0845a75c
      Paul Eggert authored
      * sysdep.c (list_system_processes): Make it a stub on all BSD_SYSTEM
      hosts, except for DARWIN_OS and FreeBSD where it's been tested.
      
      Fixes: debbugs:13881
      0845a75c
  13. 05 Mar, 2013 1 commit