1. 18 Nov, 2013 3 commits
    • Paul Eggert's avatar
      Improve API of recently-added bool vector functions. · ec2c4ee6
      Paul Eggert authored
      The old API had (bool-vector-count-matches A B)
      and (bool-vector-count-matches-at A B I), which gave the
      misleading impression that the two functions were variants, one
      with a location I.  The new API has (bool-vector-count-population A)
      and (bool-vector-count-consecutive A B I) to make the distinction
      clearer.  The first function no longer has a B argument, since the
      caller can easily determine the number of nils if the length and
      number of ts is known.
      * src/data.c (Fbool_vector_count_population): Rename from
      bool_vector_count_matches, and accept just 1 argument.
      (Fbool_vector_count_consecutive): Rename from
      * test/automated/data-tests.el: Adjust to API changes.
      Fixes: debbugs:15912
    • Paul Eggert's avatar
      Always allocate at least one bits_word per bool vector. · 87d86601
      Paul Eggert authored
      See Daniel Colascione in:
      * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
      * data.c (bool_vector_binop_driver): Rely on this.  Tune.
      * lisp.h (struct Lisp_Bool_vector): Document this.
    • Eli Zaretskii's avatar
      Fix bug #15841 with assertion violations due to newline cache. · 37c790b3
      Eli Zaretskii authored
       src/insdel.c (invalidate_buffer_caches): New function, consolidated
       from part of prepare_to_modify_buffer.
       (insert_from_gap, prepare_to_modify_buffer):
       src/coding.c (code_convert_region, code_convert_string): Call
       src/lisp.h (invalidate_buffer_caches): Add prototype.
  2. 17 Nov, 2013 2 commits
  3. 16 Nov, 2013 2 commits
  4. 15 Nov, 2013 4 commits
  5. 14 Nov, 2013 3 commits
    • Kazuhiro Ito's avatar
      Fix bug #15892 with link failures of the Cygwin w32 build. · c9f63070
      Kazuhiro Ito authored
       src/keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
       for Cygwin w32 build.
       src/xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
       for Cygwin w32 build.
    • Paul Eggert's avatar
      Simplify, port and tune bool vector implementation. · 2cf00efc
      Paul Eggert authored
      * configure.ac (BITSIZEOF_SIZE_T, SIZEOF_SIZE_T): Remove.
      * src/alloc.c (bool_vector_exact_payload_bytes)
      (bool_vector_payload_bytes): Remove.
      (bool_vector_fill): Return its argument.
      * src/alloc.c (bool_vector_fill):
      * src/lread.c (read1):
      * src/print.c (print_object):
      Simplify by using bool_vector_bytes.
      * src/alloc.c (make_uninit_bool_vector):
      New function, broken out from Fmake_bool_vector.
      (Fmake_bool_vector): Use it.  Use tail call.
      (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
      * src/data.c (BITS_PER_ULL): New constant.
      (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
      if long long versions don't exist.
      (shift_right_ull): New function.
      (count_one_bits_word): New function, replacing popcount_bits_word
      macro.  Don't assume that bits_word is no wider than long long.
      (count_one_bits_word, count_trailing_zero_bits):
      Don't assume that bits_word is no wider than long long.
      * src/data.c (bool_vector_binop_driver, bool_vector_not):
      * src/fns.c (Fcopy_sequence):
      * src/lread.c (read1):
      Create an uninitialized destination, to avoid needless work.
      (internal_equal): Simplify.
      (Ffillarray): Prefer tail call.
      * src/data.c (bool_vector_binop_driver): Don't assume bit vectors always
      contain at least one word.
      (bits_word_to_host_endian): Prefer if to #if.  Don't assume
      chars are narrower than ints.
      * src/data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
      * src/fns.c (Fcopy_sequence):
      Simplify and tune.
      * src/lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
      Don't try to port to hosts where bits_word values have holes; the
      code wouldn't work there anyway.  Verify this assumption, though.
      (bool_vector_bytes): New function.
      (make_uninit_bool_vector): New decl.
      (bool_vector_fill): Now returns Lisp_Object.
    • Paul Eggert's avatar
      Prefer tail calls. · d672ac3c
      Paul Eggert authored
      * lib-src/ebrowse.c (xstrdup):
      * lib-src/etags.c (savenstr):
      * lwlib/lwlib.c (safe_strdup):
      * src/xfns.c (xic_create_fontsetname):
      * src/xrdb.c (gethomedir): Prefer tail calls.
      * lib-src/etags.c (concat): Omit unnecessary assignment.
  6. 12 Nov, 2013 3 commits
  7. 11 Nov, 2013 3 commits
  8. 09 Nov, 2013 3 commits
  9. 08 Nov, 2013 4 commits
    • Jan Djärv's avatar
      * lisp/faces.el (describe-face): Add distant-foreground. · 5b97b4c0
      Jan Djärv authored
      * src/xfaces.c (lface_fully_specified_p): Let distant-foreground be
      (realize_default_face): Remove assignment to distant-foreground if
      Fixes: debbugs:15815
    • Paul Eggert's avatar
      Merge from gnulib. · 220a304a
      Paul Eggert authored
      This incorporates:
      2013-11-08 extern-inline: port better to OS X 10.9
      2013-11-08 fpending: fix regression on DragonFly BSD
      * lib/fpending.h, m4/extern-inline.m4, m4/fpending.m4:
      Update from gnulib.
    • 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
       src/buffer.h (bset_cache_long_scans): New INLINE function, moved
       from buffer.c.  Improve commentary to the buffer field setter
       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.
    • Paul Eggert's avatar
      * chartab.c (make_sub_char_table): Fix size typo. · 7f1913b2
      Paul Eggert authored
      This bug was introduced in my 2013-06-21 change, and caused
      struct Lisp_Sub_Char_Table objects to be given too many slots,
      which broke 'make -C admin/unidata'.
      Fixes: debbugs:15825
  10. 07 Nov, 2013 2 commits
    • Jan Djärv's avatar
      Import macfont changes from mac-port 4.5. · 5ee29210
      Jan Djärv authored
      * macfont.h (kCTVersionNumber10_9): Define if not defined.
      * macfont.m (mac_font_copy_default_descriptors_for_language)
      (mac_font_copy_default_name_for_charset_and_languages): Declare.
      (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
      (macfont_language_default_font_names): New.
      (macfont_list): Rearrange language/charset code.
      (macfont_close): Don't check for macfont_info->cache.
      (mac_ctfont_create_preferred_family_for_attributes): New font
      selection code, call
      (mac_font_copy_default_name_for_charset_and_languages): New functions.
    • Paul Eggert's avatar
      Port to C11 aligned_alloc, and fix some integer overflows. · aea07e2c
      Paul Eggert authored
      * configure.ac (GMALLOC_OBJ): Initialize to empty if !system_malloc
      and doug_lea_malloc.
      (aligned_alloc): Test for existence if !GMALLOC_OBJ and not darwin.
      (posix_memalign): Test for existence only if !GMALLOC_OBJ and
      not darwin and !aligned_alloc.
      * src/alloc.c (USE_ALIGNED_ALLOC): New symbol.
      (USE_POSIX_MEMALIGN): Remove.  All uses replaced with USE_ALIGNED_ALLOC,
      and use of posix_memalign replaced with aligned_alloc.
      (aligned_alloc): New function, defined or declared as needed.
      * src/conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
      Don't undef; configure.ac now does this.
      * src/gmalloc.c (aligned_alloc) [MSDOS]: New decl.
      (calloc, aligned_alloc): Check for integer overflow.
      (aligned_alloc): Rename from memalign.  All uses changed.
      (memalign): New function, an alias for aligned_alloc.
  11. 06 Nov, 2013 6 commits
  12. 05 Nov, 2013 5 commits