Subject: Re: bug#21833: 24.4; desktop-kill, which is interactive, is in kill-emacs-hook

From: Juanma Barranquero <[email-masked]>
Date: Fri, 13 Nov 2015 00:04:13 +0100

I think the key words are "should not". For example, emacs-lock sets both
kill-emacs-hook and kill-emacs-query-functions. If the user goes to the
trouble of exit-locking a buffer, they won't be happy if M-x kill-emacs
bypasses the protection.

I think something similar applies to desktop. Setting up a desktop can be
time consuming. Best to err in the side of safety.

After all, kill-emacs doesn't even guarantee that it will kill Emacs.
Nothing forbids doing

(add-hook 'kill-emacs-hook (lambda () (error ""))