diff --git a/helm-dictionary.el b/helm-dictionary.el index 8a83fd3..e41e281 100644 --- a/helm-dictionary.el +++ b/helm-dictionary.el @@ -248,13 +248,6 @@ browser in `helm-browse-url-default-browser-alist'" ("Insert target language term" . helm-dictionary-insert-l2term)))) -(defvar helm-source-dictionary - (mapcar - (lambda (x) (helm-dictionary-build (car x) (cdr x))) - (if (stringp helm-dictionary-database) - (list (cons "Search dictionary" helm-dictionary-database)) - helm-dictionary-database))) - (defvar helm-source-dictionary-online (helm-build-sync-source "Look up online" :match (lambda (_candidate) t) @@ -271,10 +264,16 @@ browser in `helm-browse-url-default-browser-alist'" ;;;###autoload (defun helm-dictionary () (interactive) - (helm :sources (append helm-source-dictionary (list helm-source-dictionary-online)) - :full-frame t - :candidate-number-limit 500 - :buffer "*helm dictionary*")) + (let ((helm-source-dictionary + (mapcar + (lambda (x) (helm-dictionary-build (car x) (cdr x))) + (if (stringp helm-dictionary-database) + (list (cons "Search dictionary" helm-dictionary-database)) + helm-dictionary-database)))) + (helm :sources (append helm-source-dictionary (list helm-source-dictionary-online)) + :full-frame t + :candidate-number-limit 500 + :buffer "*helm dictionary*"))) (provide 'helm-dictionary)