;; ----------------------------------------------------------------------------
(unless noninteractive
- (add-hook 'kill-emacs-hook #'desktop-kill))
+ (add-hook 'kill-emacs-query-functions #'desktop-kill))
(defun desktop-kill ()
"If `desktop-save-mode' is non-nil, do what `desktop-save' says to do.
(unless (yes-or-no-p "Error while saving the desktop. Ignore? ")
(signal (car err) (cdr err))))))
;; If we own it, we don't anymore.
- (when (eq (emacs-pid) (desktop-owner)) (desktop-release-lock)))
+ (when (eq (emacs-pid) (desktop-owner)) (desktop-release-lock))
+ t)
;; ----------------------------------------------------------------------------
(defun desktop-list* (&rest args)