branch: elpa/magit
commit 4800ace210d5eb82b00428f0ff74723c986181ba
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Drop unnecessary uses of compat-call
- Magit requires Emacs 28.1.
- `executable-find' supports REMOTE since 27.1.
- `assoc-delete-all' was added in 27.1.
- `alist-get' supports TESTFN since 26.1.
---
lisp/magit-autorevert.el | 2 +-
lisp/magit-git.el | 4 ++--
lisp/magit-mode.el | 4 ++--
lisp/magit-section.el | 7 +++----
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/lisp/magit-autorevert.el b/lisp/magit-autorevert.el
index 95b47fffc1d..9a2a580e000 100644
--- a/lisp/magit-autorevert.el
+++ b/lisp/magit-autorevert.el
@@ -141,7 +141,7 @@ seconds of user inactivity. That is not desirable."
(or auto-revert-remote-files ; see #5422
(not (file-remote-p buffer-file-name)))
(file-readable-p buffer-file-name)
- (compat-call executable-find (magit-git-executable) t)
+ (executable-find (magit-git-executable) t)
(magit-toplevel)
(or (not magit-auto-revert-tracked-only)
(magit-file-tracked-p buffer-file-name)))
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index fb1ecf0d1fb..79a9cadfb6d 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -606,7 +606,7 @@ executable."
(error "`git --exec-path' failed"))))
exec-suffixes
#'file-executable-p)
- (compat-call executable-find command t)))
+ (executable-find command t)))
;;; Git Version
@@ -953,7 +953,7 @@ returning the truename."
"(see https://magit.vc/goto/e6a78ed2)"))
(defun magit--assert-usable-git ()
- (if (not (compat-call executable-find (magit-git-executable) t))
+ (if (not (executable-find (magit-git-executable) t))
(signal 'magit-git-executable-not-found (magit-git-executable))
(let ((magit-git-debug
(lambda (err)
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index cb0b0bcdf38..661fa4be882 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1509,10 +1509,10 @@ repositories."
(cond-let
((eq repository 'all)
(dolist (cache magit-repository-local-cache)
- (setf cache (compat-call assoc-delete-all key cache))))
+ (setf cache (assoc-delete-all key cache))))
([cache (assoc (or repository (magit-repository-local-repository))
magit-repository-local-cache)]
- (setf cache (compat-call assoc-delete-all key cache)))))
+ (setf cache (assoc-delete-all key cache)))))
(defmacro magit--with-repository-local-cache (key &rest body)
(declare (indent 1) (debug (form body)))
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 349e425ae35..8c25432b3b1 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1990,10 +1990,9 @@ When `magit-section-preserve-visibility' is nil, return
nil."
(cl-defun magit-section-cache-visibility
(&optional (section magit-insert-section--current))
"Cache SECTION's current visibility."
- (setf (compat-call alist-get
- (magit-section-ident section)
- magit-section-visibility-cache
- nil nil #'equal)
+ (setf (alist-get (magit-section-ident section)
+ magit-section-visibility-cache
+ nil nil #'equal)
(if (oref section hidden) 'hide 'show)))
(cl-defun magit-section-maybe-cache-visibility