I attach three patches for lisp/textmodes/text-mode.el arising from the discussion in bug#34671. The first enables lexical-binding and makes some minor simplifications. The second makes text-mode no longer reset indent-line-function to indent-relative locally, a change (info "(elisp) Example Major Modes") has been promising for many moons. AFAICT, text-mode works even when indent-line-function is not set to indent-relative (as I'd hope). I've had a quick look through all the modes derived from text-mode in emacs.git and nothing strikes me as an obvious incompatibility with the proposed change. Are there any significant reasons to keep the current setting of indent-line-function in text-mode? The third obsoletes the variable text-mode-variant, which is unused in both emacs.git and elpa.git, and has been recommending derived-mode-p as a better alternative in its docstring for almost two decades. WDYT? Thanks, -- Basil