Skip to content

Commit 1c0cd08

Browse files
hojinyoobbatsov
authored andcommitted
Fix a nil error when loading a code buffer and the error buffer is visible (#1997)
`(cider--quit-error-window)` has a side-effect - once the error window is "buried" by the call, the return value of function `(buffer-file-name)` becomes `nil`. That leads filename to be nil. The fix is pretty simple - pass the source code buffer explicitly to `buffer-file-name`.
1 parent 397c89d commit 1c0cd08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cider-interaction.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ ClojureScript REPL exists for the project, it is evaluated in both REPLs."
15941594
(cider--clear-compilation-highlights)
15951595
(cider--quit-error-window)
15961596
(cider--cache-ns-form)
1597-
(let ((filename (buffer-file-name)))
1597+
(let ((filename (buffer-file-name buffer)))
15981598
(cider-map-connections
15991599
(lambda (connection)
16001600
(cider-request:load-file (cider-file-string filename)

0 commit comments

Comments
 (0)