1. 26 Jul, 2020 3 commits
    • Philipp Stephani's avatar
      Add another test for global module references · 73a2f510
      Philipp Stephani authored
      * test/src/emacs-module-tests.el (mod-test-globref-reordered): New
      unit test.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_globref_reordered): New
      test module function.
      (emacs_module_init): Export it.
      73a2f510
    • Philipp Stephani's avatar
      Backport: add another test case for module assertions. · 3838aeb7
      Philipp Stephani authored
      This backports commit 9f01ce63 from master.  Since the bug isn’t
      present on emacs-27, just backport the new test case.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_globref_invalid_free):
      New test module function.
      (emacs_module_init): Export it.
      
      * test/src/emacs-module-tests.el
      (module--test-assertions--globref-invalid-free): New unit test.
      3838aeb7
    • Philipp Stephani's avatar
      Backport: Add module test for edge case. · bde5f5f8
      Philipp Stephani authored
      This backports commit 6355a3ec from master.  Since the bug isn’t
      present in emacs-27, just backport the test case.
      
      * test/data/emacs-module/mod-test.c
      (Fmod_test_invalid_store_copy): New test module function.
      (emacs_module_init): Export it.
      
      * test/src/emacs-module-tests.el
      (module--test-assertions--load-non-live-object-with-global-copy):
      New unit test.
      bde5f5f8
  2. 25 Jul, 2020 2 commits
    • Philipp Stephani's avatar
      Make checking for liveness of global values more precise. · 9f01ce63
      Philipp Stephani authored
      We can't just use a hash lookup because a global and a local reference
      might refer to the same Lisp object.
      
      * src/emacs-module.c (module_free_global_ref): More precise check for
      global liveness.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_globref_invalid_free):
      New test module function.
      (emacs_module_init): Export it.
      
      * test/src/emacs-module-tests.el
      (module--test-assertions--globref-invalid-free): New unit test.
      9f01ce63
    • Philipp Stephani's avatar
      Fix subtle bug when checking liveness of module values. · 6355a3ec
      Philipp Stephani authored
      We can't simply look up the Lisp object in the global reference table
      because an invalid local and a valid global reference might refer to
      the same object.  Instead, we have to test the address of the global
      reference against the stored references.
      
      * src/emacs-module.c (module_global_reference_p): New helper function.
      (value_to_lisp): Use it.
      
      * test/data/emacs-module/mod-test.c
      (Fmod_test_invalid_store_copy): New test module function.
      (emacs_module_init): Export it.
      
      * test/src/emacs-module-tests.el
      (module--test-assertions--load-non-live-object-with-global-copy):
      New unit test.
      6355a3ec
  3. 09 Jul, 2020 1 commit
    • Paul Eggert's avatar
      Use Gnulib libgmp module · c8b6006d
      Paul Eggert authored
      Instead of doing GMP by hand, use the Gnulib libgmp module.
      * .gitignore: Add lib/gmp.h.
      * admin/merge-gnulib (GNULIB_MODULES): Add libgmp.
      * configure.ac (GMP_LIB, GMP_OBJ): Remove.  Gnulib uses the name
      LIB_GMP, so all uses changed.  All uses of GMP_OBJ removed.
      (HAVE_GMP): Set this from Gnulib’s variables.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/mini-gmp-gnulib.c, lib/mini-gmp.c, lib/mini-gmp.h, m4/libgmp.m4:
      New files, copied from Gnulib.
      * src/bignum.h, test/data/emacs-module/mod-test.c:
      Include gmp.h unconditionally.
      * src/mini-gmp-emacs.c, src/mini-gmp.c, src/mini-gmp.h:
      Remove.  This moves these files from src to lib, and
      updates them to the current GMP version.
      * test/Makefile.in (GMP_H): New macro.
      ($(test_module)): Use it to decide whether to compile
      mini-gmp-gnulib.c too.
      c8b6006d
  4. 27 Mar, 2020 1 commit
    • Eli Zaretskii's avatar
      Port the 'module/async-pipe' test to MS-Windows · f98ee21c
      Eli Zaretskii authored
      These changes let the code compile and produce a valid DLL, but the
      test hangs.  It looks like the hang is in Fdelete_process, when it
      closes one of the descriptors of the pipe process.
      In addition, this use of the pipe process cannot currently work
      on MS-Windows, since make-pipe-process doesn't set up the reader
      thread to read from the Emacs's side of the pipe, so the select
      emulation doesn't know there's stuff to read from that pipe.
      * test/data/emacs-module/mod-test.c [WINDOWSNT]: Include
      windows.h.
      (ALIGN_STACK) [!__x86_64__]: Define for 32-bit builds.
      (sleep_for_half_second): New function.
      (write_to_pipe): Declare return type differently for WINDOWSNT.
      Call sleep_for_half_second.
      (Fmod_test_async_pipe) [WINDOWSNT]: Use _beginthread as substitute
      for pthread_create.
      (invalid_finalizer): Replace non_ASCII character in a comment.
      
      * test/src/emacs-module-tests.el (module/async-pipe): Skip on
      MS-Windows, as the test fails and then hangs.
      f98ee21c
  5. 26 Mar, 2020 1 commit
    • Philipp Stephani's avatar
      Add a module function to open a file descriptor connected to a pipe. · d28b0047
      Philipp Stephani authored
      A common complaint about the module API is that modules can't
      communicate asynchronously with Emacs.  While it isn't possible to
      call arbitrary Emacs functions asynchronously, writing to a pipe
      should always be fine and is a pretty low-hanging fruit.
      
      This patch implements a function that adapts an existing pipe
      process.  That way, users can use familiar tools like process filters
      or 'accept-process-output'.
      
      * src/module-env-28.h: Add 'open_channel' module function.
      
      * src/emacs-module.c (module_open_channel): Provide definition for
      'open_channel'.
      (initialize_environment): Use it.
      
      * src/process.c (open_channel_for_module): New helper function.
      (syms_of_process): Define necessary symbol.
      
      * test/src/emacs-module-tests.el (module/async-pipe): New unit test.
      
      * test/data/emacs-module/mod-test.c (signal_system_error): New helper
      function.
      (signal_errno): Use it.
      (write_to_pipe): New function running in the background.
      (Fmod_test_async_pipe): New test module function.
      (emacs_module_init): Export it.
      
      * doc/lispref/internals.texi (Module Misc): Document new module
      function.
      
      * doc/lispref/processes.texi (Asynchronous Processes): New anchor
      for pipe processes.
      
      * etc/NEWS: Document 'open_channel' function.
      d28b0047
  6. 19 Mar, 2020 2 commits
  7. 05 Jan, 2020 1 commit
    • Philipp Stephani's avatar
      Also print function data when printing module functions. · fc92c2d8
      Philipp Stephani authored
      This is especially useful in cases where modules only use a single
      entry point and use the data to dispatch to the actual function.  Such
      a design is common for languages such as Go and C++.
      
      * src/emacs-module.c (module_function_data): New function.
      
      * src/print.c (print_vectorlike): Use it to print module function data
      if not NULL.
      (print_object): Adapt size of buffer.
      
      * test/data/emacs-module/mod-test.c (emacs_module_init): Pass some
      non-NULL data to ‘mod-test-sum’.
      (Fmod_test_sum): Check that correct data is passed through.
      
      * test/src/emacs-module-tests.el (mod-test-sum-test)
      (module-function-object): Adapt unit tests.
      fc92c2d8
  8. 03 Jan, 2020 1 commit
    • Philipp Stephani's avatar
      Implement finalizers for module functions (Bug#30373) · 48ffef5e
      Philipp Stephani authored
      * src/module-env-28.h: Add new module environment functions to
      module environment for Emacs 28.
      
      * src/emacs-module.h.in: Document that 'emacs_finalizer' also works
      for function finalizers.
      
      * src/emacs-module.c (CHECK_MODULE_FUNCTION): New function.
      (struct Lisp_Module_Function): Add finalizer data member.
      (module_make_function): Initialize finalizer.
      (module_get_function_finalizer)
      (module_set_function_finalizer): New module environment functions.
      (module_finalize_function): New function.
      (initialize_environment): Initialize new environment functions.
      
      * src/alloc.c (cleanup_vector): Call potential module function
      finalizer during garbage collection.
      
      * test/data/emacs-module/mod-test.c (signal_error): New helper
      function.
      (memory_full): Use it.
      (finalizer): New example function finalizer.
      (Fmod_test_make_function_with_finalizer)
      (Fmod_test_function_finalizer_calls): New test module functions.
      (emacs_module_init): Define them.
      
      * test/src/emacs-module-tests.el (module/function-finalizer): New unit
      test.
      
      * doc/lispref/internals.texi (Module Functions): Document new
      functionality.
      (Module Misc): Move description of 'emacs_finalizer' type to 'Module
      Functions' node, and add a reference to it.
      
      * etc/NEWS: Mention new functionality.
      48ffef5e
  9. 01 Jan, 2020 1 commit
  10. 10 Dec, 2019 2 commits
    • Dmitry Gutov's avatar
      Rename faces used in faces-tests.el · ac1b6e97
      Dmitry Gutov authored
      * test/data/themes/faces-test-light-theme.el:
      * test/data/themes/faces-test-dark-theme.el: Update accordingly.
      
      * test/lisp/faces-tests.el (faces--test-extend-with-themes):
      Don't use the diff-mode faces.  Rename the definitions.
      ac1b6e97
    • Dmitry Gutov's avatar
      Make ':extend' inherited from default spec unless overridden · 58fb4c3e
      Dmitry Gutov authored
      * lisp/faces.el (face-spec-recalc): Handle the :extend attribute
      specially and always inherit it from the default spec unless
      overwritten in a theme (bug#37774).
      
      * test/lisp/faces-tests.el (faces--test-data-dir): New variable.
      (faces--test-extend-with-themes): Use test themes instead of ones
      from etc/themes.  Update expected values.
      
      * test/data/themes/faces-test-dark-theme.el: New file.
      
      * test/data/themes/faces-test-light-theme.el: New file.
      
      * doc/lispref/display.texi (Face Attributes):
      Update the description of ':extend'.
      
      * etc/NEWS: Update the entry for ':extend'.
      
      * etc/themes/adwaita-theme.el:
      * etc/themes/deeper-blue-theme.el:
      * etc/themes/dichromacy-theme.el:
      * etc/themes/leuven-theme.el:
      * etc/themes/light-blue-theme.el:
      * etc/themes/manoj-dark-theme.el:
      * etc/themes/misterioso-theme.el:
      * etc/themes/tango-dark-theme.el:
      * etc/themes/tango-theme.el:
      * etc/themes/tsdh-dark-theme.el:
      * etc/themes/tsdh-light-theme.el:
      * etc/themes/wheatgrass-theme.el:
      * etc/themes/wombat-theme.el: Remove the now-redundant ':extend'
      attribute in all the themes.
      58fb4c3e
  11. 05 Dec, 2019 1 commit
    • Eli Zaretskii's avatar
      Fix recent modifications in emacs-module-tests · 85f8aa10
      Eli Zaretskii authored
      * test/data/emacs-module/mod-test.c (extract_big_integer): Fix
      calculation of size of 'magnitude' when 'emacs_limb_t' is wider
      than 'unsigned long'.
      
      * test/src/emacs-module-tests.el
      (module--test-assertions--load-non-live-object)
      (module--test-assertions--call-emacs-from-gc): On MS-Windows,
      check also mod-test-emacs with ".exe" appended, before
      skipping the tests.
      85f8aa10
  12. 04 Dec, 2019 1 commit
    • Philipp Stephani's avatar
      Change module interface to no longer use GMP objects directly. · 096be9c4
      Philipp Stephani authored
      As described in the new comment added to emacs-module.c, using GMP
      directly in the module interface has significant downsides: it couples
      the module interface directly to the implementation and requires
      module authors to link their module against the same GMP library as
      Emacs itself, which is often difficult and an unnecessary burden.  By
      picking a representation for the magnitude that often matches the one
      used by GMP, we can avoid overhead when converting from and to GMP in
      most cases.
      
      Loading the test module in test/data/emacs-module and evaluating
      
      (dotimes (_ 10000)
        (mod-test-double (* 2 most-negative-fixnum)))
      
      under Callgrind shows that on my (GNU/Linux) machine Emacs only spends
      10% of the CPU time of mod-test-double in mpz_import and mpz_export
      combined, even though that function does little else.  (By contrast,
      30% is spent in allocate_pseudovector.)
      
      * src/emacs-module.h.in: Don't check EMACS_MODULE_GMP.  Don't include
      gmp.h.  Remove emacs_mpz structure.  Instead, define type alias
      emacs_limb_t and macro EMACS_LIMB_MAX.
      
      * src/module-env-27.h: Change interface of extract_big_integer and
      make_big_integer to take a sign-magnitude representation instead of
      mpz_t.
      
      * src/emacs-module.c: Don't check EMACS_MODULE_GMP or
      EMACS_MODULE_HAVE_MPZ_T.  Add a comment about the chosen
      implementation.
      (module_extract_big_integer, module_make_big_integer): Reimplement
      without using mpz_t in the interface.
      
      * doc/lispref/internals.texi (Module Values): Adapt function
      documentation and example.  Stop mentioning GMP and EMACS_MODULE_GMP.
      
      * test/data/emacs-module/mod-test.c: Don't define EMACS_MODULE_GMP or
      EMACS_MODULE_HAVE_MPZ_T.
      (memory_full, extract_big_integer, make_big_integer): New helper
      functions, identical to example in the Info documentation.
      (Fmod_test_nanoseconds, Fmod_test_double): Adapt to new interface.
      096be9c4
  13. 26 Nov, 2019 1 commit
  14. 21 Sep, 2019 1 commit
  15. 05 May, 2019 2 commits
    • Paul Eggert's avatar
      Port mod-test to --enable-gcc-warnings · 81487bf8
      Paul Eggert authored
      * test/data/emacs-module/mod-test.c (NDEBUG): Undef, to prevent
      GCC from complaining “error: unused variable ‘dummy’” and failing
      to build the test, if --enable-gcc-warnings.
      81487bf8
    • Eli Zaretskii's avatar
      Fix compilation of mod-test.c on MinGW · 6709240b
      Eli Zaretskii authored
      * test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds)
      [__MINGW32__]: Use _Static_assert, not static_assert, as the
      latter is not available in mingw.org's MinGW's assert.h.
      6709240b
  16. 04 May, 2019 1 commit
    • Philipp Stephani's avatar
      Use extract_time in test module. · e95ecbe1
      Philipp Stephani authored
      * test/data/emacs-module/mod-test.c (Fmod_test_sleep_until): Use
      extract_time for time argument.
      (signal_wrong_type_argument): Remove unused function.
      
      * test/src/emacs-module-tests.el (mod-test-sleep-until): Remove
      unnecessary ‘float-time’.
      e95ecbe1
  17. 28 Apr, 2019 1 commit
    • Philipp Stephani's avatar
      Export major version of latest Emacs supported by emacs-module.h. · 4d97e1a9
      Philipp Stephani authored
      This is useful if module authors want to support multiple versions of
      emacs-module.h.
      
      * configure.ac (emacs_major_version): Define substitution.
      
      * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro.
      
      * doc/lispref/internals.texi (Module Initialization): Document
      EMACS_MAJOR_VERSION preprocessor macro.
      
      * test/data/emacs-module/mod-test.c (emacs_module_init): Verify
      behavior of EMACS_MAJOR_VERSION.
      4d97e1a9
  18. 24 Apr, 2019 4 commits
    • Philipp Stephani's avatar
      Unbreak build when building without GMP support. · 4eb7f9ef
      Philipp Stephani authored
      Add support for a new preprocessor macro EMACS_MODULE_HAVE_MPZ_T to
      emacs-module.h.  If this macro is defined, assume that mpz_t is
      already defined and don’t include gmp.h.
      
      Don’t document the new macro for now, as it’s unclear whether we want
      to support this in modules outside the Emacs tree.
      
      * src/emacs-module.h.in: Allow user to prevent inclusion of gmp.h.
      
      * src/emacs-module.c: Use mini-gmp if GMP is unavailable.  Don’t
      include gmp.h.
      
      * src/lisp.h: Don’t require gmp.h.  It’s not needed for lisp.h.
      
      * test/Makefile.in (GMP_LIB, GMP_OBJ): New variables.
      ($(test_module)): Use them.
      
      * test/data/emacs-module/mod-test.c: Use mini-gmp if GMP is unavailable.
      4eb7f9ef
    • Philipp Stephani's avatar
      Clarify rounding mode when converting to struct timespec. · c4bacb12
      Philipp Stephani authored
      * doc/lispref/internals.texi (Module Values): Clarify that the
      truncation is towards negative infinity.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds): Add test
      function.
      (emacs_module_init): Define it.
      
      * test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
      c4bacb12
    • Philipp Stephani's avatar
      Add module functions to convert from and to big integers. · e290a7d1
      Philipp Stephani authored
      * src/module-env-27.h: Add new module functions to convert big
      integers.
      
      * src/emacs-module.h.in (emacs_mpz): Define if GMP is available.
      
      * src/emacs-module.c (module_extract_big_integer)
      (module_make_big_integer): New functions.
      (initialize_environment): Use them.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_double): New test
      function.
      (emacs_module_init): Define it.
      
      * test/src/emacs-module-tests.el (mod-test-double): New unit test.
      
      * doc/lispref/internals.texi (Module Values): Document new functions.
      e290a7d1
    • Philipp Stephani's avatar
      Add conversions to and from struct timespec to module interface. · bffceab6
      Philipp Stephani authored
      Time values are a fundamental data type, and such conversions are hard
      to implement within modules because of the various forms of time
      values in Emacs Lisp.  Adding dedicated conversion functions can
      significantly simplify module code dealing with times.
      
      This approach uses nanosecond precision.  While Emacs in theory has
      support for higher-precision time values, in practice most languages
      and standards, such as POSIX, C, Java, and Go, have settled on
      nanosecond-precision integers to represent time.
      
      * src/emacs-module.h.in: Add header for struct timespec.
      
      * src/module-env-27.h: Add module functions for time conversion.
      
      * src/emacs-module.c (module_extract_time, module_make_time): New
      functions.
      (initialize_environment): Use them.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New
      test function.
      (emacs_module_init): Define it.
      
      * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid)
      (mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New
      unit tests.
      
      * doc/lispref/internals.texi (Module Values): Document time
      conversion functions.
      bffceab6
  19. 22 Mar, 2019 1 commit
  20. 21 Mar, 2019 2 commits
  21. 24 Feb, 2019 1 commit
    • Philipp Stephani's avatar
      Ignore pending_signals when checking for quits. · 72ec233f
      Philipp Stephani authored
      pending_signals is often set if no quit is pending.  This results in
      bugs in module code if the module returns but no quit is actually
      pending.
      
      As a better alternative, add a new process_input environment function
      for Emacs 27.  That function processes signals (like maybe_quit).
      
      * configure.ac: Add module snippet for Emacs 27.
      
      * src/module-env-27.h: New file.
      
      * src/emacs-module.h.in: Add process_input function to environment
      interface.
      
      * src/emacs-module.c (module_should_quit): Use QUITP macro to check
      whether the caller should quit.
      (module_process_input): New function.
      (initialize_environment): Use it.
      
      * src/eval.c: Remove obsolete comment.
      
      * test/data/emacs-module/mod-test.c (signal_wrong_type_argument)
      (signal_errno): New helper functions.
      (Fmod_test_sleep_until): New test module function.
      
      * test/src/emacs-module-tests.el (mod-test-sleep-until): New unit
      test.
      
      * doc/lispref/internals.texi (Module Misc): Document process_input.
      72ec233f
  22. 22 Feb, 2019 1 commit
    • Nicholas Drozd's avatar
      Handle HTML 'ol' start attribute in shr.el · 8282c34f
      Nicholas Drozd authored
      * lisp/net/shr.el (shr-tag-ol): Don't automatically assume
      1-indexing for all ordered lists, use <ol> if given.
      
      * etc/NEWS: Announce change in shr behavior.
      
      * test/data/shr/ol.html:
      * test/data/shr/ol.txt: New test data files.
      8282c34f
  23. 03 Feb, 2019 1 commit
    • Juri Linkov's avatar
      * lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251) · 4633b0ef
      Juri Linkov authored
      * lisp/tar-mode.el (tar--try-jka-compr): New function copied from
      archive-try-jka-compr.
      
      * lisp/arc-mode.el (archive-try-jka-compr): Set buffer-multibyte to t
      instead of let-binding coding-system-for-read to 'no-conversion.
      
      * test/data/decompress/tg.tar.gz:
      * test/data/decompress/zg.zip: New fixtures.
      
      * test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-gz):
      * test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-gz): New tests.
      
      * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
      (diff-mode-test-font-lock-syntax-one-line): Skip unless shell and
      diff executables are found.
      4633b0ef
  24. 02 Feb, 2019 1 commit
    • Juri Linkov's avatar
      * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test. · 42c83990
      Juri Linkov authored
      (diff-mode-test-font-lock-syntax-one-line): New test for one line.
      
      * test/data/vc/diff-mode/hello_world.c:
      * test/data/vc/diff-mode/hello_world_1.c:
      * test/data/vc/diff-mode/hello_emacs.c:
      * test/data/vc/diff-mode/hello_emacs_1.c: New fixtures.
      
      * lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays
      from diff-syntax-fontify-hunk.  (Bug#33567)
      (diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.
      42c83990
  25. 01 Jan, 2019 1 commit
  26. 25 Aug, 2018 1 commit
    • Sergey Vinokurov's avatar
      Fix detection of freed emacs_values (Bug#32479) · 54fb383a
      Sergey Vinokurov authored
      * src/emacs-module.c (module_free_global_ref): Compare a value to be
      freed with all entries of the list.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_globref_free): New
      function.
      (emacs_module_init): Make it accessible from Lisp.
      * test/src/emacs-module-tests.el (mod-test-globref-free-test): New
      test which uses it.
      54fb383a
  27. 02 Feb, 2018 1 commit
    • Philipp Stephani's avatar
      Use 'defalias' in test module instead of 'fset'. · 75c663f8
      Philipp Stephani authored
      This puts functions defined in the module into the 'load-history'.
      
      * test/data/emacs-module/mod-test.c (bind_function): Use 'defalias'
      instead of 'fset'.
      
      * test/src/emacs-module-tests.el (module/describe-function-1): Adapt
      unit test.
      75c663f8
  28. 19 Jan, 2018 1 commit
    • Eli Zaretskii's avatar
      Portability fixes in emacs-module-tests · c28d4b6d
      Eli Zaretskii authored
      * test/Makefile.in (abs_top_srcdir): Add variable, needed by
      CPPFLAGS.
      * test/data/emacs-module/mod-test.c: Include <limits.h>.
      (pT, pZ, T_TYPE, Z_TYPE): Compatibility macros, for systems that
      don't support %td and %zu format specs.
      (emacs_module_init): Use compatibility macros to make the error
      messages print meaningful values (and avoid compiler warnings).
      c28d4b6d
  29. 01 Jan, 2018 1 commit
  30. 26 Sep, 2017 1 commit
    • Mark Oteiza's avatar
      Add MIME apps spec utilities · a17f30d7
      Mark Oteiza authored
      Facilitates finding associations between MIME types and desktop files
      that report an association with that type.  Combined with mailcap.el's
      MIME facilities, it should be easy to use desktop files.
      * lisp/xdg.el (xdg-mime-table): New variable.
      (xdg-mime-apps-files, xdg-mime-collect-associations, xdg-mime-apps):
      New functions.
      * test/data/xdg/mimeapps.list: New file.
      * test/data/xdg/mimeinfo.cache: New file.
      * test/lisp/xdg-tests.el (xdg-mime-associations): New test.
      a17f30d7