Browse files

Use default-directory instead of buffer-file-name

buffer-file-name doesn't work for non-file buffers (like shell buffers).
  • Loading branch information...
1 parent 5a1afdf commit 59d384c895f18b885a250291f5ba394f3bf6cb5d @shosti shosti committed Jan 7, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 rbenv.el
@@ -157,7 +157,7 @@
(defun rbenv--locate-file (file-name)
"searches the directory tree for an given file. Returns nil if the file was not found."
- (let ((directory (locate-dominating-file (expand-file-name buffer-file-name) file-name)))
+ (let ((directory (locate-dominating-file default-directory file-name)))
(when directory (concat directory file-name))))
(defun rbenv--call-process (&rest args)

0 comments on commit 59d384c

Please sign in to comment.