Version 29.1.3.0 of package Compat has just been released in GNU ELPA. You can now find it in M-x list-packages RET.
Compat describes itself as: ================================ Emacs Lisp Compatibility Library ================================ More at https://elpa.gnu.org/packages/compat.html ## Summary: To allow for the usage of Emacs functions and macros that are defined in newer versions of Emacs, compat.el provides definitions that are installed ONLY if necessary. If Compat is installed on a recent version of Emacs, all of the definitions are disabled at compile time, such that no negative performance impact is incurred. These reimplementations of functions and macros are at least subsets of the actual implementations. Be sure to read the documentation string to make sure. ## Recent NEWS: ━━━━━━━━━━━━━━━━━━━━━━━ COMPAT.EL - CHANGELOG ━━━━━━━━━━━━━━━━━━━━━━━ 1 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>) 2 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>) 3 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>) 4 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'. … …