Commit 8ab0c04c authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Make desktop-kill more robust

* lisp/desktop.el (desktop-kill): Allow exiting Emacs even if we
can't delete the desktop file (bug#20762).
parent cd1313b7
Pipeline #11343 failed with stages
in 12 seconds
......@@ -759,7 +759,10 @@ is nil, ask the user where to save the desktop."
(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))
;; Allow exiting Emacs even if we can't delete the desktop file.
(ignore-error 'file-error
(desktop-release-lock)))
t)
;; ----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment