Skip to content

Commit eebeef1

Browse files
committed
Don't attempt to byte-compile a symbol whose function value is a subr
`(byte-compile #'cons)` will return `t` which is not a function. Passing in the `subr` to `byte-compile` will just return the `subr` so everything works out OK. This is an attempt at fixing issues like nnicandro/emacs-zmq#32.
1 parent 85f6ff8 commit eebeef1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jupyter-ioloop.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,11 @@ nothing."
339339
;; Initialize any callbacks that were added before the ioloop was
340340
;; started
341341
(setq jupyter-ioloop-pre-hook
342-
(mapcar (lambda (f) (unless (byte-code-function-p f) (byte-compile f)))
342+
(mapcar (lambda (f)
343+
(when (symbolp f)
344+
(setq f (symbol-function f)))
345+
(unless (byte-code-function-p f)
346+
(byte-compile f)))
343347
(append jupyter-ioloop-pre-hook
344348
(quote ,(mapcar #'macroexpand-all
345349
(oref ioloop callbacks))))))

0 commit comments

Comments
 (0)