I use global-autopair-mode
, but with Ruby the ruby-electric-mode
provides better autopairing.
I'm a n00b to Emacs and Lisp, so I would have thought you could do something like:
(add-hook 'ruby-mode-hook
(lambda ()
(autopair-mode nil)
(ruby-electric-mode t))
This however doesn't work. Is there a way to disable global modes within a major-mode hook?
Currently I'm using the last solution posted here, but it's not very neat and clean.