diff options
author | mousebot <mousebot@riseup.net> | 2021-10-02 00:27:57 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-10-02 13:13:27 +0200 |
commit | a311de00bd4fb2ad467c955e1fa12fd5613b58b2 (patch) | |
tree | a86584348458827adefeab3798cc9139058a6967 /lisp/mastodon-toot.el | |
parent | 77f0d464c39693ffef7146aced2804e787a870de (diff) |
add emojify-insert-emoji binding in mastodon new toot buffer
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 0c3c784..fc8949a 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -31,6 +31,8 @@ (defvar mastodon-instance-url) +(declare-function #'emojify-insert-emoji "emojify") + (autoload 'mastodon-auth--user-acct "mastodon-auth") (autoload 'mastodon-http--api "mastodon-http") (autoload 'mastodon-http--post "mastodon-http") @@ -98,6 +100,8 @@ Valid values are \"direct\", \"private\" (followers-only), \"unlisted\", and \"p (define-key map (kbd "C-c C-n") #'mastodon-toot--toggle-nsfw) (define-key map (kbd "C-c C-v") #'mastodon-toot--change-visibility) (define-key map (kbd "C-c C-a") #'mastodon-toot--add-media-attachment) + (when (require 'emojify nil :noerror) + (define-key map (kbd "C-c C-e") #'mastodon-toot--insert-emoji)) map) "Keymap for `mastodon-toot'.") @@ -265,6 +269,10 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (interactive) (mastodon-toot--kill)) +(defun mastodon-toot--insert-emoji () + "Prompt to insert an emoji." + (emojify-insert-emoji)) + (defun mastodon-toot--remove-docs () "Get the body of a toot from the current compose buffer." (let ((header-region (mastodon-tl--find-property-range 'toot-post-header |