[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 49d1fdfb80: Use Compat 30
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 49d1fdfb80: Use Compat 30 |
Date: |
Wed, 17 Jul 2024 12:58:48 -0400 (EDT) |
branch: externals/orderless
commit 49d1fdfb80b55699a00b11bc916ad29c0447039b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use Compat 30
---
orderless-kwd.el | 4 ++--
orderless.el | 14 +++++---------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/orderless-kwd.el b/orderless-kwd.el
index 076f464f41..73a0fee551 100644
--- a/orderless-kwd.el
+++ b/orderless-kwd.el
@@ -92,8 +92,8 @@ as a flag and does not require input."
(defun orderless-kwd-group (pred regexp)
"Match candidate group title against PRED and REGEXP."
- (when-let ((fun (completion-metadata-get (orderless--metadata)
- 'group-function)))
+ (when-let ((fun (compat-call completion-metadata-get
+ (orderless--metadata) 'group-function)))
(lambda (str)
(orderless--match-p pred regexp (funcall fun str nil)))))
diff --git a/orderless.el b/orderless.el
index e29849bb38..0f00c8b608 100644
--- a/orderless.el
+++ b/orderless.el
@@ -7,7 +7,7 @@
;; Keywords: extensions
;; Version: 1.1
;; Homepage: https://github.com/oantolin/orderless
-;; Package-Requires: ((emacs "27.1"))
+;; Package-Requires: ((emacs "27.1") (compat "30"))
;; This file is part of GNU Emacs.
@@ -55,6 +55,7 @@
;;; Code:
+(require 'compat)
(eval-when-compile (require 'cl-lib))
(defgroup orderless nil
@@ -307,15 +308,11 @@ which can invert any predicate or regexp."
(defun orderless-annotation (pred regexp)
"Match candidates where the annotation matches PRED and REGEXP."
(let ((md (orderless--metadata)))
- (if-let ((fun (or (completion-metadata-get md 'affixation-function)
- (plist-get completion-extra-properties
- :affixation-function))))
+ (if-let ((fun (compat-call completion-metadata-get md
'affixation-function)))
(lambda (str)
(cl-loop for s in (cdar (funcall fun (list str)))
thereis (orderless--match-p pred regexp s)))
- (when-let ((fun (or (completion-metadata-get md 'annotation-function)
- (plist-get completion-extra-properties
- :annotation-function))))
+ (when-let ((fun (compat-call completion-metadata-get md
'annotation-function)))
(lambda (str) (orderless--match-p pred regexp (funcall fun str)))))))
;;; Highlighting matches
@@ -545,11 +542,10 @@ The predicate PRED is used to constrain the entries in
TABLE."
The predicate PRED is used to constrain the entries in TABLE. The
matching portions of each candidate are highlighted.
This function is part of the `orderless' completion style."
- (defvar completion-lazy-hilit-fn)
(pcase-let ((`(,prefix ,regexps ,ignore-case ,pred)
(orderless--compile string table pred)))
(when-let ((completions (orderless--filter prefix regexps ignore-case
table pred)))
- (if (bound-and-true-p completion-lazy-hilit)
+ (if completion-lazy-hilit
(setq completion-lazy-hilit-fn
(apply-partially #'orderless--highlight regexps ignore-case))
(cl-loop for str in-ref completions do
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/orderless 49d1fdfb80: Use Compat 30,
ELPA Syncer <=