commit emacs-compat for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package emacs-compat for openSUSE:Factory checked in at 2024-03-26 19:26:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/emacs-compat (Old) and /work/SRC/openSUSE:Factory/.emacs-compat.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "emacs-compat" Tue Mar 26 19:26:14 2024 rev:3 rq:1161542 version:29.1.4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/emacs-compat/emacs-compat.changes 2024-03-05 18:50:37.664968483 +0100 +++ /work/SRC/openSUSE:Factory/.emacs-compat.new.1905/emacs-compat.changes 2024-03-26 19:29:54.570783006 +0100 @@ -1,0 +2,14 @@ +Mon Mar 25 18:10:17 UTC 2024 - Björn Bidar <bjorn.bidar@thaodan.de> + +- Update to version 29.1.4.5: + * Update NEWS.org + * compat-tests: Fix compat-thing-at-mouse test + * Use https links everywhere + * compat.texi: Use @dfn{Extended Definitions} + * NEWS: Mention addition of compat.el to Emacs + * compat.texi: Update manual after the inclusion of compat.el in Emacs + * compat-tests: Fix commentary linter warnings + * compat-tests: Use should-equal + * compat--maybe-require: Rename macro to reduce churn + +------------------------------------------------------------------- Old: ---- compat-29.1.4.4.tar.gz New: ---- compat-29.1.4.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ emacs-compat.spec ++++++ --- /var/tmp/diff_new_pack.VEi2Hi/_old 2024-03-26 19:29:55.094802287 +0100 +++ /var/tmp/diff_new_pack.VEi2Hi/_new 2024-03-26 19:29:55.098802435 +0100 @@ -20,7 +20,7 @@ %global _name compat Name: emacs-%{_name} -Version: 29.1.4.4 +Version: 29.1.4.5 Release: 0 Summary: COMPATibility Library for Emacs Lisp License: GPL-3.0-or-later ++++++ 0001-Add-install-target.patch ++++++ --- /var/tmp/diff_new_pack.VEi2Hi/_old 2024-03-26 19:29:55.122803318 +0100 +++ /var/tmp/diff_new_pack.VEi2Hi/_new 2024-03-26 19:29:55.126803465 +0100 @@ -1,4 +1,4 @@ -From 9b142ee3ddfa80103cbef8bfc25d577200d9f6cf Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@thaodan.de> Date: Wed, 27 Sep 2023 00:25:31 +0300 Subject: [PATCH] Add install target @@ -12,7 +12,7 @@ 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile -index 0044904..ac20d7d 100644 +index 3c5949418789b1525c8df26cfad02876730b8c53..5c07efcef76313e645ecb97e153cc28023cb9846 100644 --- a/Makefile +++ b/Makefile @@ -29,19 +29,32 @@ @@ -74,7 +74,4 @@ $(BYTEC): compat-macs.el .el.elc: --- -2.43.0 - ++++++ compat-29.1.4.4.tar.gz -> compat-29.1.4.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/.github/workflows/makefile.yml new/compat-29.1.4.5/.github/workflows/makefile.yml --- old/compat-29.1.4.4/.github/workflows/makefile.yml 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/.github/workflows/makefile.yml 2024-03-16 11:54:18.000000000 +0100 @@ -32,6 +32,7 @@ - '28.1' - '28.2' - '29.1' + - '29.2' - 'release-snapshot' - 'snapshot' steps: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/Makefile new/compat-29.1.4.5/Makefile --- old/compat-29.1.4.4/Makefile 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/Makefile 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ### Makefile -# Copyright (C) 2021-2023 Free Software Foundation, Inc. +# Copyright (C) 2021-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/NEWS.org new/compat-29.1.4.5/NEWS.org --- old/compat-29.1.4.4/NEWS.org 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/NEWS.org 2024-03-16 11:54:18.000000000 +0100 @@ -2,6 +2,18 @@ #+link: compat-gh https://github.com/emacs-compat/compat/issues/ #+options: toc:nil num:nil author:nil +* Release of "Compat" Version 29.1.4.5 + +- Minor optimization of ~plist-get~ and ~plist-put~. +- Minor compatibility adjustments for the Emacs 30 development version. +- A minimal version of =compat.el= will be part of Emacs 30. Emacs :core packages + can directly ~(require 'compat)~ without the ~NOERROR~ flag. Furthermore Compat + will not be installed unnecessarily. If a package depending on Emacs 25.1 and + Compat 29.1 is installed on Emacs 30.1, Compat 29.1 will not be installed from + ELPA, since Emacs 30.1 already provides the required functionality. + +(Release <2024-03-16 Sat>) + * Release of "Compat" Version 29.1.4.4 - Fix ~Package-Requires~ header in compat.el @@ -279,7 +291,7 @@ * 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, +identified as of 28.1.0.0. Nevertheless these warrant a version bump, as some of these changes a functional. These include: - The addition of the =file-attribute-*= accessor functions. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/README.md new/compat-29.1.4.5/README.md --- old/compat-29.1.4.4/README.md 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/README.md 2024-03-16 11:54:18.000000000 +0100 @@ -25,7 +25,7 @@ [GNU ELPA repository]: https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/?h=externals/compat [GNU ELPA package builds]: - http://elpa.gnu.org/packages/compat.html + https://elpa.gnu.org/packages/compat.html Bug and patches --------------- @@ -43,7 +43,7 @@ [copyright assignment] to the [FSF], for all non-trivial code contributions. [GNU ELPA]: - http://elpa.gnu.org/packages/compat.html + https://elpa.gnu.org/packages/compat.html [copyright assignment]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignme... [FSF]: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-25.el new/compat-29.1.4.5/compat-25.el --- old/compat-29.1.4.4/compat-25.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-25.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-25.el --- Functionality added in Emacs 25.1 -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-26.el new/compat-29.1.4.5/compat-26.el --- old/compat-29.1.4.4/compat-26.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-26.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-26.el --- Functionality added in Emacs 26.1 -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -75,7 +75,7 @@ ;;;; Defined in subr.el -(compat-defun provided-mode-derived-p (mode &rest modes) ;; <compat-tests:provided-derived-mode-p> +(compat-defun provided-mode-derived-p (mode &rest modes) ;; <compat-tests:provided-mode-derived-p> "Non-nil if MODE is derived from one of MODES. Uses the `derived-mode-parent' property of the symbol to trace backwards. If you just want to check `major-mode', use `derived-mode-p'." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-27.el new/compat-29.1.4.5/compat-27.el --- old/compat-29.1.4.4/compat-27.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-27.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-27.el --- Functionality added in Emacs 27.1 -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-28.el new/compat-29.1.4.5/compat-28.el --- old/compat-29.1.4.4/compat-28.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-28.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-28.el --- Functionality added in Emacs 28.1 -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -190,7 +190,7 @@ ;; The "RGBi" (RGB Intensity) specification is defined by ;; XCMS[0], see [1] for the implementation in Xlib. ;; - ;; [0] http://www.nic.funet.fi/pub/X11/X11R4/DOCS/color/Xcms.text + ;; [0] https://www.nic.funet.fi/pub/X11/X11R4/DOCS/color/Xcms.text ;; [1] https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/src/xcms/LRGB.c... ((string-match ;; (rx bos "rgbi:" (* space) @@ -782,7 +782,7 @@ ;;;; Defined in env.el (compat-defmacro with-environment-variables (variables &rest body) ;; <compat-tests:with-environment-variables> - "Set VARIABLES in the environent and execute BODY. + "Set VARIABLES in the environment and execute BODY. VARIABLES is a list of variable settings of the form (VAR VALUE), where VAR is the name of the variable (a string) and VALUE is its value (also a string). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-29.el new/compat-29.1.4.5/compat-29.el --- old/compat-29.1.4.4/compat-29.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-29.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-29.el --- Functionality added in Emacs 29.1 -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -102,38 +102,40 @@ (compat-defun plist-get (plist prop &optional predicate) ;; <compat-tests:plist-get> "Handle optional argument PREDICATE." :extended t - (if (or (null predicate) (eq predicate 'eq)) - (plist-get plist prop) - (catch 'found - (while (consp plist) - (when (funcall predicate prop (car plist)) - (throw 'found (cadr plist))) - (setq plist (cddr plist)))))) + (pcase predicate + ((or `nil `eq) (plist-get plist prop)) + (`equal (lax-plist-get plist prop)) + (_ (catch 'found + (while (consp plist) + (when (funcall predicate prop (car plist)) + (throw 'found (cadr plist))) + (setq plist (cddr plist))))))) (compat-defun plist-put (plist prop val &optional predicate) ;; <compat-tests:plist-get> "Handle optional argument PREDICATE." :extended t - (if (or (null predicate) (eq predicate 'eq)) - (plist-put plist prop val) - (catch 'found - (let ((tail plist)) - (while (consp tail) - (when (funcall predicate prop (car tail)) - (setcar (cdr tail) val) - (throw 'found plist)) - (setq tail (cddr tail)))) - (nconc plist (list prop val))))) + (pcase predicate + ((or `nil `eq) (plist-put plist prop val)) + (`equal (lax-plist-put plist prop val)) + (_ (catch 'found + (let ((tail plist)) + (while (consp tail) + (when (funcall predicate prop (car tail)) + (setcar (cdr tail) val) + (throw 'found plist)) + (setq tail (cddr tail)))) + (nconc plist (list prop val)))))) (compat-defun plist-member (plist prop &optional predicate) ;; <compat-tests:plist-get> "Handle optional argument PREDICATE." :extended t - (if (or (null predicate) (eq predicate 'eq)) - (plist-member plist prop) - (catch 'found - (while (consp plist) - (when (funcall predicate prop (car plist)) - (throw 'found plist)) - (setq plist (cddr plist)))))) + (pcase predicate + ((or `nil `eq) (plist-member plist prop)) + (_ (catch 'found + (while (consp plist) + (when (funcall predicate prop (car plist)) + (throw 'found plist)) + (setq plist (cddr plist))))))) ;;;; Defined in gv.el diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-macs.el new/compat-29.1.4.5/compat-macs.el --- old/compat-29.1.4.4/compat-macs.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-macs.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-macs.el --- Compatibility Macros -*- lexical-binding: t; no-byte-compile: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -142,7 +142,7 @@ (defmacro compat-guard (cond &rest rest) "Guard definition with a runtime COND and a version check. The runtime condition must make sure that no definition is -overriden. REST is an attribute plist followed by the definition +overridden. REST is an attribute plist followed by the definition body. The attributes specify the conditions under which the definition is generated. @@ -240,7 +240,8 @@ ;; The boundp check is performed at runtime to make sure that we never ;; redefine an existing definition if Compat is loaded on a newer Emacs ;; version. - `((unless (boundp ',name) + `((defvar ,name) + (unless (boundp ',name) (,(if constant 'defconst 'defvar) ,name ,initval ,(compat-macs--docstring 'variable name docstring)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat-tests.el new/compat-29.1.4.5/compat-tests.el --- old/compat-29.1.4.4/compat-tests.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat-tests.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,6 +1,6 @@ ;;; compat-tests.el --- Tests for Compat -*- lexical-binding: t; no-byte-compile: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -19,10 +19,10 @@ ;; Tests for compatibility functions from compat.el. ;; -;; Note that all functions are covered by tests. When new functions are +;; Note that all functions are covered by tests. When new functions are ;; added to Compat, they must come with test coverage! -;; Functions are marked with a link to the testsuite. The link type +;; Functions are marked with a link to the test suite. The link type ;; `compat-tests' must be registered first by evaluating the following ;; code. If you intend to work on the test suite you can add this code to ;; your init.el. @@ -137,18 +137,18 @@ (with-temp-buffer (let ((event `(mouse-1 (,(selected-window) 1 (0 . 0) 0)))) (set-window-buffer nil (current-buffer)) - (insert "http://emacs.org/") + (insert "https://emacs.org/") (goto-char (point-min)) - (should-equal "http://emacs.org/" (thing-at-mouse event 'url)) - (should-equal '(1 . 18) (bounds-of-thing-at-mouse event 'url)) + (should-equal "https://emacs.org/" (thing-at-mouse event 'url)) + (should-equal '(1 . 19) (bounds-of-thing-at-mouse event 'url)) (should-not (region-active-p)) (mark-thing-at-mouse event 'url) - (should-equal (point) 18) - (should-equal '((1 . 18)) (region-bounds)) + (should-equal (point) 19) + (should-equal '((1 . 19)) (region-bounds)) (let ((mouse-select-region-move-to-beginning t)) (mark-thing-at-mouse event 'url)) (should-equal (point) 1) - (should-equal '((1 . 18)) (region-bounds)))))) + (should-equal '((1 . 19)) (region-bounds)))))) (ert-deftest compat-dolist-with-progress-reporter () (let (y) @@ -1054,7 +1054,15 @@ (should-equal (compat-call plist-get list "first" #'string=) 10) (should-equal (compat-call plist-get list "second" #'string=) 2) (should (compat-call plist-member list "first" #'string=)) - (should-not (compat-call plist-member list "third" #'string=)))) + (should-not (compat-call plist-member list "third" #'string=))) + (let (list) + (setq list (compat-call plist-put list "first" 1 #'equal)) + (setq list (compat-call plist-put list "second" 2 #'equal)) + (setq list (compat-call plist-put list "first" 10 #'equal)) + (should-equal (compat-call plist-get list "first" #'equal) 10) + (should-equal (compat-call plist-get list "second" #'equal) 2) + (should (compat-call plist-member list "first" #'equal)) + (should-not (compat-call plist-member list "third" #'equal)))) (ert-deftest compat-garbage-collect-maybe () (garbage-collect-maybe 10)) @@ -1195,7 +1203,7 @@ (should-equal '((0 . zero) a (0 . zero)) (compat-call assoc-delete-all 0 (list (cons 0 'zero) (cons 1 'one) 'a (cons 0 'zero)) #'/=)) (should-equal '(a (0 . zero) (0 . zero)) (compat-call assoc-delete-all 0 (list 'a (cons 0 'zero) (cons 1 'one) (cons 0 'zero)) #'/=))) -(ert-deftest compat-provided-derived-mode-p () +(ert-deftest compat-provided-mode-derived-p () (let ((one (make-symbol "1")) (two (make-symbol "2")) (three (make-symbol "3")) @@ -1204,26 +1212,21 @@ (put two 'derived-mode-parent one) (put one.5 'derived-mode-parent one) (put three 'derived-mode-parent two) - (should-equal one (provided-mode-derived-p one one)) - (should-equal one (provided-mode-derived-p two one)) - (should-equal one (provided-mode-derived-p three one)) + (should (provided-mode-derived-p one one)) + (should (provided-mode-derived-p two one)) + (should (provided-mode-derived-p two two)) + (should (provided-mode-derived-p three one)) (should-not (provided-mode-derived-p one eins)) (should-not (provided-mode-derived-p two eins)) (should-not (provided-mode-derived-p two one.5)) - (should-equal one (provided-mode-derived-p two one.5 one)) - (should-equal two (provided-mode-derived-p two one.5 two)) - (should-equal one (provided-mode-derived-p three one.5 one)) - (should-equal two (provided-mode-derived-p three one.5 one two)) - (should-equal two (provided-mode-derived-p three one.5 two one)) - (should-equal three (provided-mode-derived-p three one.5 two one three)) - (should-equal three (provided-mode-derived-p three one.5 three two one)) + (should (provided-mode-derived-p three one)) + (should (provided-mode-derived-p three two)) + (should-not (provided-mode-derived-p three one.5)) (let ((major-mode three)) - (should-equal one (derived-mode-p one)) - (should-equal one (derived-mode-p one.5 one)) - (should-equal two (derived-mode-p one.5 one two)) - (should-equal two (derived-mode-p one.5 two one)) - (should-equal three (derived-mode-p one.5 two one three)) - (should-equal three (derived-mode-p one.5 three two one))))) + (should-not (derived-mode-p one.5)) + (should (derived-mode-p one)) + (should (derived-mode-p two)) + (should (derived-mode-p three))))) (ert-deftest compat-format-prompt () (should-equal "Prompt: " (format-prompt "Prompt" nil)) @@ -1329,8 +1332,8 @@ (list (list) (list) (list) (list))))) (ert-deftest compat-xor () - (should (equal (xor 'a nil) 'a)) - (should (equal (xor nil 'b) 'b)) + (should-equal (xor 'a nil) 'a) + (should-equal (xor nil 'b) 'b) (should-not (xor nil nil)) (should-not (xor 'a 'b))) @@ -2032,10 +2035,10 @@ (ert-deftest compat-string-search () ;; Find needle at the beginning of a haystack: (should-equal 0 (string-search "a" "abb")) - ;; Find needle at the begining of a haystack, with more potential + ;; Find needle at the beginning of a haystack, with more potential ;; needles that could be found: (should-equal 0 (string-search "a" "abba")) - ;; Find needle with more than one charachter at the beginning of + ;; Find needle with more than one character at the beginning of ;; a line: (should-equal 0 (string-search "aa" "aabbb")) ;; Find a needle midstring: @@ -2954,7 +2957,7 @@ (should (directory-name-p dir)) (should (file-directory-p dir))) (ert-with-temp-file file :buffer buffer - (should (equal (current-buffer) buffer)) + (should-equal (current-buffer) buffer) (should-equal buffer-file-name file) (should-not (directory-name-p file)) (should (file-readable-p file)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat.el new/compat-29.1.4.5/compat.el --- old/compat-29.1.4.4/compat.el 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat.el 2024-03-16 11:54:18.000000000 +0100 @@ -1,10 +1,10 @@ ;;; compat.el --- Emacs Lisp Compatibility Library -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2023 Free Software Foundation, Inc. +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. ;; Author: Philip Kaludercic <philipk@posteo.net>, Daniel Mendler <mail@daniel-mendler.de> ;; Maintainer: Compat Development <~pkal/compat-devel@lists.sr.ht> -;; Version: 29.1.4.4 +;; Version: 29.1.4.5 ;; URL: https://github.com/emacs-compat/compat ;; Package-Requires: ((emacs "24.4") (seq "2.23")) ;; Keywords: lisp, maint @@ -49,11 +49,11 @@ ;; Ensure that the newest compatibility layer is required at compile ;; time and runtime, but only if needed. (eval-when-compile - (defmacro compat--maybe-require-29 () + (defmacro compat--maybe-require () (when (version< emacs-version "29.1") (require 'compat-29) '(require 'compat-29)))) -(compat--maybe-require-29) +(compat--maybe-require) ;;;; Macros for extended compatibility function calls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compat-29.1.4.4/compat.texi new/compat-29.1.4.5/compat.texi --- old/compat-29.1.4.4/compat.texi 2023-11-13 08:20:21.000000000 +0100 +++ new/compat-29.1.4.5/compat.texi 2024-03-16 11:54:18.000000000 +0100 @@ -7,7 +7,7 @@ @c %**end of header @copying -Copyright @copyright{} 2022-2023 Free Software Foundation, Inc. +Copyright @copyright{} 2022-2024 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -31,7 +31,7 @@ @finalout @titlepage @title "Compat" Manual -@subtitle For version 29.1.4.4 +@subtitle For version 29.1.4.5 @author Philip Kaludercic, Daniel Mendler @page @vskip 0pt plus 1filll @@ -46,7 +46,7 @@ This manual documents the usage of the "Compat" Emacs lisp library, the forward-compatibility library for Emacs Lisp, corresponding to -version 29.1.4.4. +version 29.1.4.5. @insertcopying @end ifnottex @@ -105,10 +105,10 @@ The intended use-case for this library is for package developers to add as a dependency in the header. The version of the Compat library mirrors the version of Emacs releases. The current version of Compat -corresponds to the upcoming Emacs 29 release. +corresponds to the current Emacs release. @example -;; Package-Requires: ((emacs "24.4") (compat "29.1.4.4")) +;; Package-Requires: ((emacs "24.4") (compat "29.1.4.5")) @end example There is no need to depend on @code{emacs 24.4} specifically. One can @@ -121,26 +121,31 @@ (require 'compat) @end example -should be added early on. In packages which are part of Emacs itself -and which want to take advantage of Compat, the @code{noerror} flag -should be specified: @code{(require 'compat nil 'noerror)}. In the -future a minimal version of Compat may be added to the Emacs core, -such that the @code{noerror} flag will not be necessary anymore. - -This will load all necessary Compat definitions. Compat loads the -@code{seq} library which is preloaded by default on Emacs 29. Note -that 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. - -Note that Compat provides replacement functions with extended -functionality for functions that are already defined (@code{sort}, -@code{assoc}, @dots{}). These functions may have changed their -calling convention (additional optional arguments) or may have changed -their behavior. These functions must be looked up explicitly with -@code{compat-function} or called explicitly with @code{compat-call}. -We call them ``Extended Definitions''. In contrast, newly ``Added -Definitions'' can be called as usual. +should be added early on. This will load all necessary Compat +definitions. Compat loads the @code{seq} library which is preloaded +by default on Emacs 29. Note that 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. + +A minimal version of Compat will be present in Emacs version 30 and +newer. Packages which are part of Emacs itself and want to take +advantage of Compat, can also use @code{(require 'compat)}. The +advantage of the inclusion of a minimal Compat in Emacs is that Compat +will not be installed if you require a version newer or equal than the +current Emacs version. For example, if a package depending on Emacs +25.1 and Compat 29.1 is installed on Emacs 30.1, Compat will not be +pulled in as dependency, since Emacs 30.1 already provides the +required functionality. + +Compat provides replacement functions with extended functionality for +functions that are already defined, e.g., @code{sort} or @code{assoc}. +These functions may have changed their calling convention (additional +optional arguments) or may have changed their behavior. These +functions must be looked up explicitly with @code{compat-function} or +called explicitly with @code{compat-call}. We call them @dfn{Extended +Definitions}. In contrast, newly @dfn{Added Definitions} can be +called as usual. The Compat manual explicitly documents the calling +convention of each compatibility function. @example (compat-call assoc key alist testfn) ;; Call extended `assoc' @@ -162,16 +167,12 @@ compatibility functions. @end defmac -If Compat is used in core packages, where Compat must be required -currently with the @code{noerror} flag, the macros @code{compat-call} -and @code{compat-function} ar not available. In the future the macros -could be added to subr.el. Alternatively a minimal version of -compat.el could be added to the core. For now it is necessary to -replicate the definition of the macros within core packages. For -example the package ERC defines its own macro @code{erc-compat-call}, -which replicates the Compat definition precisely. +If Compat is used in Emacs core packages, the macros +@code{compat-call} and @code{compat-function} will be available in +Emacs version 30 and newer. -This design has been chosen since Compat does not advise or override +The macros @code{compat-call} and @code{compat-function} are +introduced by Compat, since Compat does not advise or override existing functions. Generally Compat is written in defensive style which is supposed to reduce potential breakage, and to increase the chances of staying binary compatible across releases. The extensive @@ -252,7 +253,7 @@ compromise, compatibility functions and macros with a changed calling convention or behavior can be accessed via the @code{compat-function} and @code{compat-call} macros. In this manual we call such -definitions ``Extended Definitions''. An example is the function +definitions @dfn{Extended Definitions}. An example is the function @code{plist-get}. Note that extended functions are subject to closer scrutiny, since their usage via @code{compat-call} is not completely painless. If a particular extended function does not see much usage @@ -287,7 +288,8 @@ external libraries that cannot be reasonably duplicated in the scope of a compatibility library. Sometimes new functions on the C level rely on internal data structures, which we cannot access, rendering a -backport impossible. For example a missing libxml cannot be emulated. +backport impossible. For example a missing libxml or libtreesitter +cannot be emulated. @item The semantics of Elisp changed on a deep level. For example the @@ -2680,7 +2682,7 @@ happens, characters no longer map in a simple way to display columns, and display layout decisions with such strings, such as truncating too wide strings, can be a complex job. This function helps in performing -suvh jobs: it splits up its argument @var{string} into a list of +such jobs: it splits up its argument @var{string} into a list of substrings, where each substring produces a single grapheme cluster that should be displayed as a unit. Lisp programs can then use this list to construct visually-valid substrings of @var{string} which will
participants (1)
-
Source-Sync