help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't insert curly brace for string interpolation in ruby-mode


From: Andrew Pennebaker
Subject: Can't insert curly brace for string interpolation in ruby-mode
Date: Fri, 5 Apr 2013 17:19:02 -0400

Ruby uses the syntax "... #{_expression_}..." for string interpolation. But when I press left curly brace, Emacs says "Symbol's value as variable is void: last-command-char".

I C-h k {, and saw that { and } are bound to ruby-electric-brace. This function appears to be malfunctioning.

As a workaround, I M-x fundamental-mode, typed a literal { and }, then M-x ruby-mode. Doing this repeatedly became a hassle, so I added a temporary hook to my .emacs:

(add-hook 'ruby-mode-hook
          (lambda ()
            (define-key ruby-mode-map "{" nil)
            (define-key ruby-mode-map "}" nil)))

Could someone take a look at ruby-electric-brace to determine the exact issue?

--
Cheers,

Andrew Pennebaker
www.yellosoft.us

reply via email to

[Prev in Thread] Current Thread [Next in Thread]