Stefan Kangas writes: > I'm not against adding a hook to `kill-emacs-hook', but it should be > added when you start IELM and not on top-level. We want to avoid any > side effects from merely loading a file. Fixed. > I don't think this will work in its current form either: AFAICT, > `comint-write-input-ring' saves it for the current buffer, and that's > not guaranteed to be the *ielm* buffer when `kill-emacs-hook' runs. > > So you'd want to first switch to that buffer, I think. It could also > have been renamed meanwhile, so I think you want to save the actual > buffer and not it's name (i.e. use `get-buffer'). Right, good catch. New attempt in the attached patch!