Function: desktop--load-locked-desktop-p
desktop--load-locked-desktop-p is a byte-compiled function defined in
desktop.el.gz.
Signature
(desktop--load-locked-desktop-p OWNER)
Documentation
Return t if a locked desktop should be loaded.
OWNER is the pid in the lock file.
The return value of this function depends on the value of
desktop-load-locked-desktop.
Source Code
;; Defined in /usr/src/emacs/lisp/desktop.el.gz
(defun desktop--load-locked-desktop-p (owner)
"Return t if a locked desktop should be loaded.
OWNER is the pid in the lock file.
The return value of this function depends on the value of
`desktop-load-locked-desktop'."
(pcase desktop-load-locked-desktop
('ask
(unless (daemonp)
(y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\
Using it may cause conflicts. Use it anyway? " owner))))
('check-pid
(or (eq (emacs-pid) owner)
(not (desktop--emacs-pid-running-p owner))))
('nil nil)
(_ t)))