1. 23 Apr, 2019 5 commits
    • Alan Mackenzie's avatar
      Optimize for typing characters into long C++ raw strings. · 0d5caa9a
      Alan Mackenzie authored
      * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
      (c-font-lock-objc-methods) (c-font-lock-declarations, c-font-lock-enum-tail)
      (c-font-lock-cut-off-declarators, c-font-lock-enclosing-decls): If the chunk
      been fontified consists entirely of comments and strings, don't attempt to
      perform the function's action.
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't
      expand (c-new-BEG c-new-END) unnecessarily to the entire raw string being
      (c-fl-decl-start, c-fl-decl-end): When in a (raw or otherwise) string, don't
      return a position outside of the string (which used to cause unneeded
    • YAMAMOTO Mitsuharu's avatar
      Release xft_data in widget destroy callback to avoid visual distraction · 085929ca
      YAMAMOTO Mitsuharu authored
      * lwlib/lwlib-int.h (struct _widget_instance) [HAVE_XFT]: Remove nr_xft_data.
      * lwlib/lwlib-Xaw.c (find_xft_data, xaw_update_one_widget) [HAVE_XFT]: Loop
      while widget member is not NULL instead of using nr_xft_data.
      (xaw_destroy_instance) [HAVE_XFT]: Move xft_data release code from here ...
      (destroy_xft_data) [HAVE_XFT]: ... to here.
      (make_dialog) [HAVE_XFT]: Add destroy_xft_data as destroy callback for dialog.
    • Paul Eggert's avatar
      Let plain ‘make’ work even not GNU Make · 6fa8d3c8
      Paul Eggert authored
      * Makefile.in (top_distclean): Clean makefile as well as Makefile.
      * configure.ac: If not using plain ‘make’, create a makefile
      so that plain ‘make’ simply calls $(MAKE).
    • Paul Eggert's avatar
      Revert Vinternal_interpreter_environment tweak · 7cc66173
      Paul Eggert authored
      Stefan Monnier pointed out examples like (funcall `(closure
      ,(let ((cycle (list nil))) (setcdr cycle cycle)) () a)),
      where the user can set Vinternal_interpreter_environment
      * src/eval.c (Fsetq): Revert recent change, going back to Fassq.
    • Paul Eggert's avatar
      Improve UBSan discussion in etc/DEBUG · 27540be5
      Paul Eggert authored
      * etc/DEBUG: Improve -gdwarf-N documentation.
      Go into more detail about UndefinedBehaviorSanitizer.
  2. 22 Apr, 2019 23 commits
    • Paul Eggert's avatar
      Tweak Vinternal_interpreter_environment lookup · b8e7be28
      Paul Eggert authored
      * src/eval.c (Fsetq, eval_sub): Use assq_no_quit instead
      of Fassq for a list that cannot contain cycles or be that long.
    • Paul Eggert's avatar
      Improve wur coverage on older GCCs · 88824197
      Paul Eggert authored
      * src/conf_post.h (__has_attribute_warn_unused_result):
      New macro for compilers lacking __has_attribute.
      * src/systhread.h (__has_attribute): Remove ineffective define.
      (ATTRIBUTE_WARN_UNUSED_RESULT): Work better on GCC 3.4 thru 4.
    • Paul Eggert's avatar
      Go back to old way of checking json int range · 4bf3c949
      Paul Eggert authored
      Although the lisp.h macros really need improvement,
      INTEGER_TO_INT is not the right way to go about it, as it
      causes conversion from intmax_t to uintmax_t and back again,
      which can cause a signal if the value is negative.
      * src/lisp.h (INTEGER_TO_INT, ranged_integer_to_int)
      (ranged_integer_to_uint): Remove, reverting recent changes to
      this file.
      * src/json.c (lisp_to_json): Revert to previous code,
      as the change messes up with uintmax_t<->intmax_t conversion.
    • Philipp Stephani's avatar
      * src/lisp.h (INTEGER_TO_INT): Fix bug. · 981470e3
      Philipp Stephani authored
    • Mattias Engdegård's avatar
      Precise handling of filenotify `stopped' events · 11e75b03
      Mattias Engdegård authored
      * lisp/autorevert.el (auto-revert-notify-handler):
      When getting a `stopped' event, deal with it for the buffers it applies to,
      rather than for all buffers in auto-revert mode.
    • Mattias Engdegård's avatar
    • Mattias Engdegård's avatar
      Revert "Don't remove notify descriptor that is already gone" · 87d1dc19
      Mattias Engdegård authored
      This reverts commit e9e807e9,
      which is no longer necessary as `file-notify-rm-watch' has been
      made robust against reentry.
    • Mattias Engdegård's avatar
      Make file-notify-rm-watch robust against reentry · c243aabf
      Mattias Engdegård authored
      Allow file-notify callbacks to call `file-notify-rm-watch', harmlessly,
      after receiving a `stopped' event without triggering recursion.
      * lisp/filenotify.el (file-notify--watch): Note that `callback' can be nil.
      (file-notify--rm-descriptor): Set the `callback' field to nil before
      sending `stopped'.
      (file-notify-rm-watch): Don't do anything if the `callback' field is nil.
    • Philipp Stephani's avatar
      Introduce a helper macro to convert a Lisp integer to a C integer. · 4e2ea400
      Philipp Stephani authored
      This is similar to CONS_TO_INTEGER.  The inverse (INT_TO_INTEGER)
      already exists.
      * src/lisp.h (INTEGER_TO_INT): New macro.
      (ranged_integer_to_int, ranged_integer_to_uint): New
      * src/json.c (lisp_to_json): Use helper macro.
    • Philipp Stephani's avatar
      Improve documentation around standard error pipes (Bug#35328). · 3b4e312c
      Philipp Stephani authored
      * doc/lispref/processes.texi (Asynchronous Processes): Document
      existence and properties of the standard error process.
      (Accepting Output): Document that one has to accept output from the
      standard error process separately.
    • Philipp Stephani's avatar
      Module API: Don’t require null-terminated strings in make_string. · f9659e64
      Philipp Stephani authored
      * emacs-module.c (module_make_string): Use make_unibyte_string, which
      doesn’t require its argument to be null-terminated.  Since it always
      returns a heap-allocated string, we don’t have to copy it any more
      while decoding.
      (module_decode): New helper function.
    • Philipp Stephani's avatar
      Use utf-8-unix for coding system conversions in the module API. · ca3ad974
      Philipp Stephani authored
      Factor out conversions into helper functions to provide a simpler
      * src/emacs-module.c (module_encode, module_decode_copy): New helper
      (module_make_function, module_copy_string_contents)
      (module_make_string): Use them.
    • Basil L. Contovounesios's avatar
      Improve pure and side-effect-free docs · 4430a9b5
      Basil L. Contovounesios authored
      For discussion, see thread starting at:
      * doc/lispref/customize.texi (Composite Types): Do not overspecify
      :match-alternatives predicates.
      * doc/lispref/eval.texi (Intro Eval): Anchor definition of "side
      effect" for cross-referencing...
      * doc/lispref/functions.texi (What Is a Function): ...from here.
      Define what a pure function is.
      * doc/lispref/internals.texi (Writing Emacs Primitives): Describe
      currently preferred approach to marking primitives as pure and
      * doc/lispref/symbols.texi (Standard Properties): Expand description
      of pure and side-effect-free properties.
    • Philipp Stephani's avatar
      Refactoring: Inline a few macros. · a2a51b4e
      Philipp Stephani authored
      Now that CATCHER_ALL catches signals as well, we can simplify
      * src/emacs-module.c (MODULE_SETJMP, MODULE_SETJMP_1): Remove.
    • Eli Zaretskii's avatar
    • Michael Albinus's avatar
      Some changes in tramp-tests · 02894982
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
      Check for backward compatibility.
      (tramp-test33-environment-variables): Apply a better check for
      unset variable.
    • Paul Eggert's avatar
      Mention AddressSanitizer etc. in etc/DEBUG · b20d8a93
      Paul Eggert authored
      * etc/DEBUG: Modernize for AddressSanitizer etc.
      * etc/NEWS: Defer to etc/DEBUG for this.
    • Paul Eggert's avatar
      Remove --enable-checking=xmallocoverrun · 1ea048f6
      Paul Eggert authored
      It doesn’t work anymore, and these days ‘gcc -fsanitize=address’
      does a better job anyway.
      * configure.ac: Remove the option.
      * configure.ac (ac_xmalloc_overrun, XMALLOC_OVERRUN_CHECK):
      (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer)
      (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
      (overrun_check_realloc, overrun_check_free):
      Remove.  All uses removed.
      * etc/NEWS: Mention this.
    • Paul Eggert's avatar
      Remove --enablechecking=conslist configure option · 72067661
      Paul Eggert authored
      * configure.ac: Remove the option.
      * configure.ac (ac_gc_check_cons_list, GC_CHECK_CONS_LIST):
      * src/alloc.c (check_cons_list) [GC_CHECK_CONS_LIST]:
      * src/lisp.h (lisp_h_check_cons_list, check_cons_list):
      Remove.  All uses removed.
      * etc/NEWS: Mention this.
    • Paul Eggert's avatar
      Simplify XPNTR · 418400ab
      Paul Eggert authored
      it can be simplified.
      * src/alloc.c (macro_PNTR_ADD, PNTR_ADD, macro_XPNTR): Remove.
      (XPNTR): Open-code rather than using the removed macros and
      functions.  Also, simplify by using LISP_WORD_TAG.
    • Paul Eggert's avatar
      Fix drain_reloc_list alignment bug · e85bff0b
      Paul Eggert authored
      * src/pdumper.c (dump_charset): Use alignof (struct charset),
      not alignof (int), since struct charset might be more strictly
      aligned than int.  I think this is just a minor performance
      issue, but we might as well use the correct alignment.
      (drain_reloc_list): Use an alignment instead of a size for the
      output alignment.  This prevents undefined behavior when
      alignof (struct emacs_reloc) == 8 and sizeof (dump_off) == 4
      when building on x86-64 with gcc -fsanitize=undefined.
    • Paul Eggert's avatar
      Port dump_bitset_clear to -fsanitize=undefined · 4a5ed6b0
      Paul Eggert authored
      * src/pdumper.c (dump_bitset_clear):
      Pacify -fsanitize=undefined by avoiding memset (NULL, x, 0),
      which strictly speaking has undefined behavior although it
      works on all production platforms I know.
    • Paul Eggert's avatar
      Port to recent gcc -fsanitize=undefined · f67bc3f1
      Paul Eggert authored
      * src/alloc.c (XPNTR): Add ATTRIBUTE_NO_SANITIZE_UNDEFINED and
      remove ATTRIBUTE_UNUSED.  Do not define as a macro, so that
      * src/lisp.h (lisp_h_XSYMBOL): Remove.  All uses removed.
      With recent GCC the macro does not work with -fsanitize=undefined,
      and the macro can be omitted as its only function is to optimize -O0.
  3. 21 Apr, 2019 12 commits