Replace use of obsolete variable `last-command-char`

The variable was an alias of `last-command-event` but has been removed in Emacs 24.3.

The same thing has already been fixed in ruby-electric.el: https://github.com/ruby/ruby/pull/198