1. A customizable preference, desktop-auto-save, which indicates whether
desktop-save-in-desktop-dir should be added to auto-save-hook or not. Is
the easiest way to do this to add a private function that desktop mode
always adds to auto-save-hook and then have that private function test
a boolean which is itself the customizable preference when it runs, to see
whether to proceed or not?
No need for a separate function. You could just change desktop-save-mode
as follows:
(define-minor-mode desktop-save-mode
:global t
:group 'desktop
(if desktop-save-mode
(if desktop-auto-save
(add-hook 'auto-save-hook 'desktop-save-in-desktop-dir))
(remove-hook 'auto-save-hook 'desktop-save-in-desktop-dir)))