On Mon, Jun 24 2013, martin rudalics wrote: > Sure. What I meant is that `kill-buffer' should return immediately when > the buffer is dead after calling the query functions instead of entering > the do_yes_or_no_p stuff with a dead buffer. Or did I miss something? Ah, right. Changing the if (INTERACTIVE && !NILP (BVAR (b, filename)) && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) condition to if (INTERACTIVE && BUFFER_LIVE_P (b) && !NILP (BVAR (b, filename)) && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) would solve the issue. Either that or adding if (!BUFFER_LIVE_P (b)) return unbind_to (count, Qt); just prior to the whole if statement which has the side effect of not calling kill-buffer-hook if any of the kill-buffer-query-functions kills the buffer, which actually may be desired. -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz (o o) ooo +------------------ooO--(_)--Ooo--