Function: erc-spelling-init

erc-spelling-init is a byte-compiled function defined in erc-spelling.el.gz.

Signature

(erc-spelling-init BUFFER)

Documentation

Enable flyspell mode in an ERC buffer.

The current buffer is given by BUFFER.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-spelling.el.gz
(defun erc-spelling-init (buffer)
  "Enable flyspell mode in an ERC buffer.
The current buffer is given by BUFFER."
  (with-current-buffer buffer
    (let ((name (downcase (buffer-name)))
          (dicts erc-spelling-dictionaries))
      (when dicts
        (while (and dicts
                    (not (string= name (downcase (caar dicts)))))
          (setq dicts (cdr dicts)))
        (setq ispell-local-dictionary
              (if dicts
                  (cadr (car dicts))
                (erc-with-server-buffer ispell-local-dictionary)))))
    (setq flyspell-generic-check-word-predicate #'erc-spelling-flyspell-verify)
    (flyspell-mode 1)))