Check if buffer is alive before reparsing.

I encounter problems when using `C-c '` to edit a JS code block.