#+title: compat.el - Changelog

* Release of "Compat" Version 29.1.3.4

- Ensure that ~seq~ is required properly both at compile time and runtime, such
  that compilation of downstream packages works even if Compat itself is not
  compiled. Magit uses a complex continuous integration system, where Magit is
  compiled and tested, while the Compat dependency is not compiled.
- compat-28: Add ~process-lines-handling-status~ and ~process-lines-ignore-status~.

(Release <2023-02-11 Sat>)

* Release of "Compat" Version 29.1.3.3

- compat-27: Add ~with-suppressed-warnings~.
- compat-29: Add ~cl-with-gensyms~ and ~cl-once-only~.
- compat-29: Load ~seq~, which is preloaded on Emacs 29.

(Release <2023-02-08 Wed>)

* Release of "Compat" Version 29.1.3.2

- compat-26: Add ~make-temp-file~ with optional argument TEXT.
- compat-27: Mark ~compat-call dired-get-marked-files~ as obsolete. See the
  section limitations in the Compat manual.
- compat-29: Add ~funcall-with-delayed-message~ and ~with-delayed-message~.
- compat-29: Add ~ert-with-temp-file~ and ~ert-with-temp-directory~.
- compat-29: Add ~set-transient-map~ with optional arguments MESSAGE and TIMEOUT.

(Release <2023-02-01 Wed>)

* Release of "Compat" Version 29.1.3.1

- Fix regression, which prevented loading Compat in interpreted mode. We ensure
  that Compat works interpreted and byte compiled by running the entire test
  suite twice in the CI.
- compat-27: Add ~file-name-unquote~.
- compat-28: Add ~mark-thing-at-mouse~.
- compat-29: Replace ~string-lines~ with version from Emacs 29, support optional
  KEEP-NEWLINES argument.

(Release <2023-01-25 Wed>)

* Release of "Compat" Version 29.1.3.0

- compat-25: Add ~hash-table-empty-p~.
- compat-25: Add ~macroexp-parse-body~ and ~macroexp-quote~.
- compat-25: Add ~region-noncontiguous-p~.
- compat-25: Add ~save-mark-and-excursion~.
- compat-26: Add ~read-answer~.
- compat-26: Add ~region-bounds~.
- compat-27: Add ~date-ordinal-to-time~.
- compat-27: Add ~file-size-human-readable-iec~.
- compat-27: Add ~major-mode-suspend~ and ~major-mode-restore~.
- compat-27: Add ~make-decoded-time~.
- compat-27: Add ~minibuffer-history-value~.
- compat-27: Add ~read-char-from-minibuffer~.
- compat-27: Add ~ring-resize~.
- compat-28: Add ~color-dark-p~.
- compat-28: Add ~directory-files-and-attributes~ with COUNT argument.
- compat-28: Add ~text-quoting-style~.
- compat-28: Add ~with-window-non-dedicated~.
- compat-29: Add ~buffer-local-set-state~ and ~buffer-local-restore-state~.
- compat-29: Add ~compiled-function-p~.
- compat-29: Add ~count-sentences~.
- compat-29: Add ~delete-line~.
- compat-29: Add ~get-scratch-buffer-create~.
- compat-29: Add ~list-of-strings-p~.
- compat-29: Add ~plist-get~ generalized variable.
- compat-29: Add ~plistp~.
- compat-29: Add ~read-multiple-choice~ with LONG-FORM argument.
- compat-29: Add ~readablep~.
- compat-29: Add ~substitute-quotes~.
- compat-29: Add ~use-region-beginning~, ~use-region-end~ and ~use-region-noncontiguous-p~.
- compat-29: Add ~with-narrowing~.

(Release <2023-01-22 Sun>)

* Release of "Compat" Version 29.1.2.0

