From: Stefan Kangas Date: Wed, 2 Aug 2023 19:46:55 +0000 (+0200) Subject: Don't hardcode ruby version in interpreter-mode-alist X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f30404ebcf7c23f4a79e9ac61a17dc9c6a5c9c3;p=emacs.git Don't hardcode ruby version in interpreter-mode-alist * lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Don't hardcode ruby version. This adds support for modern versions of Ruby like "ruby2.7", instead of the previously hardcoded "ruby1.9". --- diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e441ffbbfe3..9d8f45604f9 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2708,7 +2708,7 @@ Currently there are `ruby-mode' and `ruby-ts-mode'." 'ruby-mode)) ;;;###autoload -(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8")) +(dolist (name (list "ruby" "rbx" "jruby" "j?ruby\\(?:[0-9.]+\\)")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode))) (provide 'ruby-mode)