branch: externals/consult commit 27d8c1d30a55844cbd8f0f0ad250658412e6d613 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Fix consult-imenu group-function --- consult-imenu.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/consult-imenu.el b/consult-imenu.el index d051774d04..e7878c4b0f 100644 --- a/consult-imenu.el +++ b/consult-imenu.el @@ -183,10 +183,12 @@ this function can jump across buffers." :group (when narrow (lambda (cand transform) - (when-let (type (get-text-property 0 'consult--type cand)) - (if transform - (substring cand (1+ (next-single-property-change 0 'consult--type cand))) - (alist-get type narrow))))) + (let ((type (get-text-property 0 'consult--type cand))) + (cond + ((and transform type) + (substring cand (1+ (next-single-property-change 0 'consult--type cand)))) + (transform cand) + (type (alist-get type narrow)))))) :narrow (when narrow (list :predicate