[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 534644d2bd 13/63: toot: default to emoji.el, emoj
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 534644d2bd 13/63: toot: default to emoji.el, emojify customize |
Date: |
Sun, 4 Aug 2024 04:00:30 -0400 (EDT) |
branch: elpa/mastodon
commit 534644d2bd6a0a14b89d7bdacc41d305fcf265b6
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>
toot: default to emoji.el, emojify customize
mastodon-use-emojify customize
---
lisp/mastodon-toot.el | 16 +++++++---------
lisp/mastodon.el | 8 +++++++-
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index e934352690..ecee301828 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -31,6 +31,8 @@
;;; Code:
(eval-when-compile (require 'subr-x))
+
+(defvar mastodon-use-emojify)
(require 'emojify nil :noerror)
(declare-function emojify-insert-emoji "emojify")
(declare-function emojify-set-emoji-data "emojify")
@@ -158,11 +160,6 @@ If the original toot visibility is different we use the
more restricted one."
"Whether to enable your instance's custom emoji by default."
:type 'boolean)
-(defcustom mastodon-toot--emojify-in-compose-buffer t
- "Whether to enable `emojify-mode' in the compose buffer.
-We only attempt to enable it if its bound."
- :type 'boolean)
-
(defcustom mastodon-toot--proportional-fonts-compose nil
"Nonnil to enable using proportional fonts in the compose buffer.
By default fixed width fonts are used."
@@ -285,8 +282,7 @@ Includes boosts, and notifications that display toots."
(define-key map (kbd "C-c C-w") #'mastodon-toot--toggle-warning)
(define-key map (kbd "C-c C-n") #'mastodon-toot--toggle-nsfw)
(define-key map (kbd "C-c C-v") #'mastodon-toot--change-visibility)
- (when (require 'emojify nil :noerror)
- (define-key map (kbd "C-c C-e") #'mastodon-toot--insert-emoji))
+ (define-key map (kbd "C-c C-e") #'mastodon-toot--insert-emoji)
(define-key map (kbd "C-c C-a") #'mastodon-toot--attach-media)
(define-key map (kbd "C-c !") #'mastodon-toot--clear-all-attachments)
(define-key map (kbd "C-c C-p") #'mastodon-toot--create-poll)
@@ -764,7 +760,9 @@ TEXT-ONLY means don't check for attachments or polls."
;;; EMOJIS
(defalias 'mastodon-toot--insert-emoji
- #'emojify-insert-emoji
+ (if mastodon-use-emojify
+ #'emojify-insert-emoji
+ #'emoji-search)
"Prompt to insert an emoji.")
(defun mastodon-toot--emoji-dir ()
@@ -2022,7 +2020,7 @@ EDIT means we are editing an existing toot, not composing
a new one."
(setq mastodon-toot-previous-window-config previous-window-config)
(when mastodon-toot--proportional-fonts-compose
(facemenu-set-face 'variable-pitch))
- (when (and mastodon-toot--emojify-in-compose-buffer
+ (when (and mastodon-use-emojify
;; emojify loaded but poss not enabled in our buffer:
(boundp 'emojify-mode))
(emojify-mode))
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index d0dddeeb6f..73a8665a90 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -144,6 +144,11 @@ The default value \"%F %T\" prints ISO8601-style
YYYY-mm-dd HH:MM:SS.
Use. e.g. \"%c\" for your locale's date and time format."
:type 'string)
+(defcustom mastodon-use-emojify nil
+ "Whether to use emojify.el to display emojis.
+From version 28, Emacs can display emojis natively. But
+currently, it doesn't seem to have a way to handle custom emoji,
+while emojify,el has this feature and mastodon.el implements it.")
(defun mastodon-kill-window ()
"Quit window and delete helper."
@@ -464,7 +469,8 @@ Calls `mastodon-tl--get-buffer-type', which see."
(defun mastodon-mode-hook-fun ()
"Function to add to `mastodon-mode-hook'."
- (when (require 'emojify nil :noerror)
+ (when (and mastodon-use-emojify
+ (require 'emojify nil :noerror))
(emojify-mode t)
(when mastodon-toot--enable-custom-instance-emoji
(mastodon-toot--enable-custom-emoji)))
- [nongnu] elpa/mastodon d60d1d4c31 34/63: read CW when setting, not when sending, also display it. FIX #569., (continued)
- [nongnu] elpa/mastodon d60d1d4c31 34/63: read CW when setting, not when sending, also display it. FIX #569., ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon d7816ab59f 35/63: add item-json prop to fave/boost strings, so (un)folding works, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon f16fcb15a8 27/63: use mastodon-use-emojify in toot.el, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 945de24d3e 57/63: Merge branch 'develop' into insert-status-for-fold, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 6b0a0eb1fa 49/63: readme, index, info, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 46b66e332a 58/63: commentary, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 7b4d77b86b 10/63: tl: no-refresh for next-item in --single-toot, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon b8e8328a35 04/63: use with-toot-item and clean up functions that use it, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 6721f40cfd 30/63: unfold toot: replace whole item on unfolding (so we have props!), ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 41404473ea 05/63: toot.el: user-error not message when needed, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 534644d2bd 13/63: toot: default to emoji.el, emojify customize,
ELPA Syncer <=
- [nongnu] elpa/mastodon 3ba86999d3 26/63: flymake toot.el, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 43cd626f6a 28/63: Merge branch 'emoji.el' into develop, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon c95a19b2d5 33/63: index update, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon bc83b400b1 40/63: fix unfolding faved/bookmarked toots, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon dad54cccbc 46/63: fold-post-toggle, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 80ce719004 38/63: flymake our user-error mess, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 35a26600af 53/63: reimplement folding via insert body only., ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 0ef13ab348 55/63: fix prev-item-id, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 49261b91b0 59/63: Revert "replace persist with multisession", ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 351bd73875 54/63: fix prev-item-id, ELPA Syncer, 2024/08/04