- All compatibility functions are covered by tests!
- Add links from compatibility definitions to tests.
- BREAKING: Drop JSON parsing support (libjansson API, unused downstream).
- BREAKING: Drop ~null-device~ (unused downstream).
- BREAKING: Drop ~unlock-buffer~ (unused downstream).
- compat-26: Add ~buffer-hash~.
- compat-27: Add ~fixnump~ and ~bignump~.
- compat-27: Add ~with-minibuffer-selected-window~.
- compat-27: Add generalized variables for ~decoded-time-*~.
- compat-28: Add ~macroexp-warn-and-return~.
- compat-28: Add ~subr-native-elisp-p~.
- compat-28: Add ~bounds-of-thing-at-mouse~.
- compat-29: Add ~with-buffer-unmodified-if-unchanged~.
- compat-29: Fix and test ~define-key~ with REMOVE argument.

(Release <2023-01-16 Mon>)

* Release of "Compat" Version 29.1.1.1

- Add tests, 167 out of 203 definitions tested (82%).
- compat-25: Improve algorithmic complexity of ~sort~.
- compat-28: Add ~make-separator-line~.
- compat-29: Minor fixes to ~keymap-*~ functions.
- compat-29: Add ~with-memoization~.
- compat-29: Add ~buttonize~ and ~buttonize-region~.

(Release <2023-01-14 Sat>)

* Release of "Compat" Version 29.1.1.0

- The macros in ~compat-macs.el~ have been rewritten and simplified. The
  refactoring allows to further refine the criteria under which compatibility
  aliases, functions, macros and variables are installed.
- Remove deprecated, prefixed compatibility functions.
- Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
- Compat uses runtime checks (~boundp~, ~fboundp~) to ensure that existing
  definitions are never overridden, when Compat is loaded on a newer Emacs than
  it was compiled on.
- Compat compiles without byte compilation warnings on all supported Emacs
  versions. Warnings are treated as errors in the test suite.
- Compat takes great care to remove unneeded definitions at compile time. On
  recent Emacs 29 the byte compiled files are empty and not loaded, such that
  Compat does not any cost to the Emacs process.
- compat-26: Fix and test ~image-property~ setter.
- compat-26: Fix and test ~read-multiple-choice~.
- compat-28: Fix and test ~with-existing-directory~.
- compat-28: Drop obsolete function ~make-directory-autoloads~.
- compat-29: Drop broken functions ~string-pixel-width~ and
  ~buffer-text-pixel-size~. These functions had poor performance which lead to a
  downstream issue in the doom-modeline package. If a more efficient solution is
  possible, the function will be added back.
- compat-29: Drop broken function ~string-limit~.
- compat-29: Drop broken macro ~with-buffer-unmodified-if-unchanged~, which relied
  on ~buffer-hash~ which does not exist on all supported Emacs versions.
- compat-29: Add ~pos-bol~ and ~pos-eol~.

(Release <2023-01-07 Sat>)

* Release of "Compat" Version 29.1.0.1

- Add multiple new tests for existing APIs.
- Fix bugs in compatibility functions: ~setq-local~, ~proper-list-p, prop-match-p~,
  ~file-name-concat~, ~replace-regexp-in-region~, ~replace-string-in-region~.
- Add new Emacs 29 APIs. Some of them are still untested and may change. If you
  intend to use an Emacs 29 API please be careful and if possible contribute
  test cases. All untested functions are marked in the Compat code. Over time
  tests for all functions will be added gradually.
- Add the macros ~compat-call~ and ~compat-function~ to call compatibility
  functions. Since Compat avoids overwriting already existing functions, we must
  define separate compatibility function definitions for functions which changed
  their calling convention or behavior. These compatibility definitions can be
  looked up using ~compat-function~ and called with ~compat-call~. For example ~assoc~
  can be called with a ~TESTFN~ since Emacs 26. In Emacs 25 and older the calling
  convention was ~(assoc KEY ALIST)~. In order to use the new calling convention
  you can use ~(compat-call assoc KEY ALIST TESTFN)~.
- Deprecate all ~compat-*~ prefixed functions. Instead use the aforementioned
  ~compat-call~ or ~compat-function~ macros.
- Deprecate ~compat-help.el~ and ~compat-font-lock.el.~
- Development moved to GitHub.
- BREAKING: Drop broken function ~func-arity~. Using ~func-arity~ is generally
  discouraged and the function is hard to implement properly due to all the
  various function types. There it is unlikely that the function will get
  reintroduced in Compat.
