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

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

[nongnu] elpa/inf-ruby 70da83f8e4 131/265: Merge pull request #54 from w


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 70da83f8e4 131/265: Merge pull request #54 from wasamasa/feature-defcustom
Date: Sat, 9 Jul 2022 21:59:20 -0400 (EDT)

branch: elpa/inf-ruby
commit 70da83f8e497ad78420527e8231278cb230e1db4
Merge: 310da805b6 00237986d8
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Merge pull request #54 from wasamasa/feature-defcustom
    
    Apply `defcustom` fixes
---
 inf-ruby.el | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index a5dc00a6f5..f9ed36e4e6 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -77,10 +77,26 @@
 (defcustom inf-ruby-prompt-read-only t
   "If non-nil, the prompt will be read-only.
 
-Also see the description of `ielm-prompt-read-only'.")
+Also see the description of `ielm-prompt-read-only'."
+  :type 'boolean
+  :group 'inf-ruby)
 
-(defvar inf-ruby-default-implementation "ruby"
-  "Which Ruby implementation to use if none is specified.")
+(defcustom inf-ruby-implementations
+  '(("ruby"     . "irb --prompt default --noreadline -r irb/completion")
+    ("jruby"    . "jruby -S irb --prompt default --noreadline -r 
irb/completion")
+    ("rubinius" . "rbx -r irb/completion")
+    ("yarv"     . "irb1.9 -r irb/completion")
+    ("macruby"  . "macirb -r irb/completion")
+    ("pry"      . "pry"))
+  "An alist of ruby implementations to irb executable names."
+  :type '(repeat (cons string string))
+  :group 'inf-ruby)
+
+(defcustom inf-ruby-default-implementation "ruby"
+  "Which Ruby implementation to use if none is specified."
+  :type `(choice ,@(mapcar (lambda (item) (list 'const (car item)))
+                           inf-ruby-implementations))
+  :group 'inf-ruby)
 
 (defconst inf-ruby-prompt-format
   (concat
@@ -119,15 +135,6 @@ graphical char in all other prompts.")
     map)
   "Mode map for `inf-ruby-mode'.")
 
-(defvar inf-ruby-implementations
-  '(("ruby"     . "irb --prompt default --noreadline -r irb/completion")
-    ("jruby"    . "jruby -S irb --prompt default --noreadline -r 
irb/completion")
-    ("rubinius" . "rbx -r irb/completion")
-    ("yarv"     . "irb1.9 -r irb/completion")
-    ("macruby"  . "macirb -r irb/completion")
-    ("pry"      . "pry"))
-  "An alist of ruby implementations to irb executable names.")
-
 ;;;###autoload
 (defvar ruby-source-modes '(ruby-mode enh-ruby-mode)
   "Used to determine if a buffer contains Ruby source code.



reply via email to

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