Fix for indirect emacs buffers and null check
Merge pull request #845 from rneatherway/issues808+790

Fix for indirect emacs buffers and null check