1. 08 Mar, 2013 1 commit
    • 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
  2. 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
  3. 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
  4. 05 Mar, 2013 7 commits
  5. 04 Mar, 2013 2 commits
  6. 02 Mar, 2013 7 commits
    • Paul Eggert's avatar
      2db41375
    • Paul Eggert's avatar
      The lock for FILE is now .#FILE or .#-FILE. · b5029e23
      Paul Eggert authored
      The old approach, which fell back on DIR/.#FILE.0 through
      DIR/.#FILE.9, had race conditions that could not be easily fixed.
      If DIR/.#FILE is a non-symlink file, Emacs now does not create a
      lock file for DIR/FILE; that is, DIR/FILE is no longer partly
      protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
      because the locking mechanism was never reliable in that case).
      This patch fixes this and other bugs discovered by a code
      inspection that was prompted by
      <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
      Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
      to avoid interoperability problems between the MS-Windows and
      non-MS-Windows implementations.  MS-Windows and non-MS-Windows
      instances of Emacs now ignore each others' locks.
      * etc/NEWS: Document this.
      * src/filelock.c (defined_WINDOWSNT): New constant.
      (MAKE_LOCK_NAME, fill_in_lock_file_name):
      Don't create DIR/.#FILE.0 through DIR/.#FILE.9.  Instead, create
      DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
      regular files on MS-Windows hosts.
      (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
      Use SAFE_ALLOCA to avoid problems with long file names.
      (MAX_LFINFO): Now a local constant, not a global macro.
      (IS_LOCK_FILE): Remove.
      (lock_file_1): Don't inspect errno if symlink call succeeds;
      that's not portable.
      (lock_file): Document that this function can return if lock
      creation fails.
      
      Fixes: debbugs:13807
      b5029e23
    • Paul Eggert's avatar
      * textprop.c: Use bool for booleans. · 81c23309
      Paul Eggert authored
      (validate_interval_range, Fadd_text_properties)
      (Fremove_text_properties): Prefer bool to int when either works.
      81c23309
    • Eli Zaretskii's avatar
      Protect against changes of interval tree when adding/removing text props. · 18f2ac09
      Eli Zaretskii authored
       src/textprop.c (Fadd_text_properties, Fremove_text_properties): If
       the interval tree changes as a side effect of calling
       modify_region, re-do processing starting from the call to
       validate_interval_range.  (Bug#13743)
      18f2ac09
    • Eli Zaretskii's avatar
      c856b8d4
    • Eli Zaretskii's avatar
      Fix bug #13734 with errors in lisp.h macro expansion. · 474b43d9
      Eli Zaretskii authored
       src/lisp.h (XPNTR) [!USE_LSB_TAG]: Fix parentheses nesting.
      474b43d9
    • Andreas Schwab's avatar
      Fixes: debbugs:13734 · b270d116
      Andreas Schwab authored
      * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren.
      b270d116
  7. 27 Feb, 2013 3 commits
  8. 26 Feb, 2013 2 commits
    • Bastien Guerry's avatar
      3b166f09
    • Paul Eggert's avatar
      Minor textprop integer cleanup. · ecc0fdd4
      Paul Eggert authored
      * intervals.h, textprop.c (add_text_properties_from_list):
      Return void, not int, since nobody uses the return value.
      * textprop.c (validate_plist, add_properties, remove_properties)
      (Fadd_text_properties):
      Don't assume list length fits in int.
      (interval_has_all_properties, interval_has_some_properties)
      (interval_has_some_properties_list, add_properties, remove_properties)
      (Fadd_text_properties, Fremove_text_properties)
      (Fremove_list_of_text_properties, text_property_stickiness):
      Use bool for booleans.
      (Fadd_text_properties, Fremove_text_properties):
      (Fremove_list_of_text_properties):
      Reindent do-while as per GNU style.
      ecc0fdd4
  9. 25 Feb, 2013 4 commits
    • Eli Zaretskii's avatar
      Implement CLASH_DETECTION for MS-Windows. · 343a2aef
      Eli Zaretskii authored
       src/filelock.c [WINDOWSNT]: Include w32.h.
       (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
       function of that name.  Up-case the macro arguments.
       (IS_LOCK_FILE): New macro.
       (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
       (create_lock_file): New function, with body extracted from
       lock_file_1.
       [WINDOWSNT]: Implement lock files by writing a regular file with
       the lock information as its contents.
       (read_lock_data): New function, on Posix platforms just calls
       emacs_readlinkat.
       [WINDOWSNT]: Read the lock info from the file.
       (current_lock_owner): Call read_lock_data instead of calling
       emacs_readlinkat directly.
       (lock_file) [WINDOWSNT]: Run the file name through
       dostounix_filename.
       src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case
       just check if the process by that PID exists.
       src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
       also present, as doing so will fail to error out if the file
       already exists.
       src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
      
       nt/inc/ms-w32.h (BOOT_TIME_FILE): Define.
       nt/config.nt (CLASH_DETECTION): Define to 1.
      
       lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files
       that match "\`\.#", to avoid compiling lock files, even if they
       are readable (as they are on MS-Windows).
      
       doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the
       exclusive means of locking files.
      
       etc/NEWS: Mention support for lock files on MS-Windows.
      343a2aef
    • Eli Zaretskii's avatar
      Fix bug #13743 with crashes due to recursive add-text-properties. · 0248b0d7
      Eli Zaretskii authored
       src/textprop.c (Fadd_text_properties, Fremove_text_properties)
       (Fremove_list_of_text_properties): Skip all of the intervals in
       the region between START and END that already have resp. don't
       have the requested properties, not just the first one.  Add
       assertions that the loop afterwards always modifies the
       properties.
      0248b0d7
    • Stefan Monnier's avatar
      * src/callint.c (Fcall_interactively): Use the right lexical environment · b5071fc7
      Stefan Monnier authored
      for `interactive' specs.
      * src/eval.c (Feval): Accept a lexical environment.
      
      Fixes: debbugs:13811
      b5071fc7
    • Paul Eggert's avatar
      Simplify data_start configuration. · 1ddc2bd6
      Paul Eggert authored
      This is a followon simplification to the fix for Bug#13650.
      * admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
      * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
      (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
      (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
      not always needed.
      (HAVE_DATA_START): New macro.
      * etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
      Remove legacy-systems section, as this stuff is no longer
      applicable with current linking strategies.
      * src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
      (START_FILES): Remove.  All uses removed.
      (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
      (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
      (buildobj.h): Use it.
      ($(ALLOBJS)): Depend on globals.h.
      (temacs$(EXEEXT)): Use $(ALLOBJS).
      * src/autodeps.mk (ALLOBJS): Move to Makefile.in.
      * src/deps.mk (vm-limit.o):
      * src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
      Do not depend on mem-limits.h.
      * src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
      (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
      [__GNUC__ && !ORDINARY_LINK]: Remove.
      * src/mem-limits.h, src/pre-crt0.c: Remove.
      * src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
      * src/unexcoff.c (etext): New decl.
      (make_hdr): Use it instead of start_of_data.
      * src/vm-limit.c: Move most of mem-limits.h's contents here.
      (data_start): New decl.  It's OK if this is approximate,
      so simplify-away some unnecessary exactness.
      (POINTER): Remove; all uses removed.
      (data_space_start): Now char *, to avoid casts.
      (exceeds_lisp_ptr): New function, replacing the old
      EXCEEDS_LISP_PTR macro.  All uses changed.
      (check_memory_limits): Simplify and remove casts.
      (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
      (memory_warnings): Use data_start instead of start_of_data.
      
      Fixes: debbugs:13783
      1ddc2bd6
  10. 24 Feb, 2013 2 commits
  11. 22 Feb, 2013 2 commits
    • Paul Eggert's avatar
      Assume C89 or better. · fcee5028
      Paul Eggert authored
      * ralloc.c (SIZE, POINTER, NIL):
      * vm-limit.c (POINTER):
      Remove, replacing all uses with C89 equivalents.  These old
      symbols were present only for porting to pre-C89 platforms.
      fcee5028
    • Claudio Bley's avatar
      Don't call 'select' from emacs_gnutls_pull. · d78cf5ed
      Claudio Bley authored
       src/w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop.
       This avoids warning messages reported as part of Bug#13546.
      d78cf5ed
  12. 21 Feb, 2013 1 commit
  13. 20 Feb, 2013 1 commit