Subject: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it

From: Eli Zaretskii <[email-masked]>
Date: Sun, 11 Feb 2018 20:54:55 +0200

> From: Pierre Neidhardt <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Sun, 11 Feb 2018 19:41:22 +0100
> 
> One last question :) Is this the right way to initialize desktop-mode
> after frames are made then?
> 
> 	(defun desktop-init (_frame)
> 	  (desktop-save-mode)
> 	  (desktop-read)
> 	  0)
> 	(add-hook 'after-make-frame-functions 'desktop-init)

Yes, I think so.  Although you may wish doing this only once, not
after each frame creation (in which case, you should make the function
remove itself from the hook variable).

> It seems that those functions are expected to return a number, hence the 0.

Hmm... where did you see that they are expected to return a number?