;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/erc/erc-spell.el (require 'erc) (require 'cl-lib) (defvar-local erc-do-spell t) (defvar-local erc-mono-msgs 0) (defun erc-mono () (if (string= erc-nick (erc--get-inserted-msg-prop 'erc--spkr)) (cl-incf erc-mono-msgs) (setq erc-mono-msgs 0) )) (declare-function erc-mono nil) (defun erc-toggle-spell () (interactive) (setq erc-do-spell (not erc-do-spell)) (message "%s" erc-do-spell) ) (declare-function erc-toggle-spell nil) (defun erc-spell-then-send () (interactive) (save-mark-and-excursion (when erc-do-spell (let ((inhibit-message t)) (ispell-region erc-input-marker (point)) ))) (erc-mono) (erc-send-current-line) (when (< 5 erc-mono-msgs) (message "Monologuing: %d" erc-mono-msgs) )) (declare-function erc-spell-then-send nil) (provide 'erc-spell)