diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-12-19 21:59:37 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-12-19 21:59:37 +0100 |
commit | 638e5e09dfcafde824c74d277089fd66fb3c959a (patch) | |
tree | 3e651fb8da783d32ec19391eb328e1553da435b9 /lisp | |
parent | 0c7322e839f76882a4993516c5921c8ee82e25fa (diff) |
clean up emoji capf
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-toot.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 14bc7db..0d7e932 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -239,7 +239,7 @@ send.") (group-n 2 ?# (+ (any "A-Z" "a-z" "0-9"))) (| "'" word-boundary))) ; boundary or possessive -(defvar mastodon-emoji-tag-regex +(defvar mastodon-toot-emoji-regex (rx (| (any ?\( "\n" "\t" " ") bol) (group-n 2 ?: ; opening : (+ (any "A-Z" "a-z" "0-9" "_")) @@ -1044,7 +1044,7 @@ TYPE is the candidate type, it may be :tags, :handles, or :emoji." (defun mastodon-toot--make-capf (regex type &optional annot-fun) "Build a completion backend for `completion-at-point-functions'. REGEX is the regex to match preceding text. -Type is a keyword symbol for `mastodon-toot--fetch-completion-candidates'. +TYPE is a keyword symbol for `mastodon-toot--fetch-completion-candidates'. ANNOT-FUN is a function returning an annotatation from a single arg, a candidate." (let* ((bounds (mastodon-toot--get-bounds regex)) @@ -1080,7 +1080,7 @@ arg, a candidate." (defun mastodon-toot--emoji-capf () "Build an emoji completion backend for `completion-at-point-functions'." - (mastodon-toot--make-capf mastodon-emoji-tag-regex + (mastodon-toot--make-capf mastodon-toot-emoji-regex #'mastodon-toot--emoji-annotation-fun :emoji)) @@ -1094,10 +1094,10 @@ arg, a candidate." ;; or make it an alist and use cdr (cadr (assoc candidate mastodon-toot-completions))) -(defun mastodon-toot--emoji-annotation-fun (candidate) - "" +(defun mastodon-toot--emoji-annotation-fun (_candidate) + "." ;; TODO: emoji image as annot -) + ) ;;; REPLY |