In original code, read-buffer-function is not restored after disabled
persp-mode. Because "#'" is prefixed to read-buffer-function and
persp-saved-read-buffer-function. They are variables, not functions.
Value of #'read-buffer-function is the symbol 'read-buffer-function,
not its value. So "#'" must be removed.
You can see this issue by following step.
% emacs -Q -l persp-mode.el"
Check value of read-buffer-function. It is nil.
Enable persp-mode by M-x persp-mode
Disable persp-mode by M-x persp-mode
Check value of read-buffer-function again. It is 'persp-saved-read-buffer-function(Expected nil).
In original code, read-buffer-function is not restored after disabled persp-mode. Because "#'" is prefixed to read-buffer-function and persp-saved-read-buffer-function. They are variables, not functions. Value of #'read-buffer-function is the symbol 'read-buffer-function, not its value. So "#'" must be removed.
You can see this issue by following step.
% emacs -Q -l persp-mode.el"
read-buffer-function
. It isnil
.M-x persp-mode
M-x persp-mode
read-buffer-function
again. It is'persp-saved-read-buffer-function
(Expectednil
).