Tags: patch Here is a cleaned up patch. A couple of small additions unrelated to this bug are included but I can separate them if anyone prefers. The additions are: - Make lua-ts-mode-hook a defcustom. - Add an option to use a history file for inferior process input. Andrey if you could test this one it’d be appreciated. Thanks for your help.