overtone / emacs-live

M-x start-hacking
http://overtone.github.com/emacs-live/
Other
1.51k stars 242 forks source link

Can't insert curly brace into ruby file #102

Closed cannyboy closed 11 years ago

cannyboy commented 11 years ago

... and curly braces are quite useful in Ruby.

I get this message when trying to insert a curly brace:

Symbol's value as variable is void: last-command-char 

After a bit of googling, it seems something funny is happening in the ruby-electric.el file. The half-baked solution is to put this in somewhere in the live-packs ... init.el maybe :

(add-hook 'ruby-mode-hook
(lambda ()
(define-key ruby-mode-map "{" nil)
(define-key ruby-mode-map "}" nil)))
martinffx commented 11 years ago

I get the same issue running emacs 24.3.1

From that same thread it seems to be an error in ruby-electric-mode

Apparently installing the latest version from elpa resolves the issue.

Not sure how to go about updating it on emacs live...