diff --git a/jupyter-ioloop.el b/jupyter-ioloop.el index e258cd3..f77eadd 100644 --- a/jupyter-ioloop.el +++ b/jupyter-ioloop.el @@ -339,7 +339,11 @@ nothing." ;; Initialize any callbacks that were added before the ioloop was ;; started (setq jupyter-ioloop-pre-hook - (mapcar (lambda (f) (unless (byte-code-function-p f) (byte-compile f))) + (mapcar (lambda (f) + (when (symbolp f) + (setq f (symbol-function f))) + (unless (byte-code-function-p f) + (byte-compile f))) (append jupyter-ioloop-pre-hook (quote ,(mapcar #'macroexpand-all (oref ioloop callbacks))))))