summaryrefslogtreecommitdiff
path: root/cider-interaction.el
diff options
context:
space:
mode:
authorhojinyoo <hojinyoo@users.noreply.github.com>2017-05-24 11:55:00 -0700
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2017-05-24 22:55:00 +0400
commit1c0cd08ba98a3a918b4694e9410d92ff0a8d7946 (patch)
tree25b829cbc755752302f7c72d2a3e417c87c2cb1e /cider-interaction.el
parent397c89d58e6a61d85b00d637b6358b909f86d675 (diff)
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`.
Diffstat (limited to 'cider-interaction.el')
-rw-r--r--cider-interaction.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/cider-interaction.el b/cider-interaction.el
index 5a7e760a..30bc2cf6 100644
--- a/cider-interaction.el
+++ b/cider-interaction.el
@@ -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)