(Fkill_buffer): gcpro BUF during kill_buffer_processes

and check that buffer is still alive upon return.
This commit is contained in:
Kim F. Storm 2007-04-13 12:52:00 +00:00
parent 4258757808
commit 49da74e698

View file

@ -1458,7 +1458,16 @@ with SIGHUP. */)
unlock_buffer (b);
#endif /* CLASH_DETECTION */
GCPRO1 (buf);
kill_buffer_processes (buf);
UNGCPRO;
/* Killing buffer processes may run sentinels which may
have called kill-buffer. */
if (NILP (b->name))
return Qnil;
clear_charpos_cache (b);
tem = Vinhibit_quit;