From 43ece81b2d32d045e8988c9e1f16392778581a40 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 30 Aug 2019 19:47:25 +0200 Subject: [PATCH] [Utils] Improve definitions of custom helm sources Instead of giving a list, we now create the sources directly. This gives us the possibility to configure certain aspects of the sources like matching behavior and highlighting. Now we are much closer to the standard behavior of helm than before. --- site-lisp/db-utils.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index 749f4d5..a55ed0d 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -353,10 +353,10 @@ output, separated by \\n, when called with ;;; helm configuration (defvar db/helm-source-frequently-used-features - '((name . "Frequently Used") - (candidates . db/frequently-used-features) - (action . (("Open" . funcall))) - (filtered-candidate-transformer . helm-adaptive-sort)) + (helm-make-source "Frequently Used" 'helm-source-sync + :candidates #'db/frequently-used-features + :action '(("Open" . funcall)) + :filtered-candidate-transformer #'helm-adaptive-sort) "Helm source for `db/helm-frequently-used-features’.") (defun db/important-documents () @@ -399,10 +399,10 @@ path." (start-process "" nil "xdg-open" path)))) (defvar db/helm-source-important-documents - '((name . "Important files") - (candidates . db/important-documents) - (action . (("Open externally" . db/system-open) - ("Find file" . find-file)))) + (helm-make-source "Important files" 'helm-source-sync + :candidates #'db/important-documents + :action '(("Open externally" . db/system-open) + ("Find file" . find-file))) "Helm source for important documents.") (defun db/helm-shortcuts (arg)