Leo Liu writes: > Treating things between parentheses as sexp [...] is not lisp-specific This part makes sense to me. > using indent-sexp to indent it is not lisp-specific This is what surprises me. How does lisp-indent-calc-next/calculate-lisp-indent give correct results for non-lisp? I think using prog-indent-sexp for non-lisp would make more sense. Anyway, the following patch seems to work with your examples.