branch: elpa/fedi
commit 402b8487f3e89e53654669946a775289ca5dc9f1
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
capf: put opt exit/annot funs in a when
---
fedi-post.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fedi-post.el b/fedi-post.el
index 691fbe47444..9bc772d5397 100644
--- a/fedi-post.el
+++ b/fedi-post.el
@@ -251,11 +251,13 @@ and a status."
;; FIXME: we "should" use :affixation-function for this but i
;; can't get it to work so use an exit-fun hack:
:exit-function
- (lambda (str status)
- (funcall exit-fun str status))
+ (when exit-fun
+ (lambda (str status)
+ (funcall exit-fun str status)))
:annotation-function
- (lambda (cand)
- (concat " " (funcall annot-fun cand)))))))
+ (when annot-fun
+ (lambda (cand)
+ (concat " " (funcall annot-fun cand))))))))
(defun fedi-post--mentions-annotation-fun (candidate)
"Given a handle completion CANDIDATE, return its annotation string, a
username."