
@soegaard2 the above looks like flyspell-prog-mode … which only does comments and strings.
I would recommend checking out flycheck over flyspell… it’s a little less clunky and more modular.

I’ll check it out. I found out that there are both a flyspell-mode and a flyspell-prohibit-mode. However, flyspell-mode knows about latex, and was confused about the contents of my file, which weren’t latex, but some parts looked like it. The hook above makes flyspell-mode check everything.

They’re both kinda hard to debug the config… But flycheck at least gives some help. Poke me and I can dig up some of my config for racket and such.

(On phone)

I’m gonna respond OUTSIDE this thread since it isn’t about flycheck/spell

@soegaard2 apparently for racket-mode, I still use (flyspell-prog-mode)
in my hook. Ah! for good reason… after poking around… flycheck is only for doing syntax check / lint type actions and doesn’t (and won’t) do spelling at all. flycheck was amazing for learning haskell quickly via hlint (I wish all languages had a linter that smart). I still use flyspell in a bunch of programming language hooks.

poking around more.. I was crossing wires with flymake, which is a disaster.

Is there a built in version of this? I’ve been poking around and don’t see something that’ll negative index a list/sequence.
(defun nth* (n xs)
"Select the Nth item from XS, zero based. Go backwards from the
right if N is negative."
(if (< n 0)
(nth* (1- (abs n)) (reverse xs))
(nth n xs)))

Not that I’ve seen an exhaustive amount of Emacs Lisp source code, but: I don’t recall negative indexes meaning “from the end” — being a common idiom.

There’s a whole cluster of (forward-x amt)
functions where negative amount means backwards. e.g. (backward-line 1)
is actually implemented as (forward-line -1)
.

But I haven’t seen much in the way of negative index idioms.

Oh duh. One obvious counter-example is substring
. Signature
(substring STRING &optional FROM TO)
Documentation
Return a new string whose contents are a substring of STRING.
The returned string consists of the characters between index FROM
(inclusive) and index TO (exclusive) of STRING. FROM and TO are
zero-indexed: 0 means the first character of STRING. Negative values
are counted from the end of STRING. If TO is nil, the substring runs
to the end of STRING.

Having said that: substring is a function defined in C source code.

Same. I was mostly wondering if I overlooked something. My desire for it mostly comes from ruby array/substring indexing… but it especially makes sense for what I’m working on (display size independent window management).