emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-ruby ec70d7f0e9 187/265: inf-ruby-buffer: Fix "wrong-t


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby ec70d7f0e9 187/265: inf-ruby-buffer: Fix "wrong-type-argument stringp nil" outside of any project
Date: Sat, 9 Jul 2022 21:59:25 -0400 (EDT)

branch: elpa/inf-ruby
commit ec70d7f0e9d8d693d48e0cabfe55187e7b04e5f8
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    inf-ruby-buffer: Fix "wrong-type-argument stringp nil" outside of any 
project
---
 inf-ruby.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index a152d197e4..880c960072 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -293,9 +293,10 @@ The following commands are available:
 (defun inf-ruby-buffer ()
   "Return inf-ruby buffer for the current buffer or project."
   (catch 'buffer
-    (let ((current-dir (expand-file-name
-                        (locate-dominating-file default-directory
-                                                #'inf-ruby-console-match))))
+    (let ((current-dir (locate-dominating-file default-directory
+                                               #'inf-ruby-console-match)))
+      (unless current-dir (throw 'buffer nil))
+      (setq current-dir (expand-file-name current-dir))
       (dolist (buffer inf-ruby-buffers)
         (when (buffer-live-p buffer)
           (with-current-buffer buffer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]