diff options
| author | marty hiatt <martianhiatus@riseup.net> | 2024-02-27 17:11:25 +0100 | 
|---|---|---|
| committer | marty hiatt <martianhiatus@riseup.net> | 2024-02-27 17:11:25 +0100 | 
| commit | d61381e9395af63f0fa56e1f89a213aba3e43100 (patch) | |
| tree | 7f76d6a5b39b6e1cf43311d9192257883d823fa1 | |
| parent | 54be3ac2457ca21fbc827c6304009e2461ffacec (diff) | |
only complete on : if emojify-mode enabled.
it's too hard for now to enable completion without emojify
| -rw-r--r-- | lisp/mastodon-toot.el | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 1d91578..82ad03b 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1036,8 +1036,10 @@ Federated user: `username@host.co`."  (defun mastodon-toot--fetch-emojify-candidates ()    "Get the candidates to be used for emojis completion.  The candidates are calculated according to currently active -`emojify-emoji-styles'. Hacked off `emojify--get-completing-read-candidates'." -  (let ((styles (mapcar #'symbol-name emojify-emoji-styles))) +`emojify-emoji-styles'. Hacked off +`emojify--get-completing-read-candidates'." +  (let ((styles ;'("ascii" "unicode" "github") +         (mapcar #'symbol-name emojify-emoji-styles)))      (let ((emojis '()))        (emojify-emojis-each (lambda (key value)                               (when (seq-position styles (ht-get value "style")) @@ -1062,7 +1064,8 @@ TYPE is the candidate type, it may be :tags, :handles, or :emoji."                            collect (cons (concat "#" (car tag))                                          (cdr tag)))))                ((eq type :emoji) -               (mastodon-toot--fetch-emojify-candidates)) +               (when (bound-and-true-p emojify-mode) +                 (mastodon-toot--fetch-emojify-candidates)))                (t                 (mastodon-search--search-accounts-query                  (buffer-substring-no-properties start end))))))  | 
