aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-05 10:22:48 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-05 10:22:48 +0200
commit98333a0f21f394acd4cb774b7d5e92430faf06f3 (patch)
treeccc70645ea60dd8659245c80456467357603041e /lisp/mastodon-toot.el
parent0aa39f5f1451b7eb58954516a9b2a8b9be6dc16a (diff)
remove lambda from masto-toot hook
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index f7d4f18..4c55412 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1779,19 +1779,20 @@ Only text that is not one of these faces will be spell-checked."
(let ((f (get-text-property (1- (point)) 'face)))
(not (memq f faces))))))
-(add-hook 'mastodon-toot-mode-hook
- (lambda ()
- (setq flyspell-generic-check-word-predicate
- #'mastodon-toot-mode-flyspell-verify)))
+(defun mastodon-toot-mode-hook-fun ()
+ "Function for code to run in `mastodon-toot-mode-hook'."
+ ;; disable auto-fill-mode:
+ (auto-fill-mode -1)
+ ;; add flyspell predicate function:
+ (setq flyspell-generic-check-word-predicate
+ #'mastodon-toot-mode-flyspell-verify))
+
+(add-hook 'mastodon-toot-mode-hook #'mastodon-toot-mode-hook-fun)
;;;###autoload
(add-hook 'mastodon-toot-mode-hook
#'mastodon-profile--fetch-server-account-settings-maybe)
-;; disable auto-fill-mode:
-(add-hook 'mastodon-toot-mode-hook
- (lambda ()
- (auto-fill-mode -1)))
(define-minor-mode mastodon-toot-mode
"Minor mode to capture Mastodon toots."