I doubt it was a simple file buffer (or report a bug).
You know major-mode you use better than me. So please if you ask to add support for any particular major-mode - write how you install, configure and run yours.
Such complex buffers are called “special buffers”. A simple way to restore them is to use wg-support macro:
(wg-support 'inferior-emacs-lisp-mode 'ielm `((deserialize . ,(lambda (buffer vars) (ielm) (get-buffer "*ielm*")))))
To understand how this works - see Special buffers