Skip to content

Commit 0df3a28

Browse files
committed
Handle a nil syntax-propertize-function when initializing REPL
* jupyter-julia.el: Do it.
1 parent 1182505 commit 0df3a28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jupyter-julia.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,11 @@ if !isdefined(Main, :__JUPY_saved_dir)
211211
end"))))
212212

213213
(cl-defmethod jupyter-repl-after-init (&context (jupyter-lang julia))
214-
(add-function
215-
:after (local 'syntax-propertize-function)
216-
#'jupyter-julia--propertize-repl-mode-char)
214+
(if syntax-propertize-function
215+
(add-function
216+
:after (local 'syntax-propertize-function)
217+
#'jupyter-julia--propertize-repl-mode-char)
218+
(setq-local syntax-propertize-function #'jupyter-julia--propertize-repl-mode-char))
217219
(jupyter-julia--setup-hooks jupyter-current-client)
218220
;; Setup hooks after restart as well
219221
(jupyter-add-hook jupyter-current-client 'jupyter-iopub-message-hook

0 commit comments

Comments
 (0)