KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have Ruby Electric mode installed via ELPA. I have visited a ruby file ~/test.rb C-h m reveals that ruby electric mode is enabled as is font lock, see output below Enabled minor modes: Auto-Compression Auto-Encryption Blink-Cursor Column-Number Delete-Selection File-Name-Shadow Global-Font-Lock Global-Linum Iswitchb Line-Number Menu-Bar Mouse-Wheel Shell-Dirtrack Tooltip Transient-Mark However when I enter code like; class Test def foo() I don't get any end auto inserted on hitting RET UPDATE I installed via package-list as that was recommended on the page I found, which I thought belonged to the author. Looking at the source of ~/emacs.d/elpa/ruby-electric-1.1/ruby-electric.el I see the following; ;; FIXME: it should be available in next versions of ruby-mode.el (defun ruby-insert-end () (interactive) (insert "end") (ruby-indent-line t) (end-of-line)) So it looks like I might have a bad file, will try another. UPDATE I used ruby-electric.el downloaded from http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_0/misc/ruby-electric.el Linked to from this article http://appsintheopen.com/articles/1-setting-up-emacs-for-rails-development/part/7-emacs-ruby-foo Then took this gist https://gist.github.com/1213051 adding this to ruby-electric.el (defun ruby-insert-end () "Insert \"end\" at point and reindent current line." (interactive) (insert "end"
Tags (comma-separated)
Save Edits
Cancel