- BREAKING: Drop broken function ~directory-files-recursively~. In case you need
  this function, a patch including tests is welcome.
- BREAKING: Drop support for Emacs 24.3. Emacs 24.4 is required now. In case you
  still need Emacs 24.3 support, you can rely on Compat 28.1.2.2.

(Release <2023-01-05 Thu>)

* Release of "Compat" Version 28.1.2.2

This is a minor release that hopes to address [[compat:7]].

(Release <2022-08-25 Thu>)

* Release of "Compat" Version 28.1.2.1

This is a minor release adding the following changes:

- Add =derived-mode-p= defined in Emacs 27
- Add =provided-mode-derived-p= defined in Emacs 27
- Add =read-multiple-choice= defined in Emacs 26
- Add =file-name-absolute-p= defined in Emacs 28

The only other notable change is that the manual has been rewritten to
include much more documentation that had been the case previously.

(Release <2022-08-24 Wed>)

* Release of "Compat" Version 28.1.2.0

The main change of this release has been the major simplification of
Compat's initialisation system, improving the situation around issues
people had been reporting ([[compat:4]], once again) with unconventional
or unpopular packaging systems.

In addition to this, the following functional changes have been made:

- Fix =format-prompt= of an empty string as "default" argument
- Add =decoded-time-period= defined in Emacs 28
- Add =subr-primitive-p= defined in Emacs 28

Minor improvements to manual are also part of this release.

(Release <2022-07-18 Mon>)

* Release of "Compat" Version 28.1.1.3

This release just contains a hot-fix for an issue introduced in the
last version, where compat.el raises an error during byte compilation.
See [[compat:4]].

(Release <2022-06-19 Sun>)

* Release of "Compat" Version 28.1.1.2

Two main changes have necessitated a new patch release:

1. Fix issues related to the loading of compat when uncompiled.  See
   [[https://lists.sr.ht/~pkal/compat-devel/%3C20220530191000.2183047-1-jonas%40bernoul.li%3E][this thread]] for more details on the problem.
2. Fix issues related to the loading of compat on old pre-releases
   (think of 28.0.50). See [[https://lists.sr.ht/~pkal/compat-devel/%3Cf8635d7d-e233-448f-b325-9e850363241c%40www.fastmail.com%3E][this thread]] for more details on the
   problem.

(Released <2022-06-22 Wed>)

* Release of "Compat" Version 28.1.1.1

This is a minor release fixing a bug in =json-serialize=, that could
cause unintended side-effects, not related to packages using Compat
directly (see [[compat:2]]).

(Released <2022-05-05 Thu>)

* Release of "Compat" Version 28.1.1.0

This release mostly fixes a number of smaller bugs that were not
identified as of 28.1.0.0.  Nevertheless these warrent a version bump,
as some of these changes a functional.  These include:

- The addition of the =file-attribute-*= accessor functions.
- The addition of =file-attribute-collect=.
- Improvements to the Texinfo manual (via Jonas Bernoulli's recent
  work on =ox-texinfo=).  For the time being, the Texinfo file is
  maintained in the repository itself, next to the =MANUAL= file.
  This might change in the future.
- Adding a prefix to =string-trim=, =string-trim-left= and
  =string-trim-right= (i.e. now =compat-string-trim=,
  =compat-string-trim-left= and =compat-string-trim-right=)
- Improving the version inference used in the =compat-*= macros.
  This improves the compile-time optimisation that strips away
  functions that are known to be defined for a specific version.
- The addition of generalised variable (=setf=) support for
  =compat-alist-get=.
- The addition of =image-property= and generalised variable support
  for =image-property=.
- The addition of the function =compat-executable-find=.
- The addition of the function =compat-dired-get-marked-files=.
- The addition of the function =exec-path=.
- The addition of the function =make-lock-file-name=.
- The addition of the function =null-device=.
- The addition of the function =time-equal-p=.
- The addition of the function =date-days-in-month=.
- Handling out-of-directory byte compilation better.
- Fixing the usage and edge-cases of =and-let*=.

(Released <2022-04-22 Fri>)