This has two advantages. By whitelisting keywords, users can quickly spot mistakes when editing:

This also prevents a classic bug where Emacs highlights substrings that happen to be keywords:

(Don’t) use company

Company is excellent, and I highly recommend it. However, not all Emacsers use company. You don’t need to force company on your users.

Instead, you can use completion-at-point-functions . Your completion functionality will work in stock Emacs, and company users will benefit too through company-capf .

Ah, but what about all the extra annotations you can supply to company? We can have our cake and eat it too:

(defunracer-complete-at-point()"Complete the symbol at point."(unless(nth3(syntax-ppss));; not in string(let*((bounds(bounds-of-thing-at-point'symbol))(beg(or(carbounds)(point)))(end(or(cdrbounds)(point))))(listbegend(completion-table-dynamic#'racer-complete):annotation-function#'racer-complete--annotation:company-prefix-length(racer-complete--prefix-pbegend):company-docsig#'racer-complete--docsig:company-location#'racer-complete--location))))

Test with assess

Historically, it’s been rather awkward to test major modes. Many authors didn’t bother.

That’s all changed with the release of assess . Assess provides great assertions with readable error messages.