[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 6e74ef7e9b 3/3: Make code more readable with helm-aan
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 6e74ef7e9b 3/3: Make code more readable with helm-aand |
Date: |
Wed, 6 Sep 2023 16:00:02 -0400 (EDT) |
branch: elpa/helm
commit 6e74ef7e9b9cbd7069de68dd71316dca31f09352
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Make code more readable with helm-aand
---
helm-mode.el | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/helm-mode.el b/helm-mode.el
index a3677ea995..5ee84a36ed 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -2210,17 +2210,11 @@ When AFUN, AFIX are nil and CATEGORY is not file return
COMPS unmodified."
;; completing against a quoted symbol.
(mapcar (lambda (s)
(let ((ann (funcall afun s)))
- (if ann
- (cons
- (concat
- s
- (propertize
- " " 'display
- (propertize
- ann
- 'face 'helm-completions-annotations)))
- s)
- s)))
+ (or (helm-aand
+ ann
+ (propertize ann 'face 'helm-completions-annotations)
+ (cons (concat s (propertize " " 'display it)) s))
+ s)))
comps))
(t comps)))