0

This is smilar to How to make Flyspell ignore code blocks in Markdown? but I have jekyll-modes which is poly-mode with markdown and other languages to be used with jekyll files.

I want to ignore everything that is not markdown in polymode.

I've tried this:

(setq flyspell-generic-check-word-predicate 'flyspell-generic-textmode-verify)

(defun flyspell-generic-textmode-verify ()
  "Used for `flyspell-generic-check-word-predicate' in text modes."
  (eq major-mode 'markdown-mode))

and this

(put 'markdown-mode 'flyspell-mode-predicate 'auctex-mode-flyspell-skip-non-markdown)

(defun markdown-mode-flyspell-skip-non-markdown ()
  (eq major-mode 'markdown-mode))

For enabling jekyll-modes I have:

(require 'jekyll-mode)

and I have function that run on markdown mode:

(defun markdown ()
  (setq fill-column 90)
  (ispell-change-dictionary (if (string-match-p "jcubic/www/blog/repo" (buffer-file-name))
                                "polish"
                              "english"))
  (flyspell-mode)
  (flyspell-buffer))
(add-hook 'markdown-mode-hook 'markdown)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.