Skip to content

Commit a480f48

Browse files
expezMalabarba
authored andcommitted
Harden cider-refresh-dynamic-font-lock
This function would fail when nil was propogated as the ns to act on. I encountered this in `profiles.clj`.
1 parent 064cfbf commit a480f48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cider-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ namespace itself."
409409
(interactive)
410410
(when cider-font-lock-dynamically
411411
(font-lock-remove-keywords nil cider--dynamic-font-lock-keywords)
412-
(when-let ((symbols (cider-resolve-ns-symbols (or ns (cider-current-ns)))))
412+
(when-let ((ns (or ns (cider-current-ns)))
413+
(symbols (cider-resolve-ns-symbols ns)))
413414
(setq-local cider--dynamic-font-lock-keywords
414415
(cider--compile-font-lock-keywords
415416
symbols (cider-resolve-ns-symbols (cider-resolve-core-ns))))

0 commit comments

Comments
 (0)