4

I already make extensive use of flyspell-mode to keep my errant spelling in check. However I'm currently trying to break the bad habit of using "it's" for possessive statements. I've had a brief look around and haven't found any grammar checkers but really all I need is to visually hi-light common errors in any buffer which can accept textual prose. Any suggestions of the easiest way to achieve this?

1

2 Answers 2

2

A brief Google search ("open source English grammar checker" and "langtool emacs") led me to langtool.el, which can be installed using MELPA.

PS: I haven't tried it yet, but I definitely will.

1
  • Seems like that needs an external java library. I'm not sure if it's commonly packaged. I'll have a look.
    – stsquad
    Commented Nov 26, 2014 at 2:12
0

My very low rent solution for this particular problem was to use hi-lock mode:

(defun my-hightlight-non-possessive-its ()
  "Turn on hi-lock mode for any (potentially incorrect) usage of it's"
  (interactive)
  (hi-lock-face-phrase-buffer "it's"))

;; Hooks for non-possessive its
(add-hook 'text-mode-hook 'my-hightlight-non-possessive-its)
(add-hook 'prog-mode-hook 'my-hightlight-non-possessive-its))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.