branch: externals/diff-hl
commit 1847dfabc7550a0e73b662381a5e0c19cab97de1
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Use cl-find-if: more low-level but always available
And we load cl-lib already.
---
diff-hl.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/diff-hl.el b/diff-hl.el
index ce7a948cdf..ace69e7231 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -1293,10 +1293,10 @@ The value of this variable is a mode line template as in
;; instead, but only when they don't call `revert-buffer':
(add-hook 'magit-not-reverted-hook 'diff-hl-update nil t)
(add-hook 'text-scale-mode-hook 'diff-hl-maybe-redefine-bitmaps nil t)
- (when-let* ((rev (map-some
- (lambda (root rev)
- (when (string-prefix-p root default-directory)
- rev))
+ (when-let* ((rev (cl-find-if
+ (lambda (pair)
+ (when (string-prefix-p (car pair)
default-directory)
+ (cdr pair)))
diff-hl-reference-revision-projects-cache)))
(setq-local diff-hl-reference-revision rev)))
(remove-hook 'after-save-hook 'diff-hl-update t)