unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Can't insert curly brace for string interpolation in ruby-mode
@ 2013-04-05 21:19 Andrew Pennebaker
  2013-04-05 23:52 ` Bob Proulx
  2013-04-07  3:33 ` Zhen Sun
  0 siblings, 2 replies; 10+ messages in thread
From: Andrew Pennebaker @ 2013-04-05 21:19 UTC (permalink / raw)
  To: Emacs Help

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1067 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-07  3:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05 21:19 Can't insert curly brace for string interpolation in ruby-mode Andrew Pennebaker
2013-04-05 23:52 ` Bob Proulx
2013-04-06  0:43   ` Andrew Pennebaker
2013-04-06  1:07     ` Steven Degutis
     [not found]       ` <CAHXt_SU-huJs5QVe39OBspA5_YVwSanKu3U_KWBrcDhfawBf3Q@mail.gmail.com>
2013-04-06  1:45         ` Steven Degutis
     [not found]           ` <CAHXt_SUwwaTuj8=QL+AMvqvpAM2jELogUtbDxNPJQug6mCU0cQ@mail.gmail.com>
     [not found]             ` <CAHXt_SXwGNQKzRu-LBBvg2xNruBhyEnMKFMspDwVqdk4zL_RFg@mail.gmail.com>
2013-04-06  3:15               ` Steven Degutis
2013-04-06  3:21                 ` Bob Proulx
2013-04-06  4:32                   ` Andrew Pennebaker
2013-04-06  4:39                     ` Steven Degutis
2013-04-07  3:33 ` Zhen Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).