branch: externals/consult
commit e82f398a702a55b081e36e49b38fce6edf39be54
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    Stop providing an annotation-function
    
    The affixation-function is supported since Emacs 28.1.
    Consult requires Emacs 29.1.
---
 CHANGELOG.org |  2 ++
 consult.el    | 10 +---------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 2d4f7cd2da..aaa671e3a0 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -11,6 +11,8 @@
   which was not the case before.
 - =consult-focus-lines=: Do not fontify buffer eagerly to reduce startup cost. 
The
   focused lines are fontified lazily when they come into sight.
+- =consult--read=: Stop providing an =annotation-function=. Rely on the
+  =affixation-function= only.
 
 * Version 3.0 (2025-11-15)
 
diff --git a/consult.el b/consult.el
index 5fd1274a6b..8605c566ce 100644
--- a/consult.el
+++ b/consult.el
@@ -2801,12 +2801,6 @@ PREVIEW-KEY are the preview keys."
     (when (< pos max)
       (add-text-properties pos max '(invisible t rear-nonsticky t 
cursor-intangible t)))))
 
-(defun consult--read-annotate (fun cand)
-  "Annotate CAND with annotation function FUN."
-  (pcase (funcall fun cand)
-    (`(,_ ,_ ,suffix) suffix)
-    (ann ann)))
-
 (defun consult--read-affixate (fun cands)
   "Affixate CANDS with annotation function FUN."
   (mapcar (lambda (cand)
@@ -2858,9 +2852,7 @@ PREVIEW-KEY are the preview keys."
                            ,@(when group `((group-function . ,group)))
                            ,@(when annotate
                                `((affixation-function
-                                  . ,(apply-partially #'consult--read-affixate 
annotate))
-                                 (annotation-function
-                                  . ,(apply-partially #'consult--read-annotate 
annotate))))
+                                  . ,(apply-partially #'consult--read-affixate 
annotate))))
                            ,@(unless sort '((cycle-sort-function . identity)
                                             (display-sort-function . 
identity)))))
                (consult--annotate-align-width 0)

Reply via email to