* lisp/comint.el (comint-input-ring-file-name): Avoid having this
variable being killed on mode restart while the other ring
variables aren't (bug#39667). This would mean that `M-x
shell'/`C-d'/`M-x shell' didn't save commands entered after the
second `M-x shell'.
(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand)
(put 'comint-input-ring 'permanent-local t)
+(put 'comint-input-ring-file-name 'permanent-local t)
(put 'comint-input-ring-index 'permanent-local t)
(put 'comint-save-input-ring-index 'permanent-local t)
(put 'comint-input-autoexpand 'permanent-local t)