ruby: make the built-in ruby mode the default and...

... rename layer variable `ruby-use-built-in-ruby-mode` to
`ruby-enable-enh-ruby-mode`
This commit is contained in:
syl20bnr 2015-10-19 00:10:32 -04:00
parent 40f369ffa0
commit 6e5924014c
3 changed files with 10 additions and 11 deletions

View File

@ -25,13 +25,12 @@ To use this contribution add it to your =~/.spacemacs=
#+END_SRC
This layer supports two different Ruby modes: Emacs' built-in Ruby Mode and
[[https://github.com/zenspider/enhanced-ruby-mode][enh-ruby-mode]]. By default this layer enables the latter. To switch to the
built-in Ruby Mode set =ruby-use-built-in-ruby-mode=:
[[https://github.com/zenspider/enhanced-ruby-mode][enh-ruby-mode]]. By default the built-in Ruby mode is enabled. To switch to the
=enh-ruby-mode= set =ruby-enable-enh-ruby-mode= to t:
#+BEGIN_SRC emacs-lisp
(defun dotspacemacs/user-init ()
(setq-default ruby-use-built-in-ruby-mode t)
)
(defun dotspacemacs-configuration-layers ()
'((ruby :variables ruby-enable-enh-ruby-mode t)))
#+END_SRC
** Prerequisites

View File

@ -15,8 +15,8 @@
(spacemacs|defvar-company-backends enh-ruby-mode)
(spacemacs|defvar-company-backends ruby-mode)
(defvar ruby-use-built-in-ruby-mode nil
"If non-nil, use built-in Ruby Mode.
(defvar ruby-enable-enh-ruby-mode nil
"If non-nil, use `enh-ruby-mode' package insted of the built-in Ruby Mode.
Otherwise use Enh Ruby Mode, which is the default.")

View File

@ -20,13 +20,13 @@
ruby-test-mode
ruby-tools))
(if ruby-enable-enh-ruby-mode
(add-to-list 'ruby-packages 'enh-ruby-mode)
(add-to-list 'ruby-packages 'ruby-mode))
(when ruby-version-manager
(add-to-list 'ruby-packages ruby-version-manager))
(if ruby-use-built-in-ruby-mode
(add-to-list 'ruby-packages 'ruby-mode)
(add-to-list 'ruby-packages 'enh-ruby-mode))
(defun ruby/init-rbenv ()
"Initialize RBENV mode"
(use-package rbenv