Skip to content

Commit

Permalink
Fix a nil error when loading a code buffer and the error buffer is vi…
Browse files Browse the repository at this point in the history
…sible (#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`.
  • Loading branch information
hojinyoo authored and bbatsov committed May 24, 2017
1 parent 397c89d commit 1c0cd08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cider-interaction.el
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ ClojureScript REPL exists for the project, it is evaluated in both REPLs."
(cider--clear-compilation-highlights)
(cider--quit-error-window)
(cider--cache-ns-form)
(let ((filename (buffer-file-name)))
(let ((filename (buffer-file-name buffer)))
(cider-map-connections
(lambda (connection)
(cider-request:load-file (cider-file-string filename)
Expand Down

0 comments on commit 1c0cd08

Please sign in to comment.