1. 04 Sep, 2019 7 commits
    • Michael Albinus's avatar
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      Prefer functions to macros in buffer.h · d84b4f83
      Paul Eggert authored
      In buffer.h, prefer inline functions to function-like macros
      when either will do.  This helps avoid confusion about how
      many times an arg is evaluated.  On my platform, this patch
      improves performance of ‘make compile-always’ by 5.7%.
      Also, prefer enum constants to object-like macros
      when either will do.
      * src/buffer.h (BEG, BEG_BYTE, GAP_BYTES_DFL, GAP_BYTES_MIN)
      (MAX_PER_BUFFER_VARS, NONEXISTENT_MODTIME_NSECS)
      (UNKNOWN_MODTIME_NSECS, BUFFER_LISP_SIZE, BUFFER_REST_SIZE):
      Now enum constants, instead of macros.
      (BUFFER_CEILING_OF, BUFFER_FLOOR_OF, BUF_BEG, BUF_BEG_BYTE)
      (BUF_BEGV, BUF_BEGV_BYTE, BUF_PT, BUF_PT_BYTE, BUF_ZV)
      (BUF_ZV_BYTE, BUF_GPT_ADDR, BUF_Z_ADDR, BUF_GAP_END_ADDR)
      (BUF_COMPUTE_UNCHANGED, SET_PT, TEMP_SET_PT, SET_PT_BOTH)
      (TEMP_SET_PT_BOTH, BUF_TEMP_SET_PT, SET_BUF_BEGV, SET_BUF_ZV)
      (SET_BUF_BEGV_BOTH, SET_BUF_ZV_BOTH, SET_BUF_PT_BOTH)
      (BYTE_POS_ADDR, CHAR_POS_ADDR, CHAR_TO_BYTE, BYTE_TO_CHAR)
      (PTR_BYTE_POS, FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE)
      (BUF_BYTE_ADDRESS, BUF_CHAR_ADDRESS, BUF_PTR_BYTE_POS)
      (BUF_FETCH_CHAR, BUF_FETCH_CHAR_AS_MULTIBYTE, BUF_FETCH_BYTE)
      (BUFFER_PVEC_INIT, BUFFER_LIVE_P, BUFFER_HIDDEN_P)
      (BUFFER_CHECK_INDIRECTION, OVERLAY_POSITION, PER_BUFFER_VALUE_P)
      (SET_PER_BUFFER_VALUE_P, PER_BUFFER_IDX):
      Now inline functions instead of macros.
      d84b4f83
    • Paul Eggert's avatar
      bbe45091
    • Paul Eggert's avatar
      Take last_per_buffer_idx private · 97cfda26
      Paul Eggert authored
      This will simplify future changes.  Turn the runtime check
      into an eassert, since it’s not needed in production.
      * src/buffer.c (last_per_buffer_idx): Now static.
      (valid_per_buffer_idx): New function.
      * src/buffer.h (PER_BUFFER_VALUE_P, SET_PER_BUFFER_VALUE_P): Use it.
      97cfda26
    • Paul Eggert's avatar
      Avoid macros in pdumper.c when it’s easy · 9117a667
      Paul Eggert authored
      Problem with DUMP_SET_REFERRER mentioned by Pip Cet at end of:
      https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00548.html
      * src/pdumper.c (DANGEROUS, EMACS_RELOC_TYPE_BITS)
      (EMACS_RELOC_LENGTH_BITS, DUMP_RELOC_TYPE_BITS)
      (DUMP_RELOC_ALIGNMENT_BITS, DUMP_RELOC_OFFSET_BITS)
      (DUMP_RELOCATION_ALIGNMENT, DUMP_ALIGNMENT)
      (WEIGHT_NONE, WEIGHT_NORMAL, WEIGHT_STRONG)
      (PDUMPER_MAX_OBJECT_SIZE):
      Now a constant, not a macro.
      (divide_round_up): Now a function, not a macro DIVIDE_ROUND_UP.
      All uses changed.
      (enum link_weight_enum, WEIGHT_NONE_VALUE)
      (WEIGHT_NORMAL_VALUE, WEIGHT_STRONG_VALUE): Remove.
      (struct link_weight): Just use an int.
      (dump_set_referrer): New function, replacing DUMP_SET_REFERRER
      macro with a different API.  All uses changed.
      (dump_clear_referrer): Rename from DUMP_CLEAR_REFERRER.
      All uses changed.
      (DEFINE_FROMLISP_FUNC, DEFINE_TOLISP_FUNC): Remove.
      (intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp)
      (dump_off_to_lisp): Define without using macros,
      (dump_off_from_lisp): Add an eassert range check.
      (DUMP_FIELD_COPY): Simplify.
      9117a667
    • Paul Eggert's avatar
      Avoid casting -1 to possibly-unsigned enum · d2065566
      Paul Eggert authored
      * src/alloc.c (mark_maybe_pointer):
      * src/pdumper.h (pdumper_object_p_precise):
      Use pdumper_valid_object_type_p.
      * src/pdumper.c (pdumper_find_object_type_impl):
      * src/pdumper.h (pdumper_find_object_type):
      Return int, not enum Lisp_Type.  All callers changed.
      * src/pdumper.h (PDUMPER_NO_OBJECT): Do not cast -1 to enum
      Lisp_Type; in theory, C18 says this could yield 7, which would
      mean PDUMPER_NO_OBJECT == Lisp_Float (!).
      (pdumper_valid_object_type_p): New function.
      d2065566
  2. 03 Sep, 2019 4 commits
    • Daniel Colascione's avatar
      Run tramp cleanup in correct buffer · 5f089ac9
      Daniel Colascione authored
      Fixes bug #37297.
      
      * lisp/net/tramp.el (tramp-process-sentinel): Do process-end cleanup
      in the tramp buffer, not a random file buffer.
      5f089ac9
    • Paul Eggert's avatar
      Sync consing_until_gc with gc-cons-threshold · 97ffa339
      Paul Eggert authored
      Add watchers for gc-cons-threshold and gc-cons-percentage
      that update consing_until_gc accordingly.
      Suggested by Eli Zaretskii (Bug#37006#52).
      * src/alloc.c (consing_threshold, bump_consing_until_gc)
      (watch_gc_cons_threshold, watch_gc_cons_percentage):
      New functions.
      (garbage_collect_1): Use consing_threshold.
      (syms_of_alloc): Arrange to watch gc-cons-threshold and
      gc-cons-percentage.
      97ffa339
    • Alan Mackenzie's avatar
      Use left margin to hold "=>" to indicate current error in fringeless windows · c34dbd80
      Alan Mackenzie authored
      This applies to compilation-mode.  It amends the fix for bug #36832.
      
      * lisp/progmodes/compile.el (compilation-arrow-overlay): renamed from
      overlay-arrow-overlay.
      (compilation-margin-string, compilation--dummy-string): New variables.
      (compilation-set-up-arrow-spec-in-margin)
      (compilation-tear-down-arrow-spec-in-margin): New functions.
      (compilation-set-overlay-arrow): Rewritten to use the new variables/functions.
      c34dbd80
    • Michael Albinus's avatar
      Fix Bug#37202 · ea5d591f
      Michael Albinus authored
      * lisp/shadowfile.el (shadow-debug): New defvar.
      (shadow-read-files): Suppress error if there's no TODO file.
      
      * test/lisp/shadowfile-tests.el (shadow-debug): Set to nil.
      (shadow--tests-cleanup): New defun.  Apply to all tests.  (Bug#37202)
      (shadow-test06-literal-groups): Cleanup temp buffer.
      (shadow-test08-shadow-todo): Add debug messages.
      (top): Cleanup initially.
      ea5d591f
  3. 02 Sep, 2019 4 commits
  4. 01 Sep, 2019 7 commits
  5. 31 Aug, 2019 7 commits
  6. 30 Aug, 2019 6 commits
  7. 29 Aug, 2019 5 commits