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

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

[nongnu] elpa/inf-ruby 03475ac1cc: inf-ruby-console-auto: Improve error


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 03475ac1cc: inf-ruby-console-auto: Improve error when no project found
Date: Tue, 22 Aug 2023 12:59:40 -0400 (EDT)

branch: elpa/inf-ruby
commit 03475ac1cca410ee63a523f5c63f859cfafe1aeb
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    inf-ruby-console-auto: Improve error when no project found
    
    Resolves #173
---
 inf-ruby.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 3fb7b9d785..92045ec692 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -1049,15 +1049,16 @@ This checks if the current line is a pry or ruby-debug 
prompt.")
 
 ;;;###autoload
 (defun inf-ruby-console-auto ()
-  "Run the appropriate Ruby console command.
+  "Run the Ruby console command appropriate for the project.
 The command and the directory to run it from are detected
-automatically."
+automatically from `inf-ruby-console-patterns-alist' which
+contains the configuration for the known project types."
   (interactive)
   (let* ((dir (locate-dominating-file default-directory
                                       #'inf-ruby-console-match))
          (type (inf-ruby-console-match dir))
          (fun (intern (format "inf-ruby-console-%s" type))))
-    (unless type (error "No matching directory found"))
+    (unless type (error "No known project type found. Try `M-x inf-ruby' 
instead."))
     (funcall fun dir)))
 
 (defun inf-ruby-console-rails-p ()



reply via email to